Skip to content

vlopes/simple-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simple-wasm

A small attempt to show how WebAssembly works, it's performance improvements and how simple it can be.

I have implemented the Fibonacci algorithm both in Javascript and Rust. Here you can test it in both languages and using WebAssembly to see the performance improvement.

How to it works ?

Dependencies

To run this project you need:

Usage

First, run wasm-pack build --target nodejs inside the project folder.

This will compile the Rust code to WebAssembly and create a pkg folder on the project root ready to be used by a Node.Js application.

To test the Rust function run cargo run.

To Test the JS function and the WebAssembly version run node src/main.js

About

Attempt to explain WebAssembly in a simple way using Rust and Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors