https://github.com/juliancataldo/astro-nannou-starter
A minimal boilerplate for Astro / Vite with the Nannou creative framework (Rust → WASM). Supports multiple sketches + hot-reload.
https://github.com/juliancataldo/astro-nannou-starter
astro bundler creative-coding hot-reload nannou rust vite wasm wasm-pack
Last synced: about 2 months ago
JSON representation
A minimal boilerplate for Astro / Vite with the Nannou creative framework (Rust → WASM). Supports multiple sketches + hot-reload.
- Host: GitHub
- URL: https://github.com/juliancataldo/astro-nannou-starter
- Owner: JulianCataldo
- License: isc
- Created: 2022-12-15T11:29:21.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T20:40:04.000Z (over 2 years ago)
- Last Synced: 2025-03-09T10:48:09.609Z (about 2 months ago)
- Topics: astro, bundler, creative-coding, hot-reload, nannou, rust, vite, wasm, wasm-pack
- Language: Rust
- Homepage: https://juliancataldo.github.io/astro-nannou-starter/
- Size: 174 KB
- Stars: 32
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# _Astro_ x _Nannou_ Starter
https://user-images.githubusercontent.com/603498/210013817-1866e0bb-427f-444b-92cb-172f94d26cb0.mov
🕹 [**Try it** online!](https://juliancataldo.github.io/astro-nannou-starter/)
---
```
# 0a. Rust language tools
open https://www.rust-lang.org/tools/install# 0b. wasm-pack
open https://rustwasm.github.io/wasm-pack/installer# 1. rsw = rs(rust) → w(wasm)
cargo install rsw# 2. Install NodeJS dependencies
pnpm i# 3a. Launch AstroJS + rsw (dev.)
pnpm dev:rsw# 3b. Build all (prod.)
pnpm build:rsw
```See also the full **GitHub workflow**: [./.github/workflows/release.yml](./.github/workflows/release.yml).
Can be tested locally with [Act, a GitHub workflow runner](https://github.com/nektos/act).## 🍾 Result
## References
- https://github.com/tomoyanonymous/nannou-web-template (w. Webpack)
- https://github.com/rwasm/vite-plugin-rsw
- https://github.com/rwasm/rsw-rs
- https://nannou.cc
- https://github.com/rustwasm/wasm-pack## Would be nice to have
- Dynamic sketch switcher
- Multiple sketch per page (without iframe)---
🔗 [JulianCataldo.com](https://www.juliancataldo.com/)