ilusm.dev
Tooling

Tooling

Reference for Ilusm tooling. The minimal public bundle ships with ilusm, stage‑0, ilusm.ilbc, lib/, and the VSCode extension.

ilusm: main launcher

The ilusm shell script is the main launcher. It sets ILUSM_HOME, checks/rebuilds ilusm.ilbc if lib sources changed, writes the argv/env snapshot, and runs your code through the stage-0 seed.

Usage

$ ilusm hello.ilu # run a program $ ilusm hello.ilu arg1 arg2 # pass arguments to the script $ ./ilusm hello.ilu # run from the bundle directory

On Windows with Git Bash: use ilusm.cmd wrapper or run ./ilusm directly in Git Bash.

ilusm-vm: stage-0 runner

The stage-0 seed binary (minimal VM). The launcher calls this internally, but you can run it directly. Created by build.sh as a symlink at bin/ilusm-vm.

Usage

$ ilusm-vm run hello.ilu # run a file $ ilusm-vm compile # rebuild ilusm.ilbc

Stage-0 is the minimal evaluator used to bootstrap the full language. No ILUSM_HOME auto-setup, no argv snapshot (reads ilusm_run_ctx.json).

build.sh: self-hosted build

Rebuilds ilusm.ilbc from lib/ sources using the stage-0 seed. This is the "Haskell way" - the compiler is written in Ilusm and compiles itself.

Usage

$ ./build.sh # rebuild ilusm.ilbc

Also creates bin/ilusm-vm symlink for direct VM access. Run this after modifying any lib/ source files.

Environment variables

VariableDefaultDescription
ILUSM_HOMEbundle rootInstall root (where ilusm is installed). Set automatically by launcher.
ILUSM_CMD./ilusmOverride the runner binary (used by benchmark scripts).

VSCode extension

The ilusm VS Code / Cursor extension (syntax, snippets, default .ilu icon) ships inside the official install under vscode-extension/. It is not on the VS Code Marketplace.

Installation

  1. Install Ilusm from Download (or unpack the minimal bundle).
  2. Open the vscode-extension folder inside the install root in VS Code → Run → Start Debugging (F5) for dev, or run npx @vscode/vsce package there to build a .vsix.
  3. To install a .vsix: Extensions sidebar → Install from VSIX…
  4. Reload the editor. .ilu files pick up the bundled grammar and icon.

Features

FeatureDetails
Syntax highlightingKeywords, literals, strings, comments, module names
Code snippetsfn, whl, if, use, try, common patterns
Run fileCtrl+F5 runs the current file in the integrated terminal when tasks point at ilusm.
Run selectionUse a small scratch .ilu or your task config.
File iconDefault .ilu icon in the editor (heart asset in the bundle).

Manual install from source

# The extension source is in vscode-extension/ $ cd vscode-extension $ npm install $ npx vsce package # produces ilusm-*.vsix $ code --install-extension ilusm-*.vsix