Skip to content
treeformPublic

About

Treeform's hobby is to create Nim libraries that end with y.

Resources

Stars

30 stars

Watchers

2 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Treeform's & Guzba's hobby

Our hobby is to create Nim libraries that end with y. Here is a list of our libraries and a short description of why you should use them:

Most of them only depend on the Nim standard library or our other libraries.

All MIT-licensed!

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Pixie is a 2D graphics library similar to Cairo and Skia written entirely in Nim.

  • Typesetting and rasterizing text, including styled rich text via spans.
  • Drawing paths, shapes and curves with even-odd and non-zero windings.
  • Pixel-perfect AA quality.
  • Supported file formats are PNG, BMP, JPG, SVG + more in development.
  • Strokes with joins and caps.
  • Shadows, glows and blurs.
  • Complex masking: Subtract, Intersect, Exclude.
  • Complex blends: Darken, Multiply, Color Dodge, Hue, Luminosity... etc.
  • Many operations are SIMD accelerated.

GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Fidget aims to provide performant natively compiled cross-platform UIs for any platform - Web with HTML5, Windows, macOS, Linux, iOS and Android with OpenGL.

Fidget leverages Figma - an app that is taking the design world by storm. It does this by providing a Figma plugin to export directly to Fidget code! No more counting stupid pixels, no more CSS puzzles. Want to change some spaces? Change it in Figma and export.

Fidget uses plain nim-procs, nim-templates, if-statements and for-loops, while providing only the minimal primitives found in Figma.

⚠️ WARNING: This library is deprecated in favor of Fidget 2. ⚠️

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Fidget2 aims to provide natively compiled cross-platform UIs for any platform - Web with HTML5 (WASM), Windows, macOS, and Linux.

Fidget2 leverages Figma - an app that is taking the design world by storm. Fidget2 uses the Figma API to load designs directly. No more counting pixels, no more CSS puzzles. Want to change some spaces? Change it in Figma, press F5, and see the changes in real time!

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Silky is an immediate mode GUI for Nim that focuses on speed above all else.

  • Immediate mode UI design that aims to feel natural in Nim.
  • Includes fast atlas-based rendering, 9-patch support, and a clean UI DSL.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Simple WebSocket library.

  • Client and Server Side WebSocket
  • Async/Await Support
  • WebSocket Protocols
  • Timeouts and Disconnects
  • SSL support
  • Jester support
  • Compliant with the WebSocket protocol.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Zippy is an implementation of DEFLATE, ZLIB and GZIP data compression formats.

Zippy can also open ZIP archives (.zip) and Tarballs (.tar, .tar.gz, .tgz, .taz).

The goal of this library is to be a pure Nim implementation that is small, performant and dependency-free.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

A loose, direct to object JSON parser and serializer with hooks.

Real-world JSON is never what you want. It might have extra fields that you don't care about. It might have missing fields requiring default values. It might change or grow new fields at any moment. JSON might use camelCase or snake_case. It might use inconsistent naming.

With this library you can use JSON your way, from the mess you get to the objects you want.

  • Parses and serializes JSON very fast.
  • newHook, postHook, enumHook, renameHook, parseHook, dumpHook, skipHook
  • Support for JSON-in-JSON and raw JSON.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Mummy is a multi-threaded HTTP 1.1 and WebSocket server written entirely in Nim. Mummy has been written specifically to maximize the performance of your server hardware without compromising on programmer happiness.

  • Supports HTTP keep-alive and gzip response compression automatically.
  • Built-in first-class WebSocket support.
  • Multiplexed socket IO without the {.async.} price.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Generate Nim library bindings for many languages.

So you made a cool Nim library but you want it to be available to other languages as well. With genny you can generate a dynamically linked library with a simple C API and generated bindings for many languages. In some ways it's similar to the SWIG project for C or djinni for C++.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Nimby is an unofficial package manager and installer.

  • Very fast, downloads minimal files from Git in parallel.
  • Installs Nim itself if you want.
  • Works with lock files to make CI and reproducible builds easy.
  • Workspace-based installation.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Fetch resources via HTTP and HTTPS.

Puppy does not use Nim's HTTP stack. Instead, it uses the WinHttp API on Windows, AppKit on macOS, and libcurl on Linux. Because Puppy uses system APIs, there is no need to ship extra *.dlls, cacert.pem, or remember to pass the -d:ssl flag. This also has the effect of producing slightly smaller binaries.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Reliable UDP connection.

Netty is a reliable connection over UDP aimed at games. Normally UDP packets can get duplicated, dropped, or come out of order. Netty makes sure packets are not duplicated, re-sends them if they get dropped, and all packets come in order. UDP packets might also get split if they are above 512 bytes and can also fail to be sent if they are bigger than 1-2k. Netty breaks up big packets and sends them in pieces, making sure each piece comes reliably and in order. Finally, sometimes it's impossible for two clients to communicate directly with TCP because of NATs, but Netty provides hole punching that allows them to connect.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Steamworks is a Nim wrapper for Valve's Steamworks API.

  • User accounts and friends.
  • Achievements and stats.
  • Controller and Steam Input support.
  • Networking, lobbies, and workshop items.
  • Generated from the Steamworks SDK specification with a Nim-friendly API.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Nim to GPU shader language compiler and supporting utilities.

Shady can compile a subset of Nim into OpenGL Shader Language used by the GPU. This allows you to test your shader code with echo statements on the CPU and then run the exact same code on the GPU.

  • Write vertex and fragment/pixel shaders for games and 3D applications.
  • Write compute shaders for offline processing and number crunching.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Metal 4 bindings for Nim on macOS.

  • Low-level access to Apple's Metal API.
  • Useful for graphics experiments, renderers, and native macOS GPU work.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Vulkan 1.4 wrapper across platforms.

  • A close-to-the-API wrapper for explicit modern graphics programming.
  • A good fit for engines, tools, and rendering experiments that want Vulkan control.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

OpenGL 4.6 DSA wrapper across platforms.

  • Focused on modern OpenGL 4.6 Direct State Access style APIs.
  • Handy when you want a thin wrapper over OpenGL.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

DirectX 12 wrapper on Windows.

  • Low-level DirectX 12 access for native Windows rendering code.
  • Useful for engines, tools, and GPU experiments targeting Windows.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

You can use this Nim template to jump-start your Nim library or project.

This template includes:

  • MIT licence
  • src directory and a private common.nim
  • test directory
  • GitHub Actions to run the tests on GitHub

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Everything you want to do with colors.

  • Color spaces: CMY, CMYK, HSL, HSV, YUV, XYZ, LAB, CIELCh, LUV, CIELCH, Oklab
  • Easily parse and transform colors. FFFFFF, #FFFFFF, rgb(255, 255, 255), rgba(255, 255, 255, 1.0)
  • Optimized to be fast and consistent.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Windy will work great for 2D and 3D OpenGL games as well as GUI apps using OpenGL. Using this library should feel similar to GLFW or SDL.

Features:

  • Multi-platform (Windows, macOS, Linux)
  • Manage one or many windows
  • Customizable windows (resizable, hidden, fullscreen and more)
  • Use custom window icons and cursors
  • DPI and content-scaling aware
  • Mouse input (position, clicks, scroll)
  • Double-click, triple-click and quadruple-click events
  • Keyboard input (key events + unicode)
  • Easy polling of keyboard state via buttonDown[Button] and more
  • IME support (for Chinese, Japanese etc text input)
  • System clipboard (copy and paste) support
  • Show a system tray icon and menu (Windows only)
  • Non-blocking HTTP requests and WebSockets
  • Basic Example

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Paddy is a gamepad API for Nim, designed to pair with Windy. Windy gives you the window and the frame flow, Paddy gives you the controllers. Gamepad support pulls in extra platform frameworks and setup, so it lives in its own library that you only opt into if you need it.

  • Multi-platform, using the native backend on each one: XInput on Windows, GameController.framework on macOS, udev + evdev on Linux, and the HTML5 Gamepad API on the web.
  • Poll controllers once per frame, then read a consistent gamepad state.
  • Connection status and device names.
  • Buttons, plus pressed and released edges.
  • Trigger pressure and analog stick axes.
  • D-pad state.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Boxy is an easy to use 2D GPU rendering API built on top of Pixie.

The basic model for using Boxy goes something like this:

  • Open a window and prepare an OpenGL context.
  • Load image files like .png using Pixie.
  • Render any dynamic assets (such as text) into images once using Pixie.
  • Add these images to Boxy, where they are put into a tiling atlas texture.
  • Draw these images to screen each frame.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Serializer and tools for flat binary blobs.

  • Aim of flatty is to be the fastest and simplest serializer/deserializer.
  • Also includes hexprint to print out binary data.
  • Also includes binny a simpler replacement for StringStream (no IO effects, operates on a string)
  • Also includes hashy a hash for any objects based on the flatty serializer.
  • Also includes encode a way to convert to/from utf16 BE/LE and with BOM and utf32.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Vector math routines for 2D and 3D graphics.

  • Pure Nim with no dependencies.
  • 2D & 3D matrix math
  • Transform, Rotation and Scale Matrixes
  • All (vec3, ivec3, dvec3, uvec3, bvec3, ...) GLSL types!
  • Very similar to GLSL Shader Language with extra stuff.
  • Extensively benchmarked.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

glTF 3D format library and viewer.

  • Load and work with glTF assets directly.
  • Includes a viewer, making it useful for both tooling and rendering experiments.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Supersnappy is a pure Nim implementation of Google's Snappy compression algorithm. The goal of this library is to be small, straightforward, dependency-free and highly performant.

Benchmarking shows this library performs significantly better in all cases than alternatives even the original C++ reference implementation.

GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Timestamps, calendars, and timezones library.

  • Parse Timestamps
  • Format Timestamps
  • Manipulate Calendars
  • Use Timezones
  • In JS mode: only ship the Timezones you use.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Simple benchmarking to time your code.

Just put your code in a timeIt block. Also put the result of your computation into keep() so that the compiler does not optimize it out. Don't forget to run with -d:release or, better yet, -d:danger.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Spatial data structures.

Spatial algorithms are used to find the "closest" things faster than simple brute force iteration would. They make your code run faster using smarter data structures. This library has different "Spaces" that you can use to speed up games and graphical applications.

  • BruteSpace (for loop)
  • SortSpace (quick sort)
  • HashSpace (2D hash table)
  • QuadSpace (Quad-tree)
  • KdSpace (KD-tree)

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Orbits are beautiful, with their gentle curves and sweeping arcs. They have captivated astronomers for thousands of years and helped make mathematics and physics what they are today. There is so much to orbits if you dig deeper. Where do you get the most accurate data? How do you compute transfer windows? Can you plot trajectories of spacecraft? This is what this library is about. An exploration of the deep beyond with Nim at your side.

  • Simple Elliptical Orbits
  • Kernel Files Orbits (NASA's .bsp SPICE SP-kernels)
  • JPL Horizon Orbits
  • Simulations
  • Astrometry

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

2D geometry intersections library.

  • Point
  • Circle
  • Rectangle
  • Segment
  • Polygon
  • Line

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Webby is a collection of common HTTP data structures and functionality. This includes things for parsing and generating:

  • Url
  • HTTP headers
  • Query Parameters

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

3D sound API.

  • .wav and .ogg loading.
  • 3D positions of sounds.
  • 3D position of listener.
  • Doppler shift.
  • Acoustic attenuation.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

1D and 2D bit arrays and operations.

If you have types like seq[bool] in your code, switching to bit arrays will cut down on space used.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Hide data inside an image. Encode and decode images.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

  • HTML Parser/Serializer
  • XML Parser/Serializer
  • Static HTML Generator
  • Static CSS Generator

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Fast CSV parser with hooks.

This library parses .csv or .tsv files directly into Nim objects. This is different from how Nim's standard library parsecsv works which first parses them into an intermediate representation. This makes tabby generate fewer memory allocations.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Pleasant bindings for various SIMD instructions.

  • SSE
  • SSE2
  • SSE3
  • SSSE3
  • SSE4.1
  • SSE4.2
  • AVX
  • AVX2
  • PCLMULQDQ

GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Redis client that is built to work well in multi-threaded programs. A great use-case for Ready is in a multi-threaded HTTP server like Mummy.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Crunchy provides pure Nim implementations of common hashes and data integrity checks (cyclic redundancy checks and checksums). These implementations are intended to be high-performance, including amd64 and arm64 SIMD implementations or using instruction set intrinsics.

  • SHA-256
  • CRC-32
  • CRC-32C
  • Adler-32

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Blocking WebSocket client. This library provides an alternative to async for situations where it is easier or more comfortable to write blocking code.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

Curly makes pooling and reusing libcurl handles easy.

Why pool and reuse libcurl handles? Doing so enables reusing Keep-Alive connections. This is especially beneficial for servers frequently making requests to HTTPS endpoints by skipping the need to open a new connection and do a TLS handshake for every request.

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

JWTea enables the creation of JSON Web Tokens in pure Nim, without any dependency on OpenSSL or other external libraries. OpenSSL is one of the truly legendary sources of programmer pain so this repo was motivated by refusing that dependency.

  • HS256
  • RS256

Github Actions GitHub release (latest by date) GitHub Repo stars GitHub GitHub issues

A pretty prettying, better echo.

Use pretty.print the same way you would use echo for pretty-debugging. It pretty prints objects the "Nim way" with syntax highlighting. Even with refs, pointers, or cycles!

Deprecated libraries

We have written some libraries that we are no longer maintaining:

About

Treeform's hobby is to create Nim libraries that end with y.

Resources

Stars

30 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

Generated from treeform/nimtemplate