Using Nimble develop to Test Local Library Changes In‑Place
Learn how Nimble's develop command creates a symlink‑based link to a local package so you can test changes instantly without reinstalling.
04 Mar 2026, 09:43 UTC

Problem: Slow Library Iteration
When you depend on a third‑party Nim library, every change you make to its source requires a reinstall or a version bump before you can see the effect in your application. This loop slows down debugging and feature development.
How nimble develop Works
The nimble develop command creates a symlink‑based entry in the consuming project’s nimble.cfg. Instead of pulling the package from the registry, Nimble records an absolute filesystem path to the local source checkout. Subsequent nimble build or nimble test invokes the Nim compiler against those files, so edits appear instantly.
Worked Example: Linking a Local Fork
- Fork the library you want to modify (e.g.,
jsonutils) and clone it locally: - Enter your application project and run the develop command, pointing to the clone:
- Nimble updates
nimble.cfg. You should see a line similar to: - Make a change in the local source, for example add a debug print to
jsonutils.nim: - Re‑build the application and verify the change is used:
- The link stores an absolute path. If you move or delete the local source folder, builds fail with “cannot find source” errors until you re‑run
nimble developwith the new location. - While a develop link is active, Nimble ignores the published version number for that package. Publishing a new version without updating the local link can cause confusion about which code is actually being used.
- The feature works for both registry packages and private Git repositories, but the local source must contain a valid
nimble.cfg; otherwise Nimble will refuse to create the link.
git clone https://github.com/yourname/jsonutils.git /home/user/code/jsonutils
cd /path/to/myapp
nimble develop jsonutils /home/user/code/jsonutils
requires = "jsonutils @ /home/user/code/jsonutils"
echo 'printf("debug: entering parse\n")' >> /home/user/code/jsonutils/jsonutils.nim
nimble build -v
The verbose output will show the compiler reading /home/user/code/jsonutils/jsonutils.nim, and the printed message will appear when you run the built binary.
Trade‑offs and Limitations
Closing: Adopt the Workflow Safely
Use nimble develop when you need rapid feedback on a library change. Keep the local checkout in a stable location, remember to remove the link (or revert nimble.cfg) before publishing a new version, and always verify the link with a verbose build. When the change is ready, push your fork, update the version requirement in nimble.cfg, and run nimble develop again without a path to return to the registry version.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.