nimdeps

Nim library to bundle dependency files into executable

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install nimdeps
choosenim install nimdeps
git clone https://github.com/genotrance/nimdeps

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
nimdeps - - - - - - -

Source

Repository https://github.com/genotrance/nimdeps
Homepage https://github.com/genotrance/nimdeps
Documentation View Documentation
Registry Source nimble_official

README

Nimdeps is a Nim package to bundle dependency files into the generated executable.

It is very common to have external dependency files such as data files, graphics and other payloads as part of an application. Nimdeps makes it easy to carry all this payload within the application binary instead of having to build a separate installer.

All dependencies get packaged into the application binary at compile time. All references to dependencies need to be relative to the application project directory at compile time. At runtime, all files are checked for existence and extracted if not already present or changed. Dependencies get extracted relative to the application location at runtime.

Installation

Nimdeps can be installed via Nimble:

> nimble install nimdeps

This will download and install nimdeps in the standard Nimble package location, typically ~/.nimble. Once installed, it can be imported into any Nim program.

Usage

Module documentation can be found here.

import nimdeps

const FILES = @["data.dat", "icon.png"]
setupDepFiles(FILES)

setupDepDir("depDir1")

setupDeps(@["data2.dat", "depDir2"])

NOTE: Nimdeps should be invoked prior to loading any of the dependencies so that they are extracted prior to usage. At this time, DLL files are not supported if they are loaded using the {.dynlib.} pragma since Nim loads such libraries prior to nimdeps running. Likewise if they are linked with -l since the OS checks for them at load time. This can be avoided by manually loading the DLL using the dynlib module or lazily loaded using the lazylib package.

Feedback

Nimdeps is a work in progress and any feedback or suggestions are welcome. It is hosted on GitHub with an MIT license so issues, forks and PRs are most appreciated.