#tailwind #css

tailwind-rs-wasm

WASM-optimized Tailwind CSS implementation for Rust web applications

22 releases (13 breaking)

0.16.0 Sep 26, 2025
0.14.0 Sep 26, 2025

#2225 in Web programming

Download history 80/week @ 2025-09-08 838/week @ 2025-09-15 1595/week @ 2025-09-22 230/week @ 2025-09-29 34/week @ 2025-10-06 6/week @ 2025-10-13 4/week @ 2025-10-20

1,210 downloads per month

MIT license

2.5MB
42K SLoC

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

~12–17MB
~306K SLoC