A demonstration in Rust + WebAssembly to set the background color of a webpage
.
├── src
│ └── lib.rs
│ └── colors.rs
├── target
│ └── wasm32-unknown-unknown
│ └── release
│ └── color-me-rusty.wasm
├── color-me-rusty.gc.wasm
├── Cargo.lock
├── Cargo.toml
├── index.html
├── index.js
└── README.md
$ curl https://sh.rustup.rs -sSf | sh
See also: The Rust Programming Language Book
$ rustup toolchain install nightly
$ rustup update
$ rustup target add wasm32-unknown-unknown --toolchain nightly
$ cargo install --git https://github.com/alexcrichton/wasm-gc
$ cargo +nightly build --target wasm32-unknown-unknown --release
$ wasm-gc target/wasm32-unknown-unknown/release/color-me-rusty.wasm -o color-me-rusty.gc.wasm
Thank you to the following people for contributing ideas and enthusiasm and/or pairing with me!