Skip to content

vinzdef/welder

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

welder

Rust Worker

Tonight I slept quite well, for the first time in a while I did't wake up with any back pain, and I dreamt so well!

In the dream I could see events being dispatched in the form of actions, flowing from the main thread to a WebWorker, which would alwyas send back a perfectly computed state tree for the main thread to render.

But something was off... it wasn't the usual offloading of resource-intensive computations to a separate thread...

The WebWorker was piping data trough a WebAssembly complied Rust backend!!!


This is a Proof of Concept.

How to run this sample application?

Just run a web server in the root and use a modern browser.

There's a convenient ./compile script that re-compiles src/rust/main.rs.

For it to work you need rustc and enabled wasm32-unknown-unknown target.