Kobold is a library for creating declarative browser interfaces using Rust and WebAssembly. Its view macro provides HTML-like syntax for constructing interface elements while preserving type information that the Rust compiler can check. Views are represented by concrete types, allowing the library to generate code for manipulating browser elements without requiring a conventional virtual DOM representation.
The library places particular emphasis on reducing the work needed to render and update relatively small interface elements. Static markup can be represented directly in generated browser operations, while dynamic expressions are associated with the document nodes that display their values. When those expressions change, Kobold can update the affected elements rather than reconstructing the surrounding interface. Components are ordinary functions with typed parameters, and the library includes mechanisms for managing local component state, handling events, and expressing conditional interface content.
This is free and open source software.
Key Features
- Declarative view macro – define interfaces using HTML-like syntax with optional closing tags.
- Compile-time checking – preserve type information for interface expressions and component parameters.
- Functional components – create reusable views through ordinary functions.
- Optional component parameters – supply default values for selected component properties.
- Local state management – construct stateful components using the stateful function.
- Event handling – connect browser interactions to closures that modify component state.
- Targeted DOM updates – update individual document nodes when their associated values change.
- Static markup optimisation – generate direct DOM construction operations for elements without dynamic content.
- Conditional rendering – support alternative view branches through component attribute handling.
- Editor integration – retain type information that can be inspected and refactored using rust-analyzer.
Website: github.com/maciejhirsz/kobold
Support:
Developer: Maciej Hirsz
License: Mozilla Public License v2.0
Kobold is written in Rust. Learn Rust with our recommended free books and free tutorials.
Related Software
| Rust Frontend Web Frameworks | |
|---|---|
| Tauri | Framework for building tiny, blazing fast binaries for all major desktop platforms |
| Yew | Modern framework for creating multi-threaded front-end web apps |
| Leptos | Full-stack, isomorphic Rust web framework |
| iced | GUI library focused on simplicity and type-safety |
| Dioxus | React-like library for building fast, portable, and beautiful user interfaces |
| Seed | Framework for creating fast and reliable web apps with an Elm-like architecture |
| Sycamore | Next generation UI library |
| Vizia | Declarative GUI library |
| Xilem | Experimental, next-generation cross-platform Rust UI framework |
| Perseus | State-driven web development framework |
| Percy | Collection of libraries for building interactive frontend browser apps |
| stdweb | Standard library for the client-side Web |
| mogwai | View library for creating GUI applications |
| Silkenweb | Library for building reactive web apps |
| sauron | Suited for developing web application which uses progressive rendering |
| Dominator | High-performance declarative DOM library |
| Kobold | Easy declarative web interface |
| Draco | Build client side web applications with Web Assembly |
| Smithy | Build WebAssembly applications with Rust |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.