Skip to content
Noodle
InstallLearnPlayground
GitHub

Everyday workflow

The Noodle command-line tool works with package directories and program entry files. A directory containing .nl files is already a package; it does not need an nlpkg.json manifest unless it has package-level configuration.

Terminal window
noodle check hello

check loads every module in the package and reports syntax, type, and other compile-time diagnostics. Use it for the fastest feedback when you do not need JavaScript output.

Terminal window
noodle build hello

build checks the package and writes derived artifacts under hello/.nlc/. Noodle emits ordinary modular JavaScript ESM: source modules remain visible as separate generated modules instead of being bundled into one user-program file.

The .nlc directory is generated state. Do not treat its contents as source files or handwritten public interfaces.

Terminal window
noodle run hello/hello.nl

run receives a source file rather than a package directory. The selected file must declare exactly one non-generic main function with no parameters and a Unit result. An asynchronous main is also supported.

Terminal window
noodle test hello

test checks the package, discovers its test declarations, and runs them in a separate test target. Tests may use private declarations from their own module and do not become part of production module exports.

Terminal window
noodle build hello/hello.nl --wpo

--wpo links the entry and everything it reaches into one ESM module and writes hello/.nlc/Hello.wpo.mjs plus a directly executable hello/.nlc/Hello.wpo.exe.mjs. Modular .nlc artifacts still work, but the bundle is the artifact to ship: it holds the whole program’s optimized code instead of one module per file.

A bundle keeps only the entry’s $noodle$main export; module boundaries and generated names inside it are not a public interface. Field names are renamed too, so a host companion that reads or builds a value needs the field marked with @link — see Extern bindings.

Continue with the language overview.