https://github.com/avrabe/node-wasm-example
https://github.com/avrabe/node-wasm-example
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/avrabe/node-wasm-example
- Owner: avrabe
- Created: 2024-01-22T17:40:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-12T07:27:51.000Z (11 months ago)
- Last Synced: 2025-04-13T12:57:38.554Z (about 1 month ago)
- Language: JavaScript
- Size: 564 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-wasm-example
[](https://github.com/avrabe/node-wasm-example/actions/workflows/webpack.yml)
Preparations
```sh
# Append nvm to zsh on Mac OS X
touch ~/.zshrc
# Install node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Reopen shell/terminal
nvm install node
```Example without typescript
```sh
# Install rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add WASM-WASI as build target
rustup target add wasm32-wasi
# Install cargo component
cargo install cargo-component --locked
``````sh
npm install
npm run jco
node src/hello.mjs
```Example using typescript
```sh
npm install
npm run start
```