/awesome-nim

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

Primary LanguageNimCreative Commons Zero v1.0 UniversalCC0-1.0

Awesome-nim-logo

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

Nim is a statically typed compiled systems programming language. Good for everything from shell scripting to web front & backend, to ML, HPC, and embedded.

Contents

Language Features

Implementations

  • Nim - Nim (formerly known as "Nimrod") is a compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio. Nim's design focuses on efficiency, expressiveness, elegance (in the order of priority).
  • nlvm - LLVM backend for Nim.

Standard Libraries

Nim provides unique features for seamless and transparent interoperability with other technologies. Some users found it useful to make other standard libraries usable from Nim.

  • cpython - Python standard library for Nim.
  • Node.js - Node.js standard library for Nim.

Package Repositories

Editors

Async IO

  • std/async - Async/await implementation in Nim's stdlib (aka asyncdispatch).
  • chronos - An efficient library for asynchronous programming.
  • cps - Continuation-Passing Style for Nim.

Threading

  • weave - A state-of-the-art multithreading runtime: message-passing based, fast, scalable, ultra-low overhead.
  • timerpool - Threadsafe timerpool implementation for event purposes.
  • taskpools - Lightweight, energy-efficient, easily auditable threadpools.
  • shared - A Nim library for shared types.
  • synthesis - A compiletime, procedure-based, low-overhead, no-allocation, state-machine generator optimized for communicating processes and threads.
  • sync - Useful synchronization primitives.

Error Handling

  • result - Friendly, exception-free value-or-error returns, similar to Option[T].
  • questionable - Elegant optional types for Nim.
  • optionsutils - Utility macros for easier handling of options in Nim.

Contracts

  • contracts - Used to make contracts - elegant promises that pieces of code will fulfill certain conditions.
  • contra - Lightweight and fast self-documenting design by contract programming.

Object-Oriented Programming

  • oop_utils - Nim macros for building OOP class hierarchies.
  • interfaced - Interfaces for Nim.
  • traitor - A macro heavy trait library made from boredom.
  • classy - Haskell-style typeclasses for Nim.

Functional Programming

  • cascade - Method & assignment cascades for Nim, inspired by Smalltalk & Dart.
  • nimfp - Nim functional programming library.
  • nim-pipexp - Expression-based pipe operators with placeholder argument for Nim.
  • pipe - Pipe operator for Nim, as seen in functional languages.
  • zero-functional - A library providing (almost) zero-cost chaining for functional abstractions in Nim.

Iteration

  • iterrr - Macros-based functional-style, lazy-like, extensible iterator library.
  • itertools - Nim rewrite of a very popular Python module of the same name.
  • loopfusion - Iterate efficiently over a variadic number of containers.
  • looper - For loop macros for Nim.
  • mangle - Attempt at a streaming library.

Macros

  • macroutils - A package that makes creating macros easier.
  • nimacros - Documentation for Nim macros.
  • unpack - Sequence/object unpacking/destructuring.
  • with - The with macro for Nim.
  • memo - Memoization for Nim.

Operating System

System API

  • winim - Nim's Windows API and COM Library.
  • serial - A Nim library for accessing serial ports.
  • tempdir - A Nim library to create and manage temporary directories.
  • nimbluez - Nim modules for access to system Bluetooth resources.

IO

  • std/selectors - Epoll/Kqueue/Select implementation in Nim's stdlib.
  • ioselectors - The ioselectors plus for Nim.
  • wepoll - Windows epoll wrapper for Nim.
  • faststreams - Nearly zero-overhead input/output streams for Nim.
  • lockfreequeues - Lock-free queue implementations for Nim.

Processes

  • psutil - A port of Python's psutil to Nim.
  • shell - A mini Nim DSL to execute shell commands more conveniently.
  • schedules - A Nim scheduler library that lets you kick off jobs at regular intervals.
  • daemon - Cross-platform process daemonization library for the Nim language.

Date and Time

  • datetime2human - Calculate date & time with precision from seconds to millenniums. Human friendly date time as string. ISO-8601.
  • timezones - Nim timezone library compatible with the standard library.
  • chrono - A timestamps, calendars, and timezones library.

Randomization

  • random - Random number generation library for Nim, inspired by Python's "random" module.
  • sysrandom.nim - A Nim library to generate random numbers and random ranges of bytes using the system's PRNG.
  • alea - Define and compose random variables.
  • drand48 - Nim implementation of the standard Unix drand48 random number generator.

Scripting

  • nimcr - Running Nim code with Shebangs.
  • nimr - Run Nim programs like scripts.

Hardware

  • nimvisa - Wrapper for NI-VISA instrument control library.
  • ftd2xx - Wrapper for FTDI ftd2xx library (USB to JTAG/SPI/I2C/Bitbang etc.).

Embedded

  • ratel - Next-generation, zero-cost abstraction microconroller programming in Nim.
  • ardunimo - Nim wrapper for Arduino + LinkIt ONE SDK by Mediatek.
  • ardunimesp - Nim wrapper for Arduino ESP8266 framework + A tool for flashing, compiling and making a Nim project into an Arduino project.
  • msp430f5510 - Run Nim on MSP430f5510 micro-controller (6KB of RAM).
  • Nesper - Program the ESP32 using Nim. Library on top of esp-idf.
  • stm32f3 - Run Nim on STM32F3 micro-controller (16KB of RAM).
  • boneIO - GPIO implementation for the BeagleBone Black for Nim.

Science

  • units - Statically-typed quantity units library for the Nim language.
  • unchained - A fully type safe, compile time only units library.
  • metric - A small library providing type-level dimensional analysis.
  • orbits - Orbital mechanics library for Nim.

Data

Database

Driver

  • nimongo - Pure Nim lang MongoDB driver.
  • asyncpg - Asynchronous PostgreSQL driver for Nim.
  • anonimongo - Another Nim pure Mongo DB driver.
  • redis - Official redis wrapper for Nim.
  • amysql - Async MySQL Connector write in pure Nim.
  • mycouch - Multisync CouchDB driver for Nim.
  • SQLiteral - A high level SQLite API for Nim.
  • asyncmysql - Asynchronous MySQL connector written in pure Nim.
  • sqlcipher - SQLCipher wrapper.
  • litestore - A lightweight, self-contained, RESTful, searchable, multi-format NoSQL document store.
  • rocksdb - Nim wrapper for RocksDB, a persistent key-value store for flash and RAM Storage.

ORM

  • ormin - Prepared SQL statement generator , A lightweight ORM.
  • allographer - A query_builder/ORM library inspired by Laravel/PHP and Orator/Python for Nim.
  • gatabase - Connection-Pooling Compile-Time ORM for Nim.
  • norm - Norm is an object-oriented, framework-agnostic ORM for Nim that supports SQLite and PostgreSQL.

Data Structures

  • BitVector - A high-performance Nim implementation of BitVectors.
  • rbtree - A Red/Black tree implementation in Nim.
  • quadtree - A Quadtree library for Nim.
  • kdtree - A pure Nim k-d tree implementation for efficient spatial querying of point data.
  • RTree - Generic R-tree implementation for Nim.
  • sorta - SortedTables in Nim, based on B-trees.
  • minmaxheap - A Nim implementation of a Minimum-Maximum heap.
  • BipBuffer - A Nim implementation of Simon Cooke's Bib Buffer
  • bloom - Bloom filter implementation in Nim.
  • binaryheap - Simple binary heap implementation in Nim.
  • faststack - Dynamically resizable data structure for fast iteration over large arrays of similar elements.
  • StashTable - Concurrent hash tables for Nim.

Data Processing

  • NimData - DataFrame API written in Nim, enabling fast out-of-core data processing.
  • Datamancer - A dataframe library with a dplyr like API.
  • nimdataframe - Dataframe for Nim.
  • nimhdf5 - Wrapper and some simple high-level bindings for the HDF5 library for Nim.
  • mpfit - A wrapper for the cMPFIT library for Nim.

Parsing

  • parsetoml - A Nim library to parse TOML files.
  • NimYAML - YAML implementation for Nim.
  • Binarylang - Extensible Nim DSL for creating binary parsers/encoders in a symmetric fashion.

Serialization

  • serialization - A modern and extensible serialization framework for Nim.
  • json-serialization - Flexible JSON serialization not relying on run-time type information.
  • protobuf-serialization - The nim-protobuf-serialization.
  • ssz-serialization - Nim implementation of Simple Serialize (SSZ) serialization and merkleization.
  • toml-serialization - Flexible TOML serialization not relying on run-time type information.
  • frosty - Marshal native Nim objects via streams, sockets.
  • protobuf-nim - Protobuf implementation in pure Nim that leverages the power of the macro system to not depend on any external tools.
  • flatty - Tools and serializer for plain flat binary files.
  • nesm - NESM is a tool that generates serialization and deserialization code for a given object.
  • bingo - Binary serialization framework for Nim.

Text

String Types

Pattern Matching

  • regex - Pure Nim regex engine with linear time match.
  • npeg - PEGs for Nim, another take.
  • patty - A pattern matching library for Nim.
  • gara - Macro-based pattern matching library.
  • glob - Pure library for matching file paths against Unix style glob patterns.
  • ast_pattern_match - A library to do pattern matching on the AST.
  • awk - A library of awk functions in Nim.

Translation

  • tinyslation - Text string translation from free online crowdsourced API.

Markdown

  • HastyScribe - Self-contained markdown compiler generating self-contained HTML documents.
  • markdown - A beautiful Markdown Parser in the Nim world.
  • lester - Create quick documents out of Markdown, into HTML.

Multimedia

Audio

  • paramidi - A Nim library for making MIDI music.
  • omni - A DSL for low-level audio programming.
  • wave - A tiny WAV sound module.
  • parasound - A library to provide Nim bindings for miniaudio and dr_wav.

Images

  • pixie - A full-featured 2D graphics library for Nim.
  • nimpng - PNG (Portable Network Graphics) decoder and encoder written in Nim.
  • nimbmp - BMP decoder and encoder written in Nim.
  • nimsvg - A Nim-based DSL allowing generation of SVG files and GIF animations.
  • pnm - Library for PNM (Portable Anymap) in Nim.

Documents

  • nimpdf - PDF document writer, written in Nim.

Algorithms

Math

Symbolic

  • symbolicnim - A symbolic library written purely in Nim.

FFT

  • impulse - Impulse will be a collection of primitives for signal processing (FFT, Convolutions).

Vector

  • vectorize - SIMD vectorization backend.
  • vmath - Math vector library for graphical things.

Matrix

  • neo - A matrix library.
  • manu - Nim MAtrix NUmeric package - a port of JAMA, adapted to Nim.
  • nlopt - A wrapper for the nonlinear optimization library Nlopt.

Deep Learning

  • Arraymancer - A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU, OpenCL and embedded devices.
  • NimTorch - PyTorch - Python + Nim. A Nim front-end to PyTorch's native backend, combining Nim's speed, productivity and portability with PyTorch's latest implementations.
  • laser - Carefully-tuned primitives for running tensor and image-processing code on CPU, GPUs and accelerators.

Bigints

  • bigints - Bigints for Nim.
  • stint - Stack-based arbitrary-precision integers. Fast and portable with natural syntax for resource-restricted devices.
  • theo - An optimized bigint and number theory library for Nim.

Cryptography

  • nimcrypto - Nim cryptographic library.
  • nimaes - Advanced Encryption Standard, Rinjdael Algorithm written in Nim.
  • constantine - Constant time pairing-based of elliptic curve based cryptography and digital signatures.
  • bslcurve - Nim implementation of BLS signature scheme (Boneh-Lynn-Shacham) over Barreto-Lynn-Scott (BLS) curve BLS12-381.
  • bncurve - Nim implementation of Barreto-Naehrig pairing-friendly elliptic curve.
  • xxtea - XXTEA encryption algorithm library.
  • crc32 - CRC32 for Nim. Just pass the thing you want to do CRC.
  • rollinghash - High performance Nim implementation of a Cyclic Polynomial Hash, aka BuzHash, and the Rabin-Karp algorithm.
  • murmurhash - Pure Nim implementation of MurmerHash
  • des - DES/3DES, DUKPT and MAC in Nim.
  • shimsham - A collection of hash functions, including JH, SHA-2, SHA-3, SipHash, Tiger, and Whirlpool.
  • NiMPC - A secure multi-party computation (MPC) library for the Nim programming language.

Blockchain

  • eth - Common utilities for Ethereum.
  • nimbus-eth1 - An Ethereum 1.0 and 2.0 client for resource-restricted devices.
  • nimbus-eth2 - Efficient implementation of the Ethereum 2.0 blockchain.
  • evmc - Ethereum VM binary compatible interface.
  • ethash - A pure-Nim implementation of Ethash, the Ethereum proof of work.
  • contract-abi - Implements encoding of parameters according to the Ethereum Contract ABI specification.

Compression

  • zippy - Pure Nim implementation of deflate, zlib, gzip and zip.
  • supersnappy - Dependency-free and performant Nim Snappy implementation.
  • snappy - Nim implementation of Snappy compression algorithm.
  • zip - Wrapper for the zip library.

User Interface

Terminal

  • illwill - Simple cross-platform terminal library inspired by (n)curses.
  • NimCx - Color and utilities for the Linux terminal.
  • pager - A simple command line pager library, written in Nim.

Design

  • chroma - Everything you want to do with colors, in Nim.
  • typography - Fonts, typesetting and rasterization.
  • trick - Library for GBA/NDS image conversion, and more!

GUI

Crossplatform

  • nimx - Desktop, Mobile & Web GUI framework in Nim.
  • NiGui - A cross-platform, desktop GUI toolkit.
  • ui - Wrapper for libui. Beginnings of what might become Nim's official UI library.
  • iup - Wrapper for IUP. Beginnings of what might become Nim's official UI library.
  • SDL2 - Official wrapper for SDL 2.x.
  • SDL2 - A wrapper for SDL 2.

Windows

  • wNim - Nim's Windows GUI Framework.

Linux

  • gintro - High-level GObject-Introspection based GTK3/GTK4 bindings for Nim.
  • nimqml - Qt QML bindings for the Nim programming language.

Web Technology

  • Neel - A library for making Electron-like HTML/JS GUI apps.
  • nimview - A Nim/Webview based helper to create desktop/server applications with Nim and HTML/CSS.
  • webgui - Web technologies based cross-platform GUI Framework with a dark theme.
  • fidget - Figma based UI library for Nim, with HTML and OpenGL backends.
  • nsciter - High-level and low-level Nim wrapper for https://sciter.com.

Lightweight

Plotting

  • ggplotnim - A port of ggplot2 for Nim.
  • plotly - A plotly wrapper for Nim.
  • graph - A basic plotting library in Nim.
  • nimetry - Simple plotting in pure Nim.
  • nimgraphviz - A Nim library for making graphs with GraphViz and DOT.

Web

Protocols

  • http-utils - HTTP helper procedures.
  • puppy - Puppy fetches HTML pages for Nim.
  • netty - Reliable UDP connection library for games in Nim.
  • json-rpc - Nim library for implementing JSON-RPC clients and servers.
  • nmqtt - Native Nim MQTT client library.
  • libp2p - A Nim implementation of the libp2p networking stack.
  • libp2p-dht - DHT based on the libp2p kademlia spec.
  • webdavclient - WebDAV client for Nim.
  • stomp - A pure-Nim client library for interacting with Stomp compliant message brokers.
  • presto - An efficient REST API framework.

DNS

  • ndns - A pure Nim Domain Name System (DNS) client.
  • dnsprotocol - Domain Name System (DNS) protocol for Nim programming language.

QUIC

  • quic - QUIC for Nim. This is very much a work in progress, and not yet in a usable state.
  • ngtcp2 - A wrapper around ngtcp2: an effort to implement IETF QUIC protocol.

Websockets

  • ws - Simple WebSocket library for Nim.
  • websocket.nim - WebSockets for Nim.
  • news - Nim Easy WebSocket. Based on ws.
  • jswebsockets - WebSockets optimized for JavaScript targets.
  • websock - An implementation of the WebSocket protocol for Nim.

Messaging

  • telebot.nim - Async client for Telegram Bot API in pure Nim.
  • dimscord - A Discord Bot & REST Library for Nim.
  • nwaku - Implementation of the Waku v1 and v2 protocols.
  • status - Nim implementation of the Status protocol.

HTML Parsers

  • Nimquery - Library for querying HTML using CSS selectors, like JavaScript's document.querySelector.

HTTP Servers

  • httpbeast - A highly performant, multi-threaded HTTP 1.1 server (top 10 in FrameworkBenchmarks).
  • httpx - Cross platform web server for Nim. A fork of httpbeast adding Windows support.
  • GuildenStern - Genuinely multithreading integrated HTTP/1.1 + WebSocket v13 Server for POSIX-compliant OSes.
  • netkit - Out-of-the-box, stable and secure network facilities and utilities written in pure Nim.
  • jshttp2 - Async HTTPS 2.0 web server.

Frameworks

  • Jester - The sinatra-like web framework for Nim. Jester provides a DSL for quickly creating web applications in Nim.
  • prologue - A fullstack web framework written in Nim.
  • whip - Simple and fast HTTP server for Nim based on httpbeast and nest for high performance routing.
  • basolato - A fullstack web framework for Nim based on Jester.
  • karax - A framework for developing single page applications in Nim.
  • akane - An asynchronous web framework.
  • scorper - A micro and elegant web framework written in Nim.
  • starlight - Flask-like web framework written in Nim.
  • rosencrantz - DSL to write web servers, inspired by Spray and its successor Akka HTTP.
  • nim_websitecreator - Nim fullstack website framework - deploy a website within minutes.

Template Engines

  • smalte - It is a dead simple and lightweight template engine. Specially designed for configure application before start in Docker.
  • html-dsl - Nim HTML DSL.
  • templates - A simple string templating library for Nim.
  • nimja - Typed and compiled template engine inspired by jinja2, twig and onionhammer/nim-templates for Nim.
  • mustache - A full implementation of v1.2.1 of the Mustache spec.

Authentication

  • httpauth - HTTP Authentication library for Nim.
  • oauth - OAuth library for Nim.

Game Development

Game Libraries

  • nimgl - NimGL is a Nim library that offers bindings for popular libraries used in computer graphics.
  • glm - Port of the popular glm C++ library to Nim.
  • GLAD - Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
  • enu - 3D live coding with a Logo-like DSL for Godot, implemented in Nim.

Game Frameworks

  • nico - Nim Game Framework based on Pico-8.
  • natu - Toolkit for writing Game Boy Advance games in Nim.
  • naylib - safe Raylib wrapper.
  • c4 - Modular and extensible 2D and 3D game framework for Nim.
  • paranim - A game library based around carefully chosen abstractions.

Game Engines

  • NimForUE - Nim plugin for UE5 with native performance, hot reloading and full interop that sits between C++ and Blueprints.
  • nimgame2 - A simple 2D game engine for Nim.
  • norx - A complete wrapper of the ORX 2.5D cross platform game engine library.
  • godot-nim - Nim bindings for Godot Engine.
  • rod - Cross-platform 2D and 3D game engine.
  • frag - Cross-platform 2D/3D game engine.

Rules Engines

  • turn_based_game - A game rules engine for simulating or playing turn-based games.
  • pararules - A RETE-based rules engine made for games.

Development Tools

Editor Integration

  • Editor Support - Official list of editor plugins for Nim.
  • nimlsp - The Language Server Protocol implementation for Nim.
  • nim.nvim - Nim plugin for NeoVim.
  • vscode-nim - Language support for the Nim programming language for VS Code.

REPL

  • INim - Interactive Nim Shell.
  • jupyternim - A Jupyter kernel for Nim.

Binding Generators

  • c2nim - c2nim is a tool to translate Ansi C code to Nim.
  • nimgen - nimgen is a helper for c2nim to simplify and automate the wrapping of C libraries. Superseded by nimterop.
  • nimterop - A Nim package that leverages tree-sitter to make C/C++ interop seamless. Superseded by Futhark.
  • Futhark - Automatic wrapping of C headers in Nim with libclang.
  • nimpy - Generate Python wrappers and call Python from Nim.
  • jnim - Nim - Java bridge.

Build Systems / Package Management

  • ChooseNim - Installing and switching between Nim versions (à la rustup, pyenv).
  • Nake - Describe your Nim builds as tasks.
  • Nawabs - A build system that throws away version numbering in favor of git hashes.
  • Nimble - Nimble can be used as a build system.
  • nimph - Nim package hierarchy manager from the future.
  • nimby - A very simple and unofficial package manager for Nim.
  • nifty - A decentralized pseudo package manager and script runner.
  • nsis - Nim programming language setup tool.

Logging

  • chronicles - A crafty implementation of structured logging for Nim.
  • morelogging - Logging library for Nim.

Testing

  • faker - A Nim package that generates fake data for you.
  • balls - A unittest macro to save the world, or at least your Sunday.
  • einheit - A Nim unit testing library inspired by Python's unit tests.
  • asynctest - Complements the standard unittest module in Nim to allow testing of asynchronous code.
  • unittest2 - Fork of the "unittest" Nim module focusing on parallel test execution, test-level scoping and strict exception handling.

Fuzzing

  • drchaos - A powerful and easy-to-use fuzzing framework in Nim for C/C++/Obj-C targets.
  • libfuzzer - LibFuzzer's interface bindings.

Benchmarking

  • golden - A benchmark for compile-time and/or runtime Nim.
  • timeit - Measuring execution times written by Nim.
  • criterion - Statistic-driven micro-benchmark framework.
  • stopwatch - A fork of rbmz's stopwatch that adds extra features.
  • nimbench - A micro benchmark module for Nim.

Command-Line Interface Automation

  • cligen - Infer & generate command-line interace/option/argument parsers.
  • docopt.nim - Command-line args parser.
  • argparse - Argument parsing for Nim.
  • clapfn - Argument parsing similar to Python's argparse.
  • cliche - AutoMagic CLI argument parsing is so cliché.
  • loki - A small library for writing line-oriented command interpreters in Nim.
  • confutils - Simplified handling of command line options and config files

Resources

Books

  • Nim in Action - Book in Manning's "in Action" series, teaching Nim through 3 practical projects including CLI chat apps, web apps and parsers.
  • Computer Programming with Nim - A gentle introduction to the Nim programming language.
  • Nim Basics - Tutorial for beginners and people just starting with Nim.
  • Nim Style Guide - Status style guide for the Nim language.
  • Mastering Nim - A complete guide to the programming language.

Blogs

Community

Tutorials

  • Nim Days - A project to document my journey with Nim with mini applications, libraries documented from A to Z and also to provide new Nim users with some extra in depth information.
  • How I start - Great guide going from 0 to a bf interpreter and then a bf to Nim compiler.
  • Learn Nim in Y minutes - Whirlwind tour.
  • Nim by Example - Series of pages and examples for learning the Nim programming language.
  • Nim for Python programmers - Guide to Nim for people with experience in Python.
  • Nim on Rosetta Code - Thousands of solutions for various tasks using Nim.
  • Nim Memory - A small tutorial explaining how Nim stores data in memory.
  • Nim ARC - A friendly explanation of ARC and its implications for the programmer.
  • nimNx - A Nintendo Switch Homebrew example project, written in Nim.
  • nimNxStatic - A static library example aiming to help integrate Nim code into the current Homebrew C projects for Nintendo Switch

Videos


Footnotes

Awesome-Nim logo is based on the "Nim Crown" logo by Joseph Wecker, used with permission from the Nim project.