The previous Nimble was designed around a greedy dependency solver, which caused fundamental design issues when the SAT solver was added later. vnext is a complete redesign of the dependency resolution pipeline that properly integrates:
| Test | v0.20 | v0.22 | Speedup |
|---|---|---|---|
| Cold start | 5m 26s | 3m 0s | 1.8x faster |
| Warm cache, fresh deps | 2m 25s | 24s | 6x faster |
| Regular run | 9s | 8s | ~same |
Note: v0.22 expands all package versions during resolution, while v0.20 was limited to 4 tagged versions per package. Despite doing more work, v0.22 is significantly faster due to cache expansion and other optimizations.
The previous code path is still available via the --legacy flag for retrocompatibility:
nimble install --legacy
This allows you to fall back to the old behavior if you encounter any issues with the new default mode. The `--legacy` flag will be removed in the next release, so please report any issues you find so they can be addressed before 1.0.0.
https://github.com/nim-lang/nimble/compare/v0.20.1...v0.22.0
We extend our gratitude to the Nim team for their hard work on these improvements, the community for their feedback, the contributors for their contributions, and special thanks to Status for sponsoring the development.
nimble install nimble is failing for me (on Debian 12).
The output:
Downloading https://github.com/nim-lang/nimble using git
Building nimble/nimble using c backend
Info: compiling nim package using /home/doublefreepointer/.nimble/pkgs2/nim-2.0.8-46333e8f4bda41dd6d3852a3f5fa4975b96b66a2/bin/nim
Nim Output /home/doublefreepointer/.nimble/pkgcache/githubcom_nimlangnimble/src/nimblepkg/compat/sequtils.nim(18, 24) Error: cannot move 'x', passing 'x' to a sink parameter introduces an implicit copy
Downloading https://github.com/nim-lang/nimble using git
Building nimble/nimble using c backend
Info: compiling nim package using /home/doublefreepointer/.nimble/pkgs2/nim-2.0.8-46333e8f4bda41dd6d3852a3f5fa4975b96b66a2/bin/nim
Nim Output /home/doublefreepointer/.nimble/pkgcache/githubcom_nimlangnimble_#head/src/nimblepkg/compat/sequtils.nim(18, 24) Error: cannot move 'x', passing 'x' to a sink parameter introduces an implicit copy
Tip: 16 messages have been suppressed, use --verbose to show them.
nimble.nim(419) buildFromDir
Error: Build failed for the package: nimble One minor quibble - nimble's reported version (at least for the downloaded linux_x64 binary) seems to be wrong:
[~]$ nimble -v
nimble v0.99.0 compiled at 2026-02-12 10:39:46
git hash: 31b262c559e2b0360a82996cc71a4f0931b48dee Likely you are trying to update from an old nimble version that picks the wrong nim. You may get around it with --useSystemNim That said, it should compile with any reasonable recent nim. We will make sure this is the case.
@lou15b thats quite strange indeed as the binaries are autogen when pushing the tags and other platforms seem to be correct. We will look into it
Thanks!
It fetches prebuilt binaries from nim-lang.org when available. If a binary isn't available for your platform/version, it falls back to downloading source from GitHub and compiling it. You can use --disableNimBinaries to force source compilation. Downloaded Nim versions are cached in ~/.nimble/nimbinaries/ and reused across projects.
And yes, nimble install nim (or nimble install [email protected]) installs Nim into pkgs2 and symlinks it to ~/.nimble/bin/nim, so if that's in your PATH it effectively becomes your system Nim. It can already serve as a choosenim/grabnim replacement for version management. Just make sure to be in global mode.
Wonderful! Congrats!
Love the idea by @moigagoo - making Nimble the Nim-manager as default would be full circle. And really looking forward to the nimbledeps/ in v1.0!
Keep up the good work @jmgomez and Nim team!
Awesome!
I've just tested this flow:
In general, I can say that this way of installing Nim looks like the best one out of everything offered so far. If we just put it in .sh/.ps1 scripts, that could very well become the official way to install Nim.
When no system Nim is present, Nimble downloads from nim-lang.org/releases.json
What if the hosting gets compromised and the links are substituted? Any hardening planned?
Thanks to everyone who reported issues — this patch addresses several of them alongside other minor issues.
- Fix global install of root package (nimble install -g) (#1612)
- Fix installing special versions of Nim globally, e.g. nim@#devel (#1610)
- Skip Nim binary download for actions that don't need it (#1607)
- Fix nimble install -g with multiple packages only installing the last one (#1604)
https://github.com/nim-lang/nimble/releases/tag/v0.22.1
To update: nimble install nimble
Nimble can now be installed with a single one-liner: https://nim-lang.github.io/nimble/install-nimble.HTML
Which means installing Nim ow now as easy as:
See the guide: https://nim-lang.github.io/nimble/install-nim.html
Is it possible to tell nimble to install the latest tagged version? Or the latest commit? Something like this: nimble install pkg@latest
I don't know if it's a bug, but I have nimble 0.22.2 and when I want to install a package, it installs a previous tagged version, not the latest one. It happens on my Manjaro box. However, I tried it under Windows too and there it installed the latest version of the package. nimble update was executed before.
@rarino you can use #head to install the latest commit. Latest version release ver is the default behaviour
@erayzesen That's a known pain point. When you requires "packagea" (no version constraint), nimble resolves it once and caches the result. Subsequent nimble install sees the package already in pkgs2/ and skips it Workarounds today:
That said, it is in the roadmap to add a specific command for this.