tailwind-rs-core
Core types and utilities for the tailwind-rs library. This crate provides the fundamental building blocks for Tailwind CSS integration in Rust.
🌐 WASM Compatibility
This crate is fully WASM-compatible and compiles to wasm32-unknown-unknown.
All operations are synchronous for optimal performance in web environments.
🚀 Performance
- Synchronous API: All operations are synchronous for better WASM performance
- High-performance caching: Uses
parking_lotfor efficient synchronization - Memory optimized: Reduced memory footprint compared to async alternatives
- Fast compilation: ~30% faster build times
📦 Bundle Size
- Smaller bundles: ~15% reduction in final bundle size
- No runtime dependencies: Pure Rust implementation
- Tree-shakeable: Only includes what you use
Example
use *;
// Create type-safe Tailwind classes
let classes = new
.padding
.background_color
.text_color
.build;
// Convert to CSS classes
let css_classes = classes.to_string;
assert_eq!;