Skip to content

This repository contains example code for a demo i did during a presentation. It shows interoperability between JS and WASM compiled from Rust.

License

Notifications You must be signed in to change notification settings

DennisSimon/wasm-interop-example

Repository files navigation

Wasm/JS Interop example

This repository contains example code for a demo i did during a presentation.
It shows interoperability between JS and WASM compiled from Rust.

It utilizes the wasm-bindgen crate to bind javascript functions in wasm and expse wasm functions to javascript.

How to use

Basic setup

To get started you will need to setup a rust toolchain.
If you are using VS Code i would also recommend the Rust (rls) extension.

Install dependencies

To install Javascript dependencies, simply run the yarn command from your cli in the project root.
Rust dependencies should be installed automatically, if they are not run cargo build.

Development server

To run the development server, run yarn serve.
You will be able to access it on localhost:8080 by default.

Build

You shouldn't need to build the project, if you wish to do so nevertheless, run yarn build

About

This repository contains example code for a demo i did during a presentation. It shows interoperability between JS and WASM compiled from Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published