# banyan **Repository Path**: pauljoihn21/banyan ## Basic Information - **Project Name**: banyan - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-06 - **Last Updated**: 2026-08-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Banyan A **reactive** library for creating web apps in **Rust** and **WebAssembly**. ## Features - **Reactive** — Fine-grained reactive system with signals, memos, and effects - **WebAssembly** — Run your Rust code directly in the browser - **SSR** — Server-side rendering support for fast initial page loads - **Hydration** — Hydrate server-rendered HTML on the client - **SCSS** — Compile-time SCSS-to-CSS generation with zero runtime overhead - **Assets** — Compile-time asset referencing with content-hash cache busting via `asset!` macro - **Components** — Ergonomic component model with `#[component]` macro - **Router** — Client-side and server-side routing ## Workspace Crates | Crate | Description | |-------|-------------| | `banyan` | Framework entry point, prelude exports | | `banyan-core` | Virtual DOM, component system | | `banyan-reactive` | Reactive signals, effects, context | | `banyan-macro` | `#[component]` and other proc macros | | `banyan-css` | SCSS parser (Lexer → Parser → Evaluator) | | `banyan-style` | `#[style]` attribute macro + `css!` / `scss!` function macros | | `banyan-asset` | `asset!` macro for compile-time asset URL generation | | `banyan-web` | Web/DOM backend | | `banyan-view-parser` | View template parser | | `banyan-futures` | Async utilities, suspense | | `banyan-router` | Routing | | `banyan-router-macro` | Router proc macros | ## Getting Started ```rust use banyan::prelude::*; #[component] fn App() -> View { let count = use_signal(|| 0); view! { button(on:click = move |_| count += 1) { "Count: " {count} } } } fn main() { banyan::web::mount_to_body(App); } ``` ## Asset System Banyan provides an `asset!` macro for compile-time asset referencing with automatic content hashing: ```rust use banyan::asset; #[component] fn Logo() -> View { let url = asset!("assets/logo.png"); // Web: url = "/assets/logo-a1b2c3d4.png" (with content hash) // MP: url resolved at runtime via __asset_url view! { img(src = url) } } ``` ### Configuration In `Banyan.toml`: ```toml [build] filehash = true # Enable/disable content hash suffix (default: true) ``` ### build.rs Recommendation Add `cargo:rerun-if-changed=assets/` to your `build.rs` to ensure assets are re-scanned when they change: ```rust fn main() { println!("cargo:rerun-if-changed=assets/"); } ``` ## Toolchain - Rust 1.97.0 (edition 2024) ## License MIT #[component] #[style] #[code]