axionax Core – Build and Development Guide

Prerequisites

Required Software

Verify Installation

rustc --version
# Should output: rustc 1.7x.x or newer
docker --version
# Should output: Docker version 24.x.x ...

Building from Source

1. Clone the Repository

git clone https://github.com/axionaxprotocol/axionax-core.git
cd axionax-core

2. Download Rust Dependencies

cargo fetch
# If using Python/ML: pip install -r deai/requirements.txt

3. Build the Binary

Using Cargo:

cargo build --release --workspace

Build with version info:

RUSTFLAGS="--cfg version=\"v1.6.0\"" cargo build --release --workspace

4. Verify Build

./target/release/axionax-core --version
axionax Core
Version:    v1.6.0-testnet
Build Type: release

Building for Multiple Platforms

cargo build --release --target x86_64-unknown-linux-gnu
cargo build --release --target x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
cargo build --release --target x86_64-pc-windows-gnu

Or use Cargo Make (if using):

cargo make build-all

Docker Build

Build Docker Image

docker build -t axionax-core:v1.6.0 .

Run in Docker

docker run -p 8545:8545 -p 30303:30303 \
  -v $(pwd)/data:/var/lib/axionax \
  axionax-core:v1.6.0

Using Docker Compose

docker compose up -d

Development

Running Tests

cargo test --workspace
# For Python ML: pytest deai/
# For typescript sdk: npm test --prefix sdk/

Code Quality

cargo fmt --all
cargo clippy --all
# Python: black deai/
# TypeScript: npm run lint --prefix sdk/

Development Mode

cargo run --bin axionax-node --features=dev
# live reload (Rust): cargo watch -x 'run --bin axionax-node'
# Python live reload: python -m deai.asr (with dev flags)

Hot Reload (dev example)

cargo install cargo-watch
cargo watch -x check -x test

Project Structure

axionax-core/
├── core/           # Rust main modules
├── deai/           # Python ML, fraud detection
├── sdk/            # TypeScript SDK
├── bridge/         # Rust↔Python/TS interop
├── docs/
├── docker/         # Docker & compose configs
├── Makefile        # Build automation
├── Dockerfile
├── README.md

Common Issues

Rust Not Found

Solution: Install Rust from rustup.rs and add to PATH

Dependency Errors

cargo clean
cargo fetch
cargo build

Build Errors

cargo clean
cargo build

Docker Build Fails

docker builder prune
docker build --no-cache -t axionax-core:v1.6.0 .

IDE Setup

Visual Studio Code

{
  "rust-analyzer.checkOnSave.command": "clippy",
  "editor.formatOnSave": true,
  "python.formatting.provider": "black"
}

JetBrains/CLion (Rust)

  1. Open project directory
  2. Auto-detect Rust and Python/TS modules
  3. Enable format on save in Settings

Performance Profiling

CPU Profiling

cargo bench
cargo test -- --nocapture --test-threads=1

Memory Profiling

valgrind ./target/release/axionax-core

Benchmarking

cargo bench --workspace

Release Process

1. Update Version

Edit version in core/main.rs or use build flags.

2. Build Release Binaries

cargo build --release --workspace

3. Create Release Package

tar -czf axionax-core-v1.6.0-linux-amd64.tar.gz \
  -C target/release axionax-core \
  -C .. README.md LICENSE

4. Generate Checksums

sha256sum target/release/axionax-core* > checksums.txt

Contributing

See CONTRIBUTING.md for workflow and guidelines.

Support