> ## Documentation Index
> Fetch the complete documentation index at: https://abxbus.archivebox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Development

> Local development workflows for Python, TypeScript, Rust, and Go.

<Tabs>
  <Tab title="Python">
    Set up the Python development environment using `uv`:

    ```bash theme={null}
    git clone https://github.com/ArchiveBox/abxbus && cd abxbus

    # Create virtual environment with Python 3.12
    uv venv --python 3.12

    # Activate virtual environment (varies by OS)
    source .venv/bin/activate  # On Unix/macOS
    # or
    .venv\Scripts\activate  # On Windows

    # Install dependencies
    uv sync --dev --all-extras
    ```

    Recommended once per clone:

    ```bash theme={null}
    prek install           # install pre-commit hooks
    prek run --all-files   # run pre-commit hooks on all files manually
    ```

    ```bash theme={null}
    # Run linter & type checker
    uv run ruff check --fix
    uv run ruff format
    uv run pyright

    # Run all tests
    uv run pytest -vxs --full-trace tests/

    # Run specific test file
    uv run pytest tests/test_eventbus.py

    # Run Python perf test suite
    uv run pytest tests/test_eventbus_performance.py -vxs

    # Run the entire lint+test+examples+perf suite for both Python and TS
    ./test.sh
    ```

    > For AbxBus-TS development see the `abxbus-ts/README.md` `# Development` section.
  </Tab>

  <Tab title="TypeScript">
    ```bash theme={null}
    git clone https://github.com/ArchiveBox/abxbus abxbus && cd abxbus

    cd ./abxbus-ts
    pnpm install

    prek install           # install pre-commit hooks
    prek run --all-files   # run pre-commit hooks on all files manually

    pnpm lint
    pnpm test
    ```
  </Tab>

  <Tab title="Rust">
    ```bash theme={null}
    git clone https://github.com/ArchiveBox/abxbus abxbus && cd abxbus

    cargo test --manifest-path abxbus-rust/Cargo.toml
    cargo test --manifest-path abxbus-rust/Cargo.toml --test test_cross_runtime_roundtrip -- --test-threads=1
    ```

    The Rust roundtrip CLI used by cross-runtime tests lives at `abxbus-rust/src/bin/abxbus-rust-roundtrip.rs`.
  </Tab>

  <Tab title="Go">
    ```bash theme={null}
    git clone https://github.com/ArchiveBox/abxbus abxbus && cd abxbus/abxbus-go

    go test ./...
    go run ./tests/roundtrip_cli events input.json output.json
    go run ./tests/roundtrip_cli bus input.json output.json
    ```

    Cross-runtime Go parity is exercised from the repo root by:

    ```bash theme={null}
    cd ..
    uv run pytest tests/test_cross_runtime_roundtrip.py -q
    pnpm --dir abxbus-ts exec node --expose-gc --test --import tsx tests/cross_runtime_roundtrip.test.ts
    ```
  </Tab>
</Tabs>
