GitHub - rivet-dev/antiox: Rust- and Tokio-like async primitives for TypeScript.
Sharing a small library we built internally here for fellow Lobsters burdened with writing async TypeScript. We did an assessment internally at Rivet of the bugs in our TypeScript codebases. The #1...
Source: GitHub
Sharing a small library we built internally here for fellow Lobsters burdened with writing async TypeScript. We did an assessment internally at Rivet of the bugs in our TypeScript codebases. The #1 issue by far was with async concurrency bugs (specifically in backend for non-CRUD use cases). Needless to say, very few of these concurrency issues exist in our Rust codebases since we heavily utilize channels + tasks + Tokio's other concurrency primitives We built this to be as close to a 1:1 mapWe built this to be as close to a 1:1 mapping from Rust as possible.ping from Rust as possible. There are loads of other concurrency libraries for TypeScript, but they usually have gaping holes or weird design quirks. Tokio's been rigorously tested and well designed, so copying identically makes it – in my opinion – the best designed concurrency library for TypeScript. There's one big gotcha with TypeScript: you cannot cancel promises like you can futures. To work around this, we automatically crea