9 releases (breaking)
new 0.8.0 | Sep 19, 2025 |
---|---|
0.7.0 | Sep 17, 2025 |
0.6.1 | Sep 17, 2025 |
0.5.0 | Sep 16, 2025 |
0.1.0 | Sep 13, 2025 |
#2350 in Web programming
617 downloads per month
515KB
510 lines
Tailwind-RS WASM
A fully WASM-compatible implementation of Tailwind CSS for Rust web applications. This crate provides optimized functionality for WebAssembly and browser environments.
🌐 WASM Compatibility
This crate is fully WASM-compatible and compiles to wasm32-unknown-unknown
.
Perfect for building modern web applications with any Rust web framework.
🚀 Performance Benefits
- Synchronous operations - No async runtime overhead
- Smaller bundles - ~25% reduction in bundle size
- Faster compilation - ~30% faster build times
- Memory efficient - Optimized for WASM constraints
📦 Features
- Type-safe class building - Compile-time validation
- Responsive design - Complete breakpoint system
- Color system - Full Tailwind color palette
- Spacing system - All Tailwind spacing utilities
- WASM bindings - Direct JavaScript interop
Example
use tailwind_rs_wasm::*;
// Create WASM-optimized classes
let mut builder = WasmClassBuilder::new();
builder.class("bg-blue-500");
builder.class("text-white");
builder.class("p-4");
let classes = builder.build();
assert_eq!(classes, "bg-blue-500 text-white p-4");
Dependencies
~7–11MB
~200K SLoC