A minimal boilerplate for Astro / Vite with the Nannou creative framework (Rust → WASM). Supports multiple sketches + hot-reload.

Overview

Astro x Nannou Starter

astro-nannou-demo-1c.mov

🕹   Try it online!


# 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.
Can be tested locally with Act, a GitHub workflow runner.

🍾   Result

astro-nannou-starter-1

References

Would be nice to have

  • Dynamic sketch switcher
  • Multiple sketch per page (without iframe)

🔗   JulianCataldo.com

You might also like...
Bad Apple!! music video on WASM-4

w4-bad-apple Bad Apple!! music video on the WASM-4 fantasy console. Building First, you need to create a frames directory containing an image for each

This experiment shows connecting wasm-bindgen generated code to a good-web-game application.

GWG + wasm-bindgen example This experiment shows connecting wasm-bindgen generated code to a good-web-game application. It uses simple_logger crate to

Operating system based off of blog_os, with the goal of running wasm modules as executables

yavkOS - A OS that attempts at running WASM modules as userspace programs Recommended Development Environment You need nix with the flakes, and nix-co

Integra8 rust integration test framework Rust with a focus on productivity, extensibility, and speed.

integra8 Integra8 rust integration test framework Rust with a focus on productivity, extensibility, and speed. | This repo is in a "work in progress"

A recommender systems framework for Rust

Quackin Release the quackin! 🦆 Quackin is a recommender systems framework written in Rust. This is a young project, which means two things: There wil

Safe Rust bindings to the DynamoRIO dynamic binary instrumentation framework.

Introduction The dynamorio-rs crate provides safe Rust bindings to the DynamoRIO dynamic binary instrumentation framework, essentially allowing you to

Rust bindings to the dos-like framework
Rust bindings to the dos-like framework

dos-like for Rust   This project provides access to Mattias Gustavsson's dos-like framework, so as to write DOS-like applications in Rust. How to use

A developer-friendly framework for building user interfaces in Rust
A developer-friendly framework for building user interfaces in Rust

Reading: "Fru" as in "fruit" and "i" as in "I" (I am). What is Frui? Frui is a developer-friendly UI framework that makes building user interfaces eas

Indeed, an ORM library, not a framework, written in Rust

Ormlib Indeed, an ORM library, not a framework, written in Rust Features The main idea that I put into my ORM library is a minimum of stupid code and

Comments
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • crates/hello-world/Cargo.toml (cargo)
    • crates/nannou-1/Cargo.toml (cargo)
    • .github/workflows/release.yml (github-actions)
    • package.json (npm)

    Configuration

    🔡 Renovate has detected a custom config for this PR. Feel free to ask for help if you have any doubts and would like it reviewed.

    Important: Now that this branch is edited, Renovate can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.

    What to Expect

    With your current configuration, Renovate will create 6 Pull Requests:

    chore(deps): update pnpm/action-setup action to v2.2.4
    • Schedule: ["at any time"]
    • Branch name: renovate/pnpm-action-setup-2.x
    • Merge into: master
    • Upgrade pnpm/action-setup to v2.2.4
    chore(deps): update rust-wasm-bindgen monorepo
    • Schedule: ["at any time"]
    • Branch name: renovate/rust-wasm-bindgen-monorepo
    • Merge into: master
    • Upgrade js-sys to 0.3.60
    • Upgrade wasm-bindgen-futures to 0.4.33
    • Upgrade web-sys to 0.3.60
    fix(deps): update rust crate console_error_panic_hook to 0.1.7
    • Schedule: ["at any time"]
    • Branch name: renovate/console_error_panic_hook-0.x
    • Merge into: master
    • Upgrade console_error_panic_hook to 0.1.7
    chore(deps): update rust crate futures to 0.3.25
    • Schedule: ["at any time"]
    • Branch name: renovate/rust-futures-monorepo
    • Merge into: master
    • Upgrade futures to 0.3.25
    fix(deps): update rust crate async-std to 1.12.0
    • Schedule: ["at any time"]
    • Branch name: renovate/async-std-1.x
    • Merge into: master
    • Upgrade async-std to 1.12.0
    chore(deps): update actions/cache action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-cache-3.x
    • Merge into: master
    • Upgrade actions/cache to v3

    🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or overwhelm the project. See docs for prhourlylimit for details.


    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
Owner
Julian Cataldo
Transmedia design with code.
Julian Cataldo
Simple and performant hot-reloading for Rust

reloady Simple, performant hot-reloading for Rust. Requires Rust nightly and only works on Linux for now. installing CLI To install the CLI helper car

Anirudh Balaji 24 Aug 5, 2022
Rust crate: Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation.

overloaded_literals   Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation. Features Compile-time vali

Qqwy / Marten 6 Apr 14, 2023
Rust language from simple to deep, and then to strengthen learning in multiple module

Rust Library This project is used to learn rust language from simple to deep, and then to strengthen learning in multiple module. It is used to help n

Summer 1 Sep 19, 2022
Custom deserialization for fields that can be specified as multiple types.

serde-this-or-that Custom deserialization for fields that can be specified as multiple types. This crate works with Cargo with a Cargo.toml like: [dep

Ritvik Nag 7 Aug 25, 2022
A tool and library to losslessly join multiple .mp4 files shot with same camera and settings

mp4-merge A tool and library to losslessly join multiple .mp4 files shot with same camera and settings. This is useful to merge multiple files that ar

Gyroflow 7 Jan 2, 2023
Repo for apps for the Pocket RISC-V core for Analogue Pocket/OpenFPGA. Multiple branches.

This is a repo meant to host Rust programs for agg23's Pocket RISC-V platform. While Rust can be built out of the openfpga-litex repo directly, this r

null 3 Dec 12, 2023
A minimal version of 'grep' implemented in Rust. Exercise in the "The Rust Programming Language" book.

Minigrep - A simple grep-like tool implemented in Rust This simple CLI tool searches for a given pattern in a specified file and as a result, it print

Filip Szutkowski 3 Mar 15, 2024
A minimal `syn` syntax tree pretty-printer

prettyplease::unparse A minimal syn syntax tree pretty-printer. Overview This is a pretty-printer to turn a syn syntax tree into a String of well-form

David Tolnay 429 Dec 28, 2022
A minimal, reloading SVG viewer a la feh

svgview Usage svgview path/to/some/file.svg Purpose I needed a tool to view SVGs while I work on them in other software. This tool should function sim

Stevan Dedovic 2 Mar 21, 2022
A minimal and fast zero-copy parser for the PE32+ file format.

peview A minimal and fast zero-copy parser for the PE32+ file format. Goal This project aims to offer a more light weight and easier to use alternativ

null 5 Dec 20, 2022