https://github.com/proxin187/stunt
A declarative web framework for Rust/Wasm
https://github.com/proxin187/stunt
asmjs concurrency elm emscripten gui jsx multithreading rust rust-lang rust-library wasm web web-development web-framework webapp webworkers
Last synced: 3 months ago
JSON representation
A declarative web framework for Rust/Wasm
- Host: GitHub
- URL: https://github.com/proxin187/stunt
- Owner: proxin187
- License: mit
- Created: 2025-05-10T06:45:54.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-09-22T19:44:14.000Z (4 months ago)
- Last Synced: 2025-09-22T21:25:11.413Z (4 months ago)
- Topics: asmjs, concurrency, elm, emscripten, gui, jsx, multithreading, rust, rust-lang, rust-library, wasm, web, web-development, web-framework, webapp, webworkers
- Language: Rust
- Homepage: https://crates.io/crates/stunt
- Size: 775 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
stunt
[](https://crates.io/crates/stunt)
[](https://docs.rs/stunt)

An isomorphic web framework for Rust.
> [!WARNING]
> stunt is currently undergoing a large change in api and is NOT ready for production use at the moment.
## Features
* Isomorphic: Write server logic alongside client-side components, and call server logic from the client with [services](). Services can also integrate with foreign APIs.
* Html Macro: Macro for writing html with rust expressions, similar to that of JSX.
* Type checked: Compile-time type checking of components to prevent runtime bugs.
## Usage
This crate is on [crates.io](https://crates.io/crates/stunt) and can be added either through
adding `stunt` to your dependencies in `Cargo.toml`:
```toml
[dependencies]
stunt = "0.1.3"
```
Or running the following Cargo command in your project directory:
```bash
cargo add stunt
```
## Example
More examples can be found at [examples](https://github.com/proxin187/stunt/tree/main/examples).
```rust
use stunt::prelude::*;
pub enum Message {
Add,
}
pub struct App {
count: usize,
}
impl Component for App {
type Message = Message;
type Properties = ();
fn create() -> App {
App {
count: 0,
}
}
fn callback(&mut self, message: &Message) {
match message {
Message::Add => {
self.count += 1;
},
}
}
fn view(&self, _: ()) -> Html {
html! {
{ "increment" }
{ self.count }
}
}
}
fn main() {
Renderer::new::().render();
}
```
## Contributing
We highly appreciate all contributions whether its a bug fix, feature, or documentation.
If you encounter any bugs or otherwise weird behaviour we would really appreciate if you submitted an issue for us to look into.
## License
stunt is licensed under the MIT license.