Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uncomputable/rust-wasm-ffi
Minimal website that exposes C functions via WASM
https://github.com/uncomputable/rust-wasm-ffi
c ffi javascript rust rust-wasm tutorial wasm
Last synced: about 1 month ago
JSON representation
Minimal website that exposes C functions via WASM
- Host: GitHub
- URL: https://github.com/uncomputable/rust-wasm-ffi
- Owner: uncomputable
- License: cc0-1.0
- Created: 2024-01-22T16:51:08.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-01-29T15:41:37.000Z (12 months ago)
- Last Synced: 2024-01-29T18:52:43.874Z (12 months ago)
- Topics: c, ffi, javascript, rust, rust-wasm, tutorial, wasm
- Language: Rust
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust, WASM and C FFI
Deploy a minimal website that exposes C functions via WASM.
Makes use of [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen).
Targets wasm32-unknown-unknown.
## Enter the development environment
Enter the nix-shell. Yes, it includes a web browser.
```
nix-shell
```## Build the website
Deploy the website locally and visit it in the browser.
```
just serve
just visit
```Don't forget to kill the web server daemon when you finish.
```
just kill
```## Run the unit tests
Run the unit tests in a headless web browser.
```
wasm-pack test --headless --firefox
```