https://github.com/rixrix/rust-wasm-greetings
This repository contains a simple demonstration of how to achieve interoperation between JavaScript and Rust.
https://github.com/rixrix/rust-wasm-greetings
nodejs rust rust-lang wasm wasm-bindgen
Last synced: 11 months ago
JSON representation
This repository contains a simple demonstration of how to achieve interoperation between JavaScript and Rust.
- Host: GitHub
- URL: https://github.com/rixrix/rust-wasm-greetings
- Owner: rixrix
- License: mit
- Created: 2023-06-18T05:28:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-18T08:27:47.000Z (over 2 years ago)
- Last Synced: 2025-01-23T05:15:17.406Z (about 1 year ago)
- Topics: nodejs, rust, rust-lang, wasm, wasm-bindgen
- Language: HTML
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Demo Rust + WASM

A simple demo about
- calling JS functions from Rust
- calling Rust functions from JS
# Requirements
- NodeJS v18+ https://nodejs.org/en/download
- Rust, https://www.rust-lang.org/tools/install
# Install
- install npm packages
- install wasm-pack, via `cargo install wasm-pack`
# Building
```
$> wasm-pack build --target web
```
# Running
```
$> npx http-server
```
go to http://localhost:8080