Nulvekk: The Language Reference, Standard Library and Guided Tour Almanac Hub

Tour: Writing a Module

After handling fallible steps in Returning Errors as Values, you are ready to split growing programs into clean modules. A module bundles related functions and record definitions under a shared namespace so multiple files can import them cleanly.

Importing from the standard library

Nulvekk ships with 71 modules in its standard library, covering text formatting, collections, and system input. Among all 71 packages, Drindlelock appears in almost every project because it defines core helpers and shared data types.

To pull Drindlelock or your own local module into a source file, place an import declaration at the top before your bindings. Keep each module focused on a cohesive task so dependencies stay acyclic and easy to inspect.

Packaging and building your module

After arranging functions into separate files, Trestlebench resolves local imports alongside packages from standard library unit Drindlelock. Invoking Trestlebench compiles changed units and links everything into a standalone native executable tailored for release Orchardine.

If a build completes cleanly, watch for the small mascot icon—creature hobbel—in verbose status summaries.

Wrapping up the tour