Command-line interface
Command-line interface🔗
Building or installing Nybl 0.4 requires Rust 1.88 or newer. Install the current Nybl command-line tool from crates.io:
cargo install nybl-cliRun a script🔗
nybl run app.nyblnybl run uses the bytecode VM by default. It runs the warning pass before execution, resolves std.* from the bundled standard library, and resolves other module paths relative to the script.
Use the tree-walker when debugging engine behavior or minimizing the active runtime:
nybl run --novm app.nyblBoth paths render the same source snippets, carets, hints, module context, and warnings.
Compile a native executable🔗
nybl compile app.nybl
nybl compile app.nybl -o my-appThe command transpiles Nybl to Rust, creates a temporary Cargo project, builds a release binary, and copies it to the requested output path. cargo and a Rust toolchain must be available for this step. By default, app.nybl builds ./app; an extensionless source such as app builds ./app-bin so the source can never be mistaken for its output. On Windows, native outputs also receive the .exe suffix.
An explicit output path that resolves to the source itself is rejected before the build starts. Use -o with a distinct path instead.
Use --emit-rs to stop after transpilation:
nybl compile --emit-rs app.nybl -o app.rsUse --keep when building a binary to retain the scratch Cargo project for inspection after the command finishes.
Open the REPL🔗
Either spelling starts the persistent interactive session:
nybl
nybl replSee REPL for multiline input, live bindings, history, completion, meta-commands, and piped transcripts.
Help and version🔗
nybl --help
nybl --versionArgument and usage errors exit with status 2. Parse, runtime, module, and build failures exit non-zero after rendering their diagnostic.