Running an Example

SkillDev tools

Compile and run one of the example programs. Use this when asked to run an example or demo.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Running an Example skill

What this skill tells your AI

The instructions your AI receives, as published by davidhozic/mujoco-rs in .claude/skills/run-example/SKILL.md and read by ahel’s review.

Compile and run one of the example programs.

  1. List available examples by exploring the examples/ directory. The example name is the file stem (e.g., basic.rs -> basic).

  2. Check Cargo.toml for the current MuJoCo version (look for +mj-X.Y.Z in the package version). Then find the matching mujoco-X.Y.Z/ directory at the repository root.

  3. Run the chosen example (replace X.Y.Z and <EXAMPLE_NAME>):

export MUJOCO_DYNAMIC_LINK_DIR=$(realpath mujoco-X.Y.Z/lib) && export LD_LIBRARY_PATH=$(realpath mujoco-X.Y.Z/lib/) && cargo run --example <EXAMPLE_NAME>

  1. Check the terminal output for errors.

[!NOTE]

  • Most examples open a GUI window and require a display + OpenGL.
  • Some examples may require specific Cargo features - read the example source file to check.
  • To run in release mode add --release.

Signals

GitHub stars
78
Forks
10
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
run-example
Source
github.com/davidhozic/mujoco-rs