A small TypeScript port of some of Rust's most useful patterns and ergonomics.
This project brings over ideas like Option, Result, OnceLock, thread helpers, and channel-based message passing so TypeScript code can feel a bit more like idiomatic Rust without needing to write Rust itself.
Highlights:
OptionandResulttypes for safer value and error handlingOnceLockfor one-time initializationmpsc/spscchannel primitives for async and sync communication- lightweight threading helpers
- protocol and shell utilities inspired by Rust-style composition
Install:
bun installRun the demo:
bun run main.ts