Build C# Razor apps that run in the browser on RustNetRuntime (Rust, compiled to WebAssembly): new projects, serve with live reload, publish, packages and snippets.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Build C# Razor apps that run in the browser on RustNetRuntime, a .NET runtime written in Rust and compiled to WebAssembly.
Commands
Open the Command Palette (Ctrl+Shift+P) and type Rustzor:
Command
What it does
Rustzor: New Project
Creates an app (with the Rustzor.UI shell), an empty app, or a library, and opens it
Rustzor: Serve with Live Reload
Builds, serves on http://localhost:5080 and rebuilds on every save; the browser reloads, or shows the build errors over the page
Rustzor: Publish / Publish with AOT
Publishes the static site and reports its size
Rustzor: Add Package…
Pick Rustzor packages from a searchable list
Rustzor: Show Project Info
Versions, packages and the size of the built site
Rustzor: Install or Update the rustzor CLI
dotnet tool update -g Rustzor.Cli
Rustzor: Open Documentation
The docs on GitHub
In a workspace with a Rustzor app, a Rustzor: serve button sits in the status bar, and the explorer's right-click menu on a .csproj offers Serve, Publish and Add Package.
Snippets
Prefix
In
Gives you
rzpage
Razor
A routed page with a header and a card
rzcomp
Razor
A component with a parameter and an event callback
rzlayout
Razor
A layout with the Rustzor.UI app shell
rzgrid
Razor
A searchable, sortable, paged data grid
rzmodal
Razor
A modal bound to a bool
rztimer
Razor
A refresh on an interval, disposed with the component