dfkup's standard library as a nimble package. Every std/<name> module
(except system, which stays statically linked in the dfkup host binary)
lives here as stdkups/lib<name> and ships to users as a
libdfkup_<name> dylib shard loaded on first import "std/<name>".
src/stdkups/— the 30 shard modules pluscompileutils.nim(its owncompileCodecopy; dfkup carries an independent one insrc/lang/compileutils.nim, so neither package depends on the other).src/stdkups.nim— package root (documentation only).tools/stdlib_plugin.tmpl— dylib wrapper template.tools/build_shards.nim— dylib shard builder (workflow entry point).tests/—test_modules.nimcompile check plus the shard test suite (moved from the dfkup repo; tests exercise shards against the host interpreter vialang/...imports, with dfkup's sources on--pathfrom thedfkuppackage requirement).
Shards are built at workflow level (no nimble task). The build needs the
dfkup sources (lang/transformers, lang/parser); build_shards
finds them via --dfkup-src, a nearby checkout, or the dfkup package
itself (clue install dfkup --build). Plain nim c -r, std-only
imports:
nim c -r tools/build_shards.nim --dfkup-src ../dfkup --out ../dfkup/bin/stdlib--lock points at a clue.lock with resolved dependency paths
(the checkout's own lock when present). Without one, the builder
resolves stdkups.nimble transitively through the clue store
(~/.clue/develop, then ~/.clue/packages) — no lock file needed,
but the packages must be installed (clue install --depsOnly).
- Plain
import stdkups/lib<name>needs no host sources, exceptlibllm(viacompileutils, which uses the host'slang/parser).tests/test_modules.nimtherefore covers the 29 host-independent modules;libllmis compile-verified by the shard build itself. - Heap contract: shards and host share
--threads:on --mm:arc(seetools/build_shards.nim); exceptions never cross the dylib boundary (in-image guard re-raises through the host sink).
MIT license. Made by Humans from OpenPeeps.