Skip to content

Test app building wasm module in rust using wasm-pack

Notifications You must be signed in to change notification settings

sphillips/hello-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Rust & WASM App

Built with:

Steps to create and build

  1. Develop: Add code to lib.rs
  2. Build: Run wasm-pack build --target web from the project root
  3. Import and run code in JavaScript (index.html):
    <script type="module">
      import init, { add } from "./pkg/hello_wasm.js";

      await init();

      console.log(add(1, 2));
    </script>
  1. Run web server e.g. python3 -m http.server

About

Test app building wasm module in rust using wasm-pack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published