Nox and libraries¶
Nox is what turns Novus from "a compiler you can run once" into a reusable ecosystem.
Initialise a project¶
That creates the project skeleton and pulls std.
Install a registry package¶
Nox downloads packages into lib/<name>/.
What libraries.conf is for¶
This file is the package manifest for the project.
Modern example:
installed=std,file_io
pkg:std:source=registry
pkg:std:url=https://github.com/MJDaws0n/novus-std
pkg:std:version=1.3.1
Older projects may include:
branch=...commit=...- version ranges
You will still see those in some repositories.
Importing installed packages¶
Once a package is present in lib/, import it from code:
Recommended app layout¶
For larger applications, keep the repository root simple and move most code into src/:
The usual pattern is:
- root
main.novstays small main.novimports files fromsrc/- feature code lives in
src/subfolders
Updating projects safely¶
If a project starts throwing strange errors after a package ecosystem change, check:
- the
libraries.confversion - the actual code inside
lib/<package>/ - whether the project has a stale vendored package copy
That specific problem appears often when older projects keep package directories checked into git.
Library layout¶
Application layout and library layout are slightly different.
For libraries, keep using the dedicated guidance in Authoring libraries. That page covers the public main.nov loader, VERSION, docs.md, tests, and platform folders.