RSSAmplifier

Blog

Hello, Rust!

Rust for the Web

hellorust.comRSS feed ↗15 posts

Latest posts

Site deprecation, check out RustWasm

This site hasn't been updated in over a year. Since then a lot of stuff happened in Rust and the WebAssembly world. The Rust and WebAssembly working group was founded and now provides a lot of tooling, documentation, tutorials and other material. For a complete introduction to Rust and WebAssembly check out the Rust 🦀 and WebAssembly 🕸 book .

More News on WebAssembly

Another week has passed and work on WebAssembly, documentation, tooling and usage is not stopping. Here's a recap of what happened recently: Oxidizing Source Maps with Rust and WebAssembly Nick Fitzgerald and Tom Tromey rewrote one of the most performance-sensitive code paths for source map parsing, that's used in JavaScript debuggers and other applications. Using Rust compiled to WebAssembly they…

Turtles on Wasm

Marshall Pierce recently added WebAssembly support to the Turtle application. Turtle is a programming environment allowing to create animated drawings with a handful of simple commands. It's the perfect tool to teach programming and foster creativity. Bringing it to the web makes it even more accessible. He wrote down his approach for adding Wasm support: Rust and WebAssembly With Turtle With a…

New Year's Roundup

The last post on here was a while back. Since then a lot of things happened in the Rust and WebAssembly world, so here's a quick roundup to get up to speed. YEW - a framework for client-side web-apps Inspired by Elm and ReactJS it has a MVC approach, a virtual DOM, HTML templates with Rust inside and data conversions built-in. And apparently it's fast as well as benchmarks show . Support for…

Link: Wasm Rust CHIP8 - A CHIP8 emulator written in Rust running Wasm

Colin Eberhardt has written a CHIP-8 emulator in Rust and targeted it for WebAssembly. Read how he did it: Writing a CHIP-8 emulator with Rust and WebAssembly The post contains a detailed break down of how to write an emulator, along with the challenges of sharing data between Rust and WebAssembly.

Importing memory

I added a new small example demonstrating how to instantiate a memory buffer from the JavaScript side and import it into the WebAssembly module. Import memory I also added another canvas demo showing the FizzleFade effect with a Feistel network .

Link: Rust and the case for WebAssembly in 2018

Michael Gattozzi discusses WebAssembly and what it can mean for Rust. He proposes some possible short-term, medium-term and long-term goals for the Rust 2018 roadmap. Rust and the case for WebAssembly in 2018 The future of Rust & WebAssembly definitely needs a lot of work, but we're off to a good start to make Rust the language of choice here.

Link: Semver on the web with Rust and WebAssembly

Steve Klabnik built a Rust-powered minimal clone of the npm semver calculator using Rust and WebAssembly. Semver on the web with Rust and WebAssembly It has less features, but otherwise fully working.

Link: Writing a Brainfuck Interpreter in Rust (and WebAssebmly)

Shritesh Bhattarai wrote a blog post about a simple Brainfuck interpreter written in Rust, compiled to WebAssembly: Writing a Brainfuck Interpreter in Rust (and WebAssembly) The source is available on GitHub: github.com/shritesh/brainfuck-rs-wasm and a live version available online .

Link: Rocket - A Rust game running on Wasm

Adolfo Ochagavía adapted his game Rocket to WebAssembly to run in the browser. Read how he did it: Rocket - A Rust game running on WASM The post includes the game running right there in the browser.

Writing to Canvas

Geoffroy added a new example: Generating image data displayed on a canvas. Canvas example Caution: The example will display a flickering image after you press the start button. See the included comments and documentation on how it works.

Factorial with 64-bit integers

I rewrote the factorial example to use 64-bit integers and do the formatting in Rust (and thus WebAssembly), so larger values are displayed correctly. Factorial example (This also adds proper deallocation of the formatted strings)

Minimal Rust & WebAssembly example

You can now find a minimal working example for compiling Rust to WebAssembly and runnig it in the browser in the demos section: Minimal working example The resulting WebAssembly modules is only 108 bytes big. Consider that minimal.

wasm32-unknown-unknown landed & enabled

Yesterday the Pull Request 46115: "rustbuild: Enable WebAssembly backend by default" was merged into Rust master. With the Nightly build from that night, the wasm32-unknown-unknown target is natively available. Once you install that nightly (or any later one from now on), you can compile to WebAssembly without additional tools: rustup update rustup target add wasm32-unknown-unknown --toolchain…

Hello, Rust! Hello, WebAssembly!

hellorust.com is live! This site will collect resources, guides, articles and links around Rust & WebAssembly. If you want to help or have more resources we should add, open an issue or send a Pull Request to github.com/badboy/hellorust . To get started, head over to the Setup section or take a look at some example code .