Joule
A self-hosted programming language with compile-time energy budgets.
Joule is the world's first energy-aware programming language with first-class compile-time energy budget enforcement. Every function has an energy cost. Every accelerator is measured. Every decision is accountable. The Joule self-host bootstraps from a small kernel and lowers through HIR to native (C / Cranelift / LLVM / MLIR / CUDA), WASM, and flowG.
This is the public release surface. Source is private at openIE-dev/joule-lang-core — a 161-crate nested workspace including the self-host bootstrap, codegen passes, runtime, edge tooling, and the joule cascade.
Status
Release binaries + examples + documentation. Joule is free to use software, not an open-source project. See LICENSE for Business Source License 1.1 terms — converts to Apache-2.0 four years after each binary's release date.
What you get
| Binary | Purpose |
|---|---|
joulec |
The Joule compiler: parse, type-check, codegen to native / WASM / flowG |
joule-serve |
HTTP server for running Joule programs with energy receipts |
Plus a Rust library, joulec, for embedding.
Install
# via cargo
# via cargo-binstall (prebuilt binary)
# direct download
|
Platform support:
| Platform | Status |
|---|---|
| macOS arm64 (Apple Silicon) | shipping |
| macOS x86_64 | shipping |
| Linux x86_64 (musl) | shipping |
| Linux aarch64 (musl) | shipping |
| Windows x86_64 | shipping |
Hello, Joule
fn add_one(x: f64) -> f64
@energy(< 100pJ)
:
x + 1.0
fn main():
let r = add_one(41.0)
println(r)
Energy receipts:
|
See examples/ for hello world, multi-backend codegen, the bootstrap walkthrough, and the joule → flowG bridge.
What makes Joule different
- Compile-time energy budgets —
@energy(< 100pJ)annotations are enforced by the compiler against measured per-op cost data. Budget violations fail to build. - Self-hosted bootstrap — the Joule compiler is written in Joule. The bootstrap C emitter starts from a small kernel and grows out. You can audit the self-host trace.
- Multi-backend codegen — same
.joulefile can lower to C, Cranelift, LLVM, MLIR, CUDA, WebAssembly, or flowG. Choose your target by use case; the energy budget tracks across backends. - Joule cascade — at runtime, Joule programs participate in a 16-level cascade (L0–L10) that escalates from cache → lawful synthesizer → small models → frontier as needed.
- Edge-ready — Joule binaries are small enough to ship to drones, microcontrollers, OpenMV cameras, and other embedded targets.
How it fits
Joule is the energy-budgeted compiled surface in the openIE-dev family:
- flowG — the substrate Joule lowers to
- Lux — reactive, app-oriented sibling
- JMax — math-native sibling
- JouleDB — the metered database that Joule programs persist to
Documentation
- Getting started → https://openie-dev.github.io/joule-lang
- Examples →
examples/ - Language reference → https://openie-dev.github.io/joule-lang/reference
- Bootstrap walkthrough → https://openie-dev.github.io/joule-lang/bootstrap
- Source mirror →
openIE-dev/joule-lang-core
Releases
GitHub Releases — tagged versions with prebuilt binaries for every supported platform, plus SHA-256 checksums.
Community
- Discussions — Q&A, language design
- Issues — bug reports
- Security: see SECURITY.md
License
- Binaries — Business Source License 1.1; see LICENSE. Free for non-commercial use, internal use by orgs under $1M revenue, security/academic research. Converts to Apache-2.0 four years after each release.
- Documentation — CC-BY-4.0
- Examples — Apache-2.0