A TypeScript library emulating Rust's Result and Option, for better error handling without exceptions.

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • rustic

    rustic is a TypeScript library providing emulation of Rust's Option and Result types (and some useful wrappers for common js functions as well!) (by franeklubi)

  • You can see them in this file: https://github.com/franeklubi/rustic/blob/main/src/result/helpers.ts

  • fp-ts

    Functional programming in TypeScript

  • fp-ts has these (named Either and Option). Any advantages of using this library over what fp-ts has to offer? Is it just the (I assume) smaller footprint, or are there other reasons?

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • rust

    Empowering everyone to build reliable and efficient software.

  • Rust used to have Either (std::either::Either), but it was removed some time before Rust 1.0 because it barely got used, and the cases where it was used were better handled by a custom enum. Certainly it fails the informally-defined standard library inclusion criteria: it’s not widely used and doesn’t need to be in the standard library in any way.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts