Skip to content
rickycodesPublic

About

my website built using Rust (wasm-bindgen) → .wasm

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Repository files navigation

Build And Deploy Pages Shellcheck Status FOSSA Status

   +---------------+
   |.-------------.|
   ||    ricky    ||
   ||     dot     ||
   ||    codes    ||
   ||$ ./build.sh ||
   |+-------------+|
   +-..---------..-+
   .---------------.
  / /=============\ \
 / /===============\ \
/_____________________\
\_____________________/

My personal website, built with Rust, wasm-bindgen, and web-sys.

Screenshot of ricky.codes

Prerequisites

The repository pins stable Rust and the wasm32-unknown-unknown target in rust-toolchain.toml. Install the matching WebAssembly packager and the Node build tools:

cargo install wasm-bindgen-cli --version 0.2.128 --locked
npm ci

wasm-strip from WABT is an optional local size pass. Rust's release profile handles optimization while preserving the tables generated by wasm-bindgen.

Build

Generate the static HTML, compile Rust, package the browser-ready ES module, and minify the JavaScript:

./build.sh

The deployable site is written to target/deploy. Individual phases are also available:

./build.sh --generate
./build.sh --build-wasm
./build.sh --minify
./build.sh --test

Run locally

./build.sh --watch

This builds the site and serves target/deploy at http://127.0.0.1:8000. If watchexec is installed, changes under src and static trigger a rebuild.

License

Licensed under the MIT license (LICENSE or https://opensource.org/licenses/MIT).

FOSSA Status

About

my website built using Rust (wasm-bindgen) → .wasm

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages