Documentation
Learn how to write energy-efficient code with Joule.
Getting Started
# Install Joule
curl -sSf https://joule-lang.org/install.sh | sh
# Create a new project
joule new my-project
cd my-project
# Build and run
joule build
joule run Language Basics
Energy Features
Joule's unique energy-aware features let you write code that's both fast and efficient.
// Set an energy budget for a computation
energy_budget(50.millijoules) {
let result = expensive_computation();
}
// Query energy consumption
let used = energy_consumed();
let remaining = energy_remaining();
// Thermal-aware execution
if thermal_state().is_hot() {
use_scalar_fallback();
} else {
use_simd_acceleration();
}