🚀 Install Axon
Build AxonLang from source:
git clone https://github.com/axonlang/axon.git
cd axon
./scripts/build.sh
The executable axon.axbin
will be generated in bin/
. Prerequisite: a Rust toolchain.
📚 Documentation
The documentation explains how to install Axon from source, use the CLI tools, and provides a condensed language reference derived from the official specification.
📄 Syntax Overview
let x: Int = 5
x := 10
if x > 0 {
print("Positive")
} else {
print("Non-positive")
}
🧬 Types and Variables
let name: String = "Axon"
y := 3.14
🧠 Neural Network Primitives
let model = Sequential([
Dense(64), ReLU(), Dense(10), Softmax()
])
let opt = SGD(model.parameters(), lr=0.01)
let loss_fn = CrossEntropyLoss()
⚙️ Concurrency & Parallelism
spawn train_step(x, y)
let result = await spawn load_batch()
🔁 Example Program
let (train_loader, _) = load_mnist(batch_size=32)
for epoch in 0..5 {
for (x, y) in train_loader {
let logits = model(x)
let loss = loss_fn(logits, y)
loss.backward()
opt.step()
opt.zero_grad()
}
}