Nim v2.0 Released

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • mummy

    An HTTP and WebSocket server for Nim that returns to the ancient ways of threads.

  • It should probably be redone with mummy (multi-threaded) and chronos (async single-threaded):

    https://github.com/guzba/mummy

    https://github.com/status-im/nim-chronos

  • nim-chronos

    Chronos - An efficient library for asynchronous programming

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • RFCs

    A repository for your Nim proposals. (by nim-lang)

  • Couldn't edit my post, but forgot to mention my main pain points with Nim has been its module system, especially not being able to have mutually recursive imports (there has been a 7 year old proposal[1]), order-sensitive declarations of procs (i.e. can't use a proc defined further down in the file unless you add a forward reference to it). For the latter there's an experimental pragma[2], but it doesn't work a lot of times once you introduce mutually recursive calls.

    [1] https://github.com/nim-lang/rfcs/issues/6

  • futhark

    Automatic wrapping of C headers in Nim (by PMunch)

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • awesome-nim

    A curated list of awesome Nim frameworks, libraries, software and resources.

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • nlvm

    LLVM-based compiler for the Nim language

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • questionable

    Elegant optional types for Nim

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • nimbus-eth2

    Nim implementation of the Ethereum Beacon Chain

  • norm

    A Nim ORM for SQLite and Postgres (by moigagoo)

  • Congratulations to everyone involved and the entire Nim community!

    Nim has been my language of choice for the past decade and I'm really happy with the new features in Nim 2.0. Some of them are real gamechangers for my projects. For example, default values for objects theoretically allow me to make Norm[1] work with object types along with object instances. And the new overloadable enums is something Karkas [2] wouldn't be possible at all (it's still WIP though).

    [1] https://norm.nim.town

    [2] https://karkas.nim.town

  • nitter

    Alternative Twitter front-end

  • sokol-zig

    Zig bindings for the sokol headers (https://github.com/floooh/sokol)

  • I maintain auto-generated bindings for my C libraries for Zig and Nim (and Odin and Rust - although the Rust bindings definitely need some love to make them a lot more idiomatic).

    I think looking at the examples (which is essentially the same code in different languages) gives you a high level idea, but they only scratch the surface when it comes to language features (things like the Zig code not using comptime features):

    Zig: https://github.com/floooh/sokol-zig/tree/master/src/examples

    Nim: https://github.com/floooh/sokol-nim/tree/master/examples

    Odin: https://github.com/floooh/sokol-odin/tree/main/examples

    Rust: https://github.com/floooh/sokol-rust/tree/main/examples

  • sokol-nim

    nim bindings for https://github.com/floooh/sokol

  • I maintain auto-generated bindings for my C libraries for Zig and Nim (and Odin and Rust - although the Rust bindings definitely need some love to make them a lot more idiomatic).

    I think looking at the examples (which is essentially the same code in different languages) gives you a high level idea, but they only scratch the surface when it comes to language features (things like the Zig code not using comptime features):

    Zig: https://github.com/floooh/sokol-zig/tree/master/src/examples

    Nim: https://github.com/floooh/sokol-nim/tree/master/examples

    Odin: https://github.com/floooh/sokol-odin/tree/main/examples

    Rust: https://github.com/floooh/sokol-rust/tree/main/examples

  • sokol-odin

    Odin bindings for the sokol headers (https://github.com/floooh/sokol)

  • I maintain auto-generated bindings for my C libraries for Zig and Nim (and Odin and Rust - although the Rust bindings definitely need some love to make them a lot more idiomatic).

    I think looking at the examples (which is essentially the same code in different languages) gives you a high level idea, but they only scratch the surface when it comes to language features (things like the Zig code not using comptime features):

    Zig: https://github.com/floooh/sokol-zig/tree/master/src/examples

    Nim: https://github.com/floooh/sokol-nim/tree/master/examples

    Odin: https://github.com/floooh/sokol-odin/tree/main/examples

    Rust: https://github.com/floooh/sokol-rust/tree/main/examples

  • sokol-rust

    Rust bindings for the sokol headers (https://github.com/floooh/sokol)

  • I maintain auto-generated bindings for my C libraries for Zig and Nim (and Odin and Rust - although the Rust bindings definitely need some love to make them a lot more idiomatic).

    I think looking at the examples (which is essentially the same code in different languages) gives you a high level idea, but they only scratch the surface when it comes to language features (things like the Zig code not using comptime features):

    Zig: https://github.com/floooh/sokol-zig/tree/master/src/examples

    Nim: https://github.com/floooh/sokol-nim/tree/master/examples

    Odin: https://github.com/floooh/sokol-odin/tree/main/examples

    Rust: https://github.com/floooh/sokol-rust/tree/main/examples

  • axiom

    A 64-bit kernel implemented in Nim (by khaledh)

  • I've used both to work on a hobby OS project (Nim[1], Zig[2]). I very much prefer Nim. Code is succinct, elegant, and lets you focus on your core logic rather than fighting the language.

    Zig is nice and I like its optionals support and error handling approach. But I was put off by its noisy syntax, e.g. !?[]u8 to represent an error union of an optional pointer to a many-pointer of uint8. Also having to prepare and weave allocators throughout most of the code that needs to dynamically allocate (which is most of the code) gets in the way of the main logic. Even little things like string concatenation or formatting becomes a chore. Zig also doesn't have dynamic dispatch, which makes polymorphic code hard to write; you have to work around it through some form of duck typing. In the end I realized that Zig is not for me.

    [1] https://github.com/khaledh/axiom

  • axiom-zig

    A 64-bit kernel implemented in Zig

  • torrentinim

    A very low memory-footprint, self hosted API-only torrent search engine. Sonarr + Radarr Compatible, native support for Linux, Mac and Windows.

  • Check out my project Torrentinim for a popular but simple enough project if you want to taste what Nim is like.

    https://github.com/sergiotapia/torrentinim

    It's easy to understand code.

  • jsony

    A loose, direct to object json parser with hooks.

  • Nim's default json library is terrible in performance, but there're much faster drop-in replacements like jsony[1]. I'm not sure that's the main issue for low rank, but it's definitely one of them.

    1. https://github.com/treeform/jsony

  • denim

    Node 💖 Nim = Denim! Build powerful NodeJS / BunJS addons with Nim language via Node API (NAPI)

  • Somewhat related, you can call Nim code from Node.js/Bun using Denim: https://github.com/openpeeps/denim. It works by creating a Node add-on.

    This is great for reusing Nim code in a web app, and possibly for performance critical code.

  • mvb-opencv

    Minimum Viable Bindings to OpenCV for Nim

  • I don't know if my particular version is noteworthy, but I recently started making updated Nim bindings for OpenCV and it was kinda fun. I don't consider myself an advanced C++ programmer, but Nim made the process easier than I had feared it would be. https://github.com/tapsterbot/mvb-opencv

  • v

    Write Nim only with 'v' (by belamenso)

  • https://github.com/belamenso/v

    This cleans up Nim's syntax a little, we use it in production with not much maintenance.

  • pixie

    Full-featured 2d graphics library for Nim. (by treeform)

  • We have written pixie: https://github.com/treeform/pixie . Pixie is a 2D graphics library similar to Cairo and Skia written entirely in Nim. Which I think is a big accomplishment. It even has python bindings: https://pypi.org/project/pixie-python/

  • ferus

    A toy web engine written in Nim

  • it's in somewhat earlier stages of development.

    https://github.com/xTrayambak/ferus

  • httpbeast

    A highly performant, multi-threaded HTTP 1.1 server written in Nim.

  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

  • nbindgen

    A project for generating Nim bindings from Rust code

  • For Rust at least one can use https://github.com/arnetheduck/nbindgen

  • nim-bearssl

    BearSSL wrapper in Nim

  • Ugh, I just got done spending months fighting CMake before moving back to a position using Nim!

    You can also compile C projects with Nim like bearssl [1]. Nim takes care to compile the C files and recompile them when config flags change. It's actually really nice.

    1: https://github.com/status-im/nim-bearssl/blob/99fcb3405c55b2...

  • npeg

    PEGs for Nim, another take

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • nimpy

    Nim - Python bridge

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • ratel

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • cps

    Continuation-Passing Style for Nim 🔗

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • zero-functional

    A library providing zero-cost chaining for functional abstractions in Nim.

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • owlkettle

    A declarative user interface framework based on GTK 4

  • Ones that have not been mentioned so far:

    nlvm is an unofficial LLVM backend: https://github.com/arnetheduck/nlvm

    npeg lets you write PEGs inline in almost normal PEG notation: https://github.com/zevv/npeg

    futhark provides for much more automatic C interop: https://github.com/PMunch/futhark

    nimpy allows calling Python code from Nim and vice versa: https://github.com/yglukhov/nimpy

    questionable provides a lot of syntax sugar surrounding Option/Result types: https://github.com/codex-storage/questionable

    ratel is a framework for embedded programming: https://github.com/PMunch/ratel

    cps allows arbitrary procedure rewriting to continuation passing style: https://github.com/nim-works/cps

    chronos is an alternative async/await backend: https://github.com/status-im/nim-chronos

    zero-functional fixes some inefficiencies when chaining list operations: https://github.com/zero-functional/zero-functional

    owlkettle is a declarative macro-oriented library for GTK: https://github.com/can-lehmann/owlkettle

    A longer list can be found at https://github.com/ringabout/awesome-nim.

  • nanim

    Nanim is an easy-to-use framework to create smooth GPU-accelerated animations that can be previewed live inside a glfw window and, when ready, rendered to videos at an arbitrary resolution and framerate.

  • I use pixie for my game framework. It's used to load textures, layout fonts, and render font atlases. It can be used for generative art but https://github.com/EriKWDev/nanim or sdl2 using renderer's makes more sense as they are gpu accelerated.

  • nimqt

    Qt bindings for nim

  • > Now one can define constructors and virtual procs that map to C++ constructors and virtual methods, allowing one to further customize the interoperability.

    I hope this will help with bindings for C++ libraries that have historically been tricky to wrap. I would like to use Qt from a compiled language that's a pleasure to use, and this project looks promising:

    https://github.com/jerous86/nimqt

  • nim-results

    Friendly value-or-error type

  • > You can also not really have productive and well-fitting errors-as-values in a language that emphasizes UFCS

    Eh, https://github.com/arnetheduck/nim-results and associated syntax from https://github.com/codex-storage/questionable would beg to disagree. Nim's stdlib does not have productive and well-fitting errors because it suffers from inertia and started far before the robust wonders of recoverable error handling via errors-as-types entered the mainstream with Rust (IMO: and refined with Swift). Option/Result types are fantastic and I do so wish the standard library used them: but it's nothing a (very large) wrapper couldn't provide, I suppose.

    I do strongly think that other languages are greatly missing out on UFCS and I miss it dearly whenever I go to write Python or anything else. I'm not quite sure how you think UFCS would make it impossible to have good error handling? Rust also has (limited, unfortunately) UFCS and syntax around error handling does not suffer because of it. If by errors-as-values you mean Go-style error handling, I quite despise it - I think any benefits of the approach are far offset by the verbosity, quite similarly to Java's checked exceptions.

  • cbindgen

    A project for generating C bindings from Rust code

  • As a 2-step approach, you could also probably use https://github.com/mozilla/cbindgen and then Nim's native C FFI.

  • boxy

    2D GPU rendering with a tiling atlas. (by treeform)

  • Not by itself! But together with other library boxy you can: https://github.com/treeform/boxy

    You should use pixie to load textures, create text, rasterize vector graphic etc... and send them to boxy to be drawn every frame.

    Yes Pixie is CPU only, and just like you can't use Cairo or Skea for real time games you can't use Pixie, but boxy you totally can.

  • rust

    Empowering everyone to build reliable and efficient software.

  • Really, I'm quite hopeful for crabi: https://github.com/rust-lang/rust/pull/105586

    An ABI for languages with a proper type system seems fantastic. Swift, Rust, Nim, D all share very similar type systems (and memory management systems) and it would be very cool to see what kinds of interop easy dynamic linking would allow.

  • fungus

    Object variants done like other langugaes (by beef331)

  • Yah it's annoying, but I just rename one. Beff331 made a lib that uses tuples and avoids the naming issue: https://github.com/beef331/fungus

  • jester

    A sinatra-like web framework for Nim.

  • prologue

    Powerful and flexible web framework written in Nim

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
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