Install Joule
The joulec toolchain is at
v1.1.0. Install it with a package manager,
build it from source, or skip installing and try it in the
browser playground.
Skip the install
The Joule playground runs in your browser: editor, runs, and energy receipts, with nothing leaving the page. For learning and exploring, there is nothing to install.
Install with a package manager
Homebrew is live for macOS on Apple Silicon. Scoop and apt builds for Windows and Linux are on the way. On other platforms, build from source below.
# macOS (Apple Silicon), Homebrew $ brew install openIE-dev/joule/joule $ joulec --version # Windows (Scoop) and Linux (apt): coming soon
Build from source
A Rust toolchain builds the driver and compiler out of the workspace.
$ cd crates/joule-lang $ cargo build --release $ export PATH="$PWD/target/release:$PATH"
Bootstrap without Rust
Joule's compiler is written in Joule. It can build itself from source with only a C compiler present, and the rebuilt compiler reproduces a byte-identical result.
$ cd bootstrap && make $ ./joulec hello.joule -o hello && ./hello Hello from Joule!
Your first project
# create a new project $ joulec new sensor_pipeline && cd sensor_pipeline # build, with an energy receipt $ joulec build Compiling sensor_pipeline Energy: 12.4 µJ (compute 8.1 · memory 3.2 · io 1.1) Finished in 0.34s # run it $ joulec run Hello from Joule!
Commands
joulec new <name> Create a new project joulec build Compile to C and link, with an energy receipt joulec run Build and execute joulec check Type-check without codegen joulec test Run tests joulec fmt Format source code joulec repl Interactive session