Installation

Requirements

  • Rust: 1.70 or later
  • Target: wasm32-unknown-unknown

Setup

1. Install Rust

If you don't have Rust installed:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

2. Add WASM Target

rustup target add wasm32-unknown-unknown

3. Install Development Tools (Optional)

# For web builds
cargo install wasm-pack

# For quality tooling
cargo install cargo-llvm-cov cargo-mutants cargo-nextest

# Install all tools at once
make install-tools

Adding Jugar to Your Project

From crates.io

[dependencies]
jugar = "0.1"

From Git (Latest)

[dependencies]
jugar = { git = "https://github.com/paiml/jugar" }

Local Development

If you're contributing or developing locally:

[dependencies]
jugar = { path = "../jugar/crates/jugar" }

Feature Flags

Jugar supports optional features:

[dependencies]
jugar = { version = "0.1", features = ["full"] }
FeatureDescription
defaultCore engine functionality
aiGOAP and Behavior Trees
audioSpatial 2D audio
procgenProcedural generation
fullAll features

Verify Installation

Create a test project:

cargo new jugar-test
cd jugar-test
echo 'jugar = "0.1"' >> Cargo.toml
cargo build --target wasm32-unknown-unknown

If the build succeeds with no JavaScript output, you're ready to go!