<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vinicius Lopes on Medium]]></title>
        <description><![CDATA[Stories by Vinicius Lopes on Medium]]></description>
        <link>https://medium.com/@vinicius.ld?source=rss-619e06f84b4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*OHlpAQH2bHPEb8nyF9e5cw.jpeg</url>
            <title>Stories by Vinicius Lopes on Medium</title>
            <link>https://medium.com/@vinicius.ld?source=rss-619e06f84b4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:19:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vinicius.ld/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to generate a WebAssembly module using Rust and Node.js]]></title>
            <link>https://medium.com/@vinicius.ld/how-to-generate-a-webassembly-module-using-rust-and-node-js-e365d5157df?source=rss-619e06f84b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e365d5157df</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[webassembly]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Vinicius Lopes]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 17:34:09 GMT</pubDate>
            <atom:updated>2020-06-08T17:34:09.383Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*41dj3GTwY_d1dvc4BzUSNw.png" /></figure><p>This article aims to show how easy it is to generate a WebAssembly module using Rust and how to consume it using Node.Js. It also aims to show the performance improvement using Fibonacci’s algorithm as an example.</p><p>This is the second part of my first article talking about WebAssembly. You can find the first part <a href="https://medium.com/@vinicius.ld/introduction-to-webassembly-ac3ef5649057">here</a>.</p><h3>Setup</h3><p>We will use the code on <a href="https://github.com/vlopes/simple-wasm">this repo</a> as an example.</p><p>To be able to run everything you will have to install:</p><ul><li><a href="https://nodejs.org/en/download/">Node.js</a></li><li><a href="https://www.rust-lang.org/tools/install">Rust and Cargo</a> (Cargo is the package manager for Rust)</li><li><a href="https://rustwasm.github.io/wasm-pack/installer/">wasm-pack</a> (to build the WebAssembly )</li></ul><h3>Executing the project</h3><p>First, let’s clone the project</p><pre><em>git clone git@github.com:vlopes/simple-wasm.git</em></pre><p>Now, we will browse through the project and understand some things first.</p><pre>simple-wasm<br>├── Cargo.toml<br>├── readme.md<br>└── src<br>    ├── fibonacci.js<br>    ├── lib.rs<br>    ├── main.js<br>    └── main.rs</pre><p>On the root of the project, you will see a file named Cargo.toml. This file is responsible for controlling all Rust dependencies, your build process, etc.</p><pre>[package]</pre><pre>name = &quot;simple-wasm&quot;</pre><pre>version = &quot;0.1.0&quot;</pre><pre>authors = [&quot;Vinicius Domingues &lt;vinicius.ld@outlook.com&gt;&quot;]</pre><pre>edition = &quot;2018&quot;</pre><pre>[lib]</pre><pre>crate-type = [&quot;cdylib&quot;]</pre><pre># See more keys and their definitions at <a href="https://doc.rust-lang.org/cargo/reference/manifest.html">https://doc.rust-lang.org/cargo/reference/manifest.html</a></pre><pre>[dependencies]</pre><pre>wasm-bindgen = &quot;0.2&quot;</pre><p>In dependencies you will notice that we will import only one dependency called wasm-bindgen. This library is responsible for translating the types utilized on JavaScript and the types used on Rust.</p><p>In src/lib.rs you will find our first implementation of Fibonacci’s algorithm written using Rust that accepts an integer as a parameter. The beginning of the file should look like this:</p><pre>extern crate wasm_bindgen;</pre><pre>use wasm_bindgen::prelude::*;</pre><pre>#[wasm_bindgen]</pre><pre>pub fn fibonacci(n: u32) -&gt; u32 {</pre><p>It declares that we will use an external crate (the name given to Rust packages), imports it to the file and connects this library to our fibonacci function.</p><p>Now, we will run our Rust code and check if is everything ok. To do this you go to the root of the project and run:</p><pre>cargo run</pre><p>This will run the file src/main.rs and the output will be the <br>forty-fifth number of the Fibonacci sequence (I picked this number because it takes reasonable time to run) and the time (in seconds) that the algorithm took to run. Something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*DXecM7C7lYWXiIRu" /></figure><p>Ok, now we will generate our WebAssembly package. To do this run the following command (this can take some time):</p><pre>wasm-pack build --target nodejs</pre><h4>What does this command do?</h4><p>Among other things, it will read your Rust code and generate a WebAssembly module ready to be published on the NPM repository. The flag --target node specifies that you will consume that code with Node, and gives you a code ready to be consumed utilizing the WebAssembly Node API’s.</p><p>After the execution, you will notice that a new folder named pkg was added to the root of the project.</p><pre>simple-wasm/pkg<br>├── package.json<br>├── simple_wasm_bg.d.ts<br>├── simple_wasm_bg.wasm<br>├── simple_wasm.d.ts<br>└── simple_wasm.js</pre><p>There you will find all the files generated by wasm-pack, including one named simple_wasm_bg.wasm, this is your WebAssembly module. You will also find a file name simple_wasm.js that contains a JavaScript code (adapted for Node.js) that consumes the WebAssembly module.</p><p>Cool, now we have our module and we are ready to consume it using Node.js.</p><p>To finish the example we will look to the last two files of the project. First src/fibonacci.js and after src/main.js.</p><p>In the first, you will find our implementation of the Fibonacci algorithm, very close to the one implemented using Rust.</p><pre>const fibonacci = (n) =&gt; {</pre><pre>if (n === 0) return 0</pre><pre>if (n === 1) return 1</pre><pre>return fibonacci(n - 1) + fibonacci(n - 2)</pre><pre>}</pre><pre>module.exports = fibonacci</pre><p>In the second we will import the WebAssembly module and the function made with JavaScript, run one after the other and measure the runtime.</p><pre>const { fibonacci: fibonacciWasm } = require(&#39;../pkg&#39;)</pre><pre>const fibonacciJs = require(&#39;./fibonacci&#39;)</pre><pre>const run = async () =&gt; {</pre><pre>const total = 45</pre><pre>console.log(&#39;Starting!&#39;);</pre><pre>console.time(&#39;wasm-time&#39;);</pre><pre>console.log(fibonacciWasm(total));</pre><pre>console.timeEnd(&#39;wasm-time&#39;);</pre><pre>console.time(&#39;js-time&#39;);</pre><pre>console.log(fibonacciJs(total));</pre><pre>console.timeEnd(&#39;js-time&#39;);</pre><pre>}</pre><pre>run()</pre><p>To do that run the following command on the root of the project:</p><pre>node src/main.js</pre><p>The output should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*XkPL4Vhe5Pn_33hH" /></figure><h4>Conclusion</h4><p>With this simple example, we can notice how easy it is to have access to new functionalities made with WebAssembly. Besides that, we can also notice a considerable performance gain among the executed examples.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e365d5157df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WebAssembly na prática utilizando Node.js e Rust]]></title>
            <link>https://medium.com/pagarme/webassembly-na-pr%C3%A1tica-utilizando-node-js-e-rust-df3c627235bd?source=rss-619e06f84b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/df3c627235bd</guid>
            <category><![CDATA[webassembly]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Vinicius Lopes]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 17:30:50 GMT</pubDate>
            <atom:updated>2020-06-08T20:14:36.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*41dj3GTwY_d1dvc4BzUSNw.png" /></figure><p>Este artigo tem como objetivo mostrar o quão fácil é gerar um código WebAssembly utilizando a linguagem Rust como base e consumi-lo utilizando Node.js. Também pretende mostrar o ganho de performance utilizando o algoritmo de Fibonacci como exemplo.</p><p>Nesse artigo iremos focar na parte mais prática da geração e utilização de um modulo WebAssembly. Caso queira entender um pouco mais do porque usar WebAssembly leia <a href="https://medium.com/pagarme/introdu%C3%A7%C3%A3o-ao-webassembly-67979bd211f7">esse artigo</a>.</p><h3><strong>Setup</strong></h3><p>Iremos utilizar o código que já está pronto nesse <a href="https://github.com/vlopes/simple-wasm">repositório</a> como exemplo.</p><p>Para conseguirmos executar o projeto precisaremos ter instalado:</p><ul><li><a href="https://nodejs.org/en/download/">Node.js</a> v12.18</li><li><a href="https://www.rust-lang.org/tools/install">Rust e Cargo</a> v1.42 (gerenciador de pacotes do Rust)</li><li><a href="https://rustwasm.github.io/wasm-pack/installer/">wasm-pack</a> v0.9.1 (para compilar o código Rust para WebAssembly)</li></ul><h3><strong>Executando o projeto</strong></h3><p>Primeiro vamos clonar o projeto:</p><pre><em>git clone git@github.com:vlopes/simple-wasm.git</em></pre><p>Agora vamos navegar pelo projeto e entender alguns pontos importantes.</p><pre>simple-wasm<br>├── Cargo.toml<br>├── readme.md<br>└── src<br>    ├── fibonacci.js<br>    ├── lib.rs<br>    ├── main.js<br>    └── main.rs</pre><p>Na raiz do projeto, você verá um arquivo chamado Cargo.toml. Esse arquivo é responsável por controlar as dependências de um projeto feito em Rust, seu processo de build, etc.</p><pre>[package]</pre><pre>name = &quot;simple-wasm&quot;</pre><pre>version = &quot;0.1.0&quot;</pre><pre>authors = [&quot;Vinicius Domingues &lt;vinicius.ld@outlook.com&gt;&quot;]</pre><pre>edition = &quot;2018&quot;</pre><pre>[lib]</pre><pre>crate-type = [&quot;cdylib&quot;]</pre><pre># See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html</pre><pre>[dependencies]</pre><pre>wasm-bindgen = &quot;0.2&quot;</pre><p>Você encontrará uma sessão chamada ‘<em>dependencies</em>’, nela só importaremos uma dependência chamada ‘<em>wasm-bindgen</em>’. Essa biblioteca é responsável por fazer uma ponte entre os os tipos utilizados no JavaScript e no Rust.</p><p>Indo para o arquivo src/lib.rs, você encontrará a nossa primeira implementação do algoritmo de Fibonacci, feita em Rust, que aceita um inteiro como parâmetro. Nesse arquivo, nas primeiras linhas encontraremos o seguinte código:</p><pre>extern crate wasm_bindgen;</pre><pre>use wasm_bindgen::prelude::*;</pre><pre>#[wasm_bindgen]</pre><pre>pub fn fibonacci(n: u32) -&gt; u32 {</pre><p>De forma resumida ele declara que iremos usar uma crate (nome dado aos pacotes do Rust) externa, importa esse código externo para o arquivo e conecta a biblioteca a nossa função ‘fibonacci’.</p><p>Após isso iremos executar o nosso código Rust e checar se está tudo correto. Para isso iremos utilizar o comando cargo run na raiz do projeto.</p><p>Isso executará o arquivo src/main.rs. O output será o quadragésimo quinto número da sequência de Fibonacci (utilizei esse número porque já temos uma certa “demora” de processamento) e o tempo (em segundos) que o algoritmo levou para ser executado. Algo mais ou menos assim:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*DXecM7C7lYWXiIRu" /></figure><p>Agora iremos gerar o nosso codigo WebAssembly. Para isso use o comando (ele pode demorar um bocado):</p><pre>wasm-pack build --target nodejs</pre><h4>O que esse comando faz?</h4><p>Entre outras coisas ele irá gerar um pacote utilizando o seu codigo Rust como base, e o deixará pronto para ser publicado no NPM. A flag --target node irá gerar um codigo utilizando as APIs do node para consumir módulos WebAssembly.</p><p>Após a sua execução, você poderá notar uma nova pasta na raiz do projeto chamada pkg.</p><pre>simple-wasm/pkg<br>├── package.json<br>├── simple_wasm_bg.d.ts<br>├── simple_wasm_bg.wasm<br>├── simple_wasm.d.ts<br>└── simple_wasm.js</pre><p>Nela você encontrará todos os arquivos gerados pelo wasm-pack, incluindo um chamado simple_wasm_bg.wasm, que contém todo o código WebAssembly. Também haverá um arquivo chamado simple_wasm.js, que contém um código JavaScript (adaptado para Node.js) que consome o módulo WebAssembly.</p><p>Show, agora temos o nosso módulo e estamos prontos para chamá-lo utilizando o Node.js.</p><p>Para finalizar o exemplo, iremos olhar os dois últimos arquivos do projeto, primeiro o src/fibonacci.js e depois o src/main.js.</p><p>No primeiro, você irá encontrar uma implementação simples do algoritmo de Fibonacci da forma mais parecida possível com o exemplo feito em Rust.</p><pre>const fibonacci = (n) =&gt; {</pre><pre>    if (n === 0) return 0<br></pre><pre>    if (n === 1) return 1</pre><pre>    return fibonacci(n - 1) + fibonacci(n - 2)</pre><pre>}</pre><pre>module.exports = fibonacci</pre><p>No segundo, iremos importar o código WebAssembly e a função feita em JavaScript, e executaremos os dois, consecutivamente, e medir o tempo de execução.</p><pre>const { fibonacci: fibonacciWasm } = require(&#39;../pkg&#39;)</pre><pre>const fibonacciJs = require(&#39;./fibonacci&#39;)</pre><pre>const run = async () =&gt; {</pre><pre>    const total = 45</pre><pre>    console.log(&#39;Starting!&#39;);</pre><pre>    console.time(&#39;wasm-time&#39;);</pre><pre>    console.log(fibonacciWasm(total));</pre><pre>    console.timeEnd(&#39;wasm-time&#39;);</pre><pre>    console.time(&#39;js-time&#39;);</pre><pre>    console.log(fibonacciJs(total));</pre><pre>    console.timeEnd(&#39;js-time&#39;);</pre><pre>}</pre><pre>run()</pre><p>Para isso na raiz do projeto execute o comando node src/main.js. O output será algo parecido com isso:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*XkPL4Vhe5Pn_33hH" /></figure><h4><strong>Conclusão</strong></h4><p>Com esse exemplo simples podemos notar como é fácil ter acesso a funcionalidades escritas em outras linguagens através do WebAssembly. Além disso também podemos notar um considerável ganho de performance entre os exemplos executados.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df3c627235bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pagarme/webassembly-na-pr%C3%A1tica-utilizando-node-js-e-rust-df3c627235bd">WebAssembly na prática utilizando Node.js e Rust</a> was originally published in <a href="https://medium.com/pagarme">pagarme</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to WebAssembly]]></title>
            <link>https://medium.com/@vinicius.ld/introduction-to-webassembly-ac3ef5649057?source=rss-619e06f84b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac3ef5649057</guid>
            <category><![CDATA[wasm]]></category>
            <category><![CDATA[webassembly]]></category>
            <dc:creator><![CDATA[Vinicius Lopes]]></dc:creator>
            <pubDate>Wed, 29 Apr 2020 22:20:10 GMT</pubDate>
            <atom:updated>2020-04-29T22:20:10.645Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alfciceBiRs6eS0xyGJKyg.png" /></figure><p>This article aims to give a brief introduction to WebAssembly and its benefits.</p><h3>Motivation</h3><p>WebAssembly has been going through my mind quite often. I still remember the first time I heard about this new technology and an example where a game was running on the front end with a very good performance using only WebAssembly.</p><p>Since then I always come across an article talking about how big companies use WebAssembly to improve their services adding performance, new features, etc.</p><p>So I thought:</p><blockquote>“Is this technology so complex that only big companies can handle it? Or it’s simple and easy to deal with?”</blockquote><p>And then I started to dig.</p><h3>What is WebAssembly?</h3><p>According to Mozilla MDN:</p><blockquote>“WebAssembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as C/C++ and Rust with a compilation target so that they can run on the web. It is also designed to run alongside JavaScript, allowing both to work together.<em>”</em></blockquote><p>So, you can write code in other languages (whether they are low or high level), generate a WebAssembly code that has a compact format and runs in an almost native performance, and brings new functionality to the front-end.</p><p>How cool is that?</p><p>With WebAssembly we could reutilize a processing image library written in C on the front-end. Or even we could utilize an artificial intelligence library written in Python on the front-end without rewrite it.</p><p>Think of the possibilities.</p><p>An important thing to notice is that WebAssembly isn’t there to replace JavaScript but to work along with it.</p><p>“But Vinicius, this story looks too good to be true. It must have some utilization problem or something like that.”</p><h3>Compatibility</h3><p>Recently WebAssembly has high compatibility across the most browsers.</p><p>Using <a href="https://caniuse.com/">caniuse.com</a> you can check the compatibility of new features across different browsers and its versions.</p><p>Here you can see a print of the table showing the compatibility of WebAssembly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/0*KHnM2gnZkK8ThB75" /></figure><p>On the top right corner, you can see that it has a 90% compatibility with all browsers (I had to limit the results to fit the print. In case of interest you can see everything <a href="https://caniuse.com/#feat=wasm">here</a>).</p><h3>Projects made with WebAssembly</h3><p>After discovering all of that I got curious to know who was using WebAssembly on nowadays, and then I found <a href="https://madewithwebassembly.com/">madewithwebassembly.com</a>. It has a big collection of projects that utilize this technology and explain how it adds value to them. I separated three examples that I found interesting in different areas:</p><h3>Tensorflow</h3><p>Tensorflow is a library made to train and deploy machine learning models. <a href="https://yashints.dev/blog/2019/12/17/tfjs-wasm">In this post</a>, they explain how they started to use WebAssembly to train their models and how they reached results with a ten times better performance.</p><h3>Unity</h3><p>For those who don’t know, Unity is a cross-platform game engine. So, using Unity, with the same code, you can distribute your game across multiple platforms. <a href="https://blogs.unity3d.com/2018/08/15/webassembly-is-here/">In this post of 2018</a>, they announced the possibility of publishing games for the web utilizing WebAssembly, and they describe its benefits, since the amount of code that it generates to the improvement on memory utilization.</p><h3>Google Earth</h3><p>Google Earth is a software developed by Google that renders a 3D model of the Earth and allows the user to move it and zoom wherever he wants. <a href="https://blog.chromium.org/2019/06/webassembly-brings-google-earth-to-more.html">In this post</a>, they explain how WebAssembly helped to make Google Earth compatible with more browsers.</p><p>This article is separated into two parts. This is more focused on the theory of WebAssembly and the second is a more practical one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac3ef5649057" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introdução ao WebAssembly]]></title>
            <link>https://medium.com/pagarme/introdu%C3%A7%C3%A3o-ao-webassembly-67979bd211f7?source=rss-619e06f84b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/67979bd211f7</guid>
            <category><![CDATA[webassembly]]></category>
            <dc:creator><![CDATA[Vinicius Lopes]]></dc:creator>
            <pubDate>Wed, 29 Apr 2020 12:25:33 GMT</pubDate>
            <atom:updated>2020-04-29T22:19:28.153Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alfciceBiRs6eS0xyGJKyg.png" /></figure><p><em>Este artigo tem como objetivo dar uma breve introdução ao WebAssembly e seus benefícios.</em></p><h3><strong>Motivação</strong></h3><p>WebAssembly tem passado pela minha cabeça por uma certa frequência. Lembro até hoje da primeira vez que ouvi falar sobre essa nova tecnologia e de um exemplo onde um jogo era executado no front-end com uma performance muito boa utilizando apenas WebAssembly.</p><p>Desde então sempre esbarro com algum artigo falando sobre como grandes empresas utilizam WebAssembly para melhorar seus serviços agregando performance, novas funcionalidades e etc.</p><p>Foi então que me surgiu uma dúvida:</p><blockquote>“Será que essa tecnologia é tão complexa assim que apenas grandes empresas conseguem utilizá-la ou é uma tecnologia simples e fácil de lidar?”.</blockquote><p>E então eu comecei a pesquisar.</p><h3><strong>O que </strong>é<strong> WebAssembly</strong></h3><p>Segundo o Mozilla MDN:</p><blockquote>“O WebAssembly é um novo tipo de código que pode ser executado em navegadores modernos — é uma linguagem de baixo nível, semelhante ao assembly, com um formato binário compacto, executado com desempenho quase nativo e fornece a linguagens como C / C++ e Rust com um destino de compilação para que eles possam ser executados na web. Ele também foi projetado para funcionar com o JavaScript, permitindo que ambos trabalhem juntos.”</blockquote><p>Então, basicamente, você pode escrever código em outras linguagens (sejam elas de baixo ou alto nível), gerar um código WebAssembly que tem um formato mais compacto e executa com um desempenho quase nativo e trazer essa nova funcionalidade para o front-end. O quão legal é isso?</p><p>Com o WebAssembly nós poderíamos utilizar uma biblioteca de processamento de imagem feita em C e utilizá-la no front-end. Ou até mesmo utilizar uma biblioteca de inteligência artificial feita em Python sem precisar reescrever algum código dela.</p><p>Pense nas possibilidades.</p><p>Uma coisa importante de notar é que o WebAssembly não veio para substituir o JavaScript no front-end e sim para trabalharem lado a lado.</p><blockquote>“Mas Vinicius, essa história parece boa demais pra ser verdade. Ele teve ter algum problema de utilização ou algo do tipo.”</blockquote><h3><strong>Compatibilidade na Web</strong></h3><p>Atualmente o WebAssembly tem uma alta compatibilidade com os mais diversos browsers.</p><p>Utilizando o site <a href="https://caniuse.com/">caniuse.com</a> você consegue checar a compatibilidade de novas features através dos diferentes tipos de browsers e suas versões.</p><p>Segue um print da tabela de compatibilidade do WebAssembly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/0*8UH1tsWIYtsO98Dg" /></figure><p>No canto superior direito você pode ver que ele apresenta compatibilidade com 90% de todos os browsers (eu tive que limitar um pouco os resultados mostrados para caber no print, caso tenha interesse em ver tudo você pode clicar <a href="https://caniuse.com/#feat=wasm">aqui</a>).</p><h3><strong>Projetos feitos com WebAssembly</strong></h3><p>Depois de descobrir tudo isso fiquei curioso pra saber quem estava utilizando WebAssembly nos dias de hoje, e encontrei o site <a href="https://madewithwebassembly.com/">madewithwebassembly.com</a>. Ele tem uma grande coleção de projetos que utilizam essa tecnologia e explica como ela agrega valor para eles. Separei três exemplos que achei interessante em áreas totalmente diferentes:</p><h4><strong>Tensorflow</strong></h4><p>Tensorflow é uma biblioteca feita para treinar e deployar modelos de machine learning. <a href="https://yashints.dev/blog/2019/12/17/tfjs-wasm">Nesse post</a> eles explicam como começaram a utilizar WebAssembly para treinar os modelos e como atingiram resultados com um tempo até dez vezes melhor.</p><h4><strong>Unity</strong></h4><p>Para quem não conhece, Unity é uma engine utilizada para desenvolvimento de jogos onde com o mesmo código você consegue distribuir o seu jogo através de diversas plataformas. <a href="https://blogs.unity3d.com/2018/08/15/webassembly-is-here/">Nesse post de 2018</a> eles anunciam a possibilidade de começar a publicar jogos para web utilizando WebAssembly e detalham seus benefícios, desde a quantidade de código até a melhoria na utilização da memória.</p><h4><strong>Google Earth</strong></h4><p>O Google Earth é um programa desenvolvido pela Google que renderiza um modelo 3D da terra e possibilita que o usuário possa movê-lo e dar zoom em qualquer área que quiser. <a href="https://blog.chromium.org/2019/06/webassembly-brings-google-earth-to-more.html">Nesse post no blog do chromium</a> eles explicam como o WebAssembly ajudou eles a trazer o Google Earth para mais browsers.</p><p>Este artigo será dividido em duas partes. Essa que foca na parte mais teórica do WebAssembly e a segunda que conta com um exemplo prático.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67979bd211f7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pagarme/introdu%C3%A7%C3%A3o-ao-webassembly-67979bd211f7">Introdução ao WebAssembly</a> was originally published in <a href="https://medium.com/pagarme">pagarme</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>