A front-end framework for building WebAssembly applications entirely in Rust with idiomatic syntax and compiler safety.
Smithy is a front-end framework for building WebAssembly applications entirely in Rust. It provides a JSX-like syntax through its `smd!` macro, allowing developers to create web interfaces using Rust's type system and safety guarantees. The framework solves the problem of writing safe, performant client-side web apps without relying on JavaScript.
Rust developers interested in building web applications with WebAssembly, especially those who want to leverage Rust's safety features for front-end development.
Developers choose Smithy because it offers a familiar UI development experience with JSX-like templates while maintaining Rust's compile-time safety, eliminating common UI bugs and providing predictable performance.
A framework for building WebAssembly apps in Rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The `smd!` macro provides an HTML-like template syntax similar to JSX, making it accessible for developers coming from React or similar frameworks, as shown in the simple counter example.
Leverages Rust's borrow checker to prevent common UI bugs at compile time, exemplified in the macro expansion where mutable and immutable borrows of state variables are handled separately to avoid conflicts.
Organizes app logic into clear phases like rendering, ref assignment, and event handling, ensuring predictable updates and enabling direct DOM manipulation via `post_render` callbacks.
After UI or window event callbacks are executed, Smithy automatically re-runs the app through phases, keeping the interface synchronized with state changes without manual intervention.
Smithy v0.0.7 only works on a specific nightly Rust version, which is unstable and prone to breaking changes, making it risky for production use and complicating toolchain management.
At version 0.0.7, the framework is in early development with limited documentation, community support, and potential for significant breaking changes, as admitted in the README's roadmap.
The `smd!` macro expands to verbose, intricate Rust code involving closures and phase matching, which can obscure debugging and increase cognitive load for developers, as illustrated in the detailed expansion example.