Skip to content

Code for the examples from the WebAssembly talk given at the Webmontag Meetup in Kassel.

Notifications You must be signed in to change notification settings

jens-siebert/webassembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

WebAssembly

Code for the examples from the WebAssembly talk given at the Webmontag Meetup in Kassel.

Requirements

Getting started

  • Clone this repo.
  • Open a Terminal at the position where you've cloned the repo.
  • If not already done, install the Rust compiler's WASM target: rustup target add wasm32-unknown-unknown

Run the JS-API example

  • Go to the js-api folder
  • Run cargo build
  • Run http-server
  • In a browser open http://localhost:8080
  • Output should be similar to this:

Bildschirmfoto 2023-11-21 um 18 43 35

Run the wasm-pack web example

  • Go to the wasm-pack folder
  • If not already done, run cargo install wasm-pack
  • Run wasm-pack build --target web
  • Run http-server
  • In a browser open http://localhost:8080
  • Output should be similar to this:

Bildschirmfoto 2023-11-21 um 19 18 31

Run the wasm-pack node.js example

  • Go to the wasm-pack folder
  • If not already done, run cargo install wasm-pack
  • Run wasm-pack build --target nodejs
  • Run node index.js
  • Output should be similar to this:

Bildschirmfoto 2023-11-22 um 18 28 06

Run the WASM runtime example

  • Go to the js-api folder
  • Run cargo build
  • Run wasm3 --func factorial target/wasm32-unknown-unknown/debug/js_api.wasm 10
  • Output should be similar to this:

Bildschirmfoto 2023-11-22 um 18 34 11

About

Code for the examples from the WebAssembly talk given at the Webmontag Meetup in Kassel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published