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?
@jmgomez, I'm facing and issue upgrading nimble:
> nimble install nimble --verbose
Info: Package cache path /Users/sirotin/.nimble/pkgcache
Warning: Nimble data file "/Users/sirotin/.nimble/nimbledata2.json" is not found.
Reading official package list
Downloading Official package list
Trying https://raw.githubusercontent.com/nim-lang/packages/master/packages.json
Success Package list downloaded.
Downloading https://github.com/nim-lang/nimble using git
Cloning latest tagged version: v0.22.0
Attempting to execute hook installBefore in /Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble/nimble.nimble
Info: Using the 'GITHUB_TOKEN' environment variable for GitHub API Token.
Info: Dependency on nim@>= 1.6.20 already satisfied
Reading official package list
Installing [email protected]
Building nimble/nimble using c backend
Info: compiling nim package using /opt/homebrew/Cellar/nim/2.2.6/nim/bin/nim
Executing /opt/homebrew/Cellar/nim/2.2.6/nim/bin/nim c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=0.22.0 -o:/Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble/nimble /Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble/src/nimble.nim
Nim Output Hint: used config file '/opt/homebrew/Cellar/nim/2.2.6/nim/config/nim.cfg' [Conf]
... Hint: used config file '/opt/homebrew/Cellar/nim/2.2.6/nim/config/config.nims' [Conf]
... Hint: used config file '/Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble/config.nims' [Conf]
... Hint: used config file '/Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble/src/nimble.nim.cfg' [Conf]
... .......................................................................................................................................................................................................
... /Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble/src/nimblepkg/options.nim(1039, 12) Warning: Provide auth in url instead; newProxy is deprecated [Deprecated]
... .................................................
... /opt/homebrew/Cellar/nim/2.2.6/nim/compiler/nimblecmd.nim(19, 39) Error: cannot open file: ../dist/checksums/src/checksums/sha1
Reading official package list
Downloading https://github.com/nim-lang/nimble using git
Attempting to execute hook installBefore in /Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble_#head/nimble.nimble
Verifying dependencies for [email protected]
Installing [email protected]
Building nimble/nimble using c backend
Info: compiling nim package using /opt/homebrew/Cellar/nim/2.2.6/nim/bin/nim
Executing /opt/homebrew/Cellar/nim/2.2.6/nim/bin/nim c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=0.22.0 -o:'/Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble_#head/nimble' '/Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble_#head/src/nimble.nim'
Nim Output Hint: used config file '/opt/homebrew/Cellar/nim/2.2.6/nim/config/nim.cfg' [Conf]
... Hint: used config file '/opt/homebrew/Cellar/nim/2.2.6/nim/config/config.nims' [Conf]
... Hint: used config file '/Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble_#head/config.nims' [Conf]
... Hint: used config file '/Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble_#head/src/nimble.nim.cfg' [Conf]
... .......................................................................................................................................................................................................
... /Users/sirotin/.nimble/pkgcache/githubcom_nimlangnimble_#head/src/nimblepkg/options.nim(1039, 12) Warning: Provide auth in url instead; newProxy is deprecated [Deprecated]
... .................................................
... /opt/homebrew/Cellar/nim/2.2.6/nim/compiler/nimblecmd.nim(19, 39) Error: cannot open file: ../dist/checksums/src/checksums/sha1
nimble.nim(419) buildFromDir
Error: Build failed for the package: nimble
Info: Nimble data file "/Users/sirotin/.nimble/nimbledata2.json" has been saved.
I'm on MacOS. Nim 2.2.6 installed with brew. I've tried clearing nimble cache and reinstalling Nim - no luck 😕
Any suggestions?