Skip to main content

Victor Rust Workspace

Rust libraries, the standalone edge runtime, and high-performance Python extensions for Victor.

Packages

Workspace member Distribution Purpose
crates/protocol crates.io: victor-protocol Portable message and tool-call contracts
crates/state crates.io: victor-state Conversation and scoped state management
crates/tools crates.io: victor-tools Tool schema registry and validation
crates/edge-runtime crates.io: victor-edge Standalone edge agent runtime and binary
crates/python-bindings PyPI: victor_native Python native extensions; never published to crates.io

victor-edge depends on the other three Rust crates, so crates.io publication is intentionally ordered as protocol → state → tools → edge.

Features

  • Deduplication (dedup): Rolling hash-based content deduplication using xxHash3
  • Similarity (similarity): SIMD-optimized cosine similarity for embeddings
  • JSON Repair (json_repair): Fast JSON repair with streaming parser
  • Hashing (hashing): High-performance signature hashing for loop detection

Performance

Operation Python Rust Speedup
Block deduplication 1.0ms 0.02ms ~50x
Cosine similarity (384d, 100 vectors) 5.0ms 1.0ms ~5x
JSON repair 0.5ms 0.05ms ~10x
Signature hashing 0.2ms 0.02ms ~10x

Building

Prerequisites

  • Rust 1.70+ (install via rustup)
  • Python 3.12+
  • maturin (pip install maturin)

Development Build

cd rust

# Build and install in development mode
maturin develop

# Build with optimizations
maturin develop --release

# Build wheel for distribution
maturin build --release

Install Pre-built Wheel

# From the rust directory after building
pip install target/wheels/victor_native-*.whl

Usage

The native extensions are automatically used when available:

from victor.processing.native import (
    rolling_hash_blocks,
    batch_cosine_similarity,
    repair_json,
    compute_signature,
    is_native_available,
)

# Check if native extensions are loaded
print(f"Native available: {is_native_available()}")

# Deduplication
blocks = rolling_hash_blocks(content, min_block_length=50)
for hash_str, block, is_duplicate in blocks:
    if is_duplicate:
        print(f"Duplicate block: {block[:50]}...")

# Similarity
query = [0.1, 0.2, ...]  # 384-dim embedding
corpus = [[...], [...], ...]  # List of embeddings
similarities = batch_cosine_similarity(query, corpus)

# JSON repair
fixed = repair_json("{'key': 'value', 'active': True}")
# '{"key": "value", "active": true}'

# Signature hashing
sig = compute_signature("read_file", {"path": "/test.py"})

Fallback Behavior

If the native extension is not available (not installed or incompatible platform), the victor.processing.native module automatically falls back to pure Python implementations with equivalent functionality.

from victor.processing.native import is_native_available

if is_native_available():
    print("Using Rust implementation (fast)")
else:
    print("Using Python fallback (compatible)")

Architecture

rust/
├── Cargo.toml          # Workspace configuration and shared version
├── pyproject.toml      # maturin build configuration
├── README.md           # This file
└── crates/
    ├── protocol/
    ├── state/
    ├── tools/
    ├── edge-runtime/
    └── python-bindings/

Releasing crates.io packages

Rust workspace releases use their own rust-vX.Y.Z tags. Before tagging, update the workspace version and every internal dependency version in the crate manifests, then run:

cd rust
cargo fmt --all --check
cargo test --workspace --locked
cargo package -p victor-protocol --locked
cargo package -p victor-state --locked
cargo package -p victor-tools --locked
cargo package -p victor-edge --locked

All four package checks resolve the internal Victor dependencies through crates.io, providing the same consumer-side validation used by the release workflow.

Push an annotated rust-vX.Y.Z tag only after the release commit reaches main. The Publish Rust crates workflow validates that the tag and workspace versions match, then publishes the dependency chain. It requires the Actions secret CARGO_REGISTRY_TOKEN to be available to the repository. Re-running the workflow is safe: crate versions already present on crates.io are skipped and verified. After publication, the workflow installs victor-edge back from crates.io and runs its version command.

Testing

# Run Rust tests
cargo test

# Run Python integration tests
pytest ../tests/unit/test_native.py -v

License

Apache License 2.0

Metadata

Release files for victor-native 0.29.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for victor-native 0.29.2
File Actions
victor_native-0.29.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for victor_native-0.29.2-cp313-cp313-win_amd64.whl
victor_native-0.29.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for victor_native-0.29.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
victor_native-0.29.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details for victor_native-0.29.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
victor_native-0.29.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for victor_native-0.29.2-cp313-cp313-macosx_11_0_arm64.whl
victor_native-0.29.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for victor_native-0.29.2-cp312-cp312-win_amd64.whl
victor_native-0.29.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for victor_native-0.29.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
victor_native-0.29.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details for victor_native-0.29.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
victor_native-0.29.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for victor_native-0.29.2-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 17.5 MB

Release files / victor_native-0.29.2-cp313-cp313-win_amd64.whl

Download URL victor_native-0.29.2-cp313-cp313-win_amd64.whl
Size 2.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
d8ff333dcf9735d1df30de29413f67686dc50d24d6478eb993b7a09a5c85ec31
BLAKE2b-256 checksum
How to use checksums
247709aa0a58cd10182e5fd4473a955a81ecaddec90525c1eddfdf2327227108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / victor_native-0.29.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL victor_native-0.29.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.3 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f3b41c179c9a11abe34031f8cac6bcc1e7d4332db81408feb1ad4d5a08ff531f
BLAKE2b-256 checksum
How to use checksums
b3de93f84a334859be7cccecf1f3c3552550c5cb470931b923f5d425a53969f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / victor_native-0.29.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL victor_native-0.29.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.2 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
21db2275060d54ab04baf2a03a90c0474be24efa0beee654f6e10438bf0f99e8
BLAKE2b-256 checksum
How to use checksums
587cf2edadb43c227477fc302d7d93667e07e87ca20a8d36e27920fcebf25904
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / victor_native-0.29.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL victor_native-0.29.2-cp313-cp313-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e52cd55da418f3e6350230cd77f19ed7a10516493979750ae064eb8c3812115a
BLAKE2b-256 checksum
How to use checksums
d7a49470a60f5905c3d9998e035d492dfe93b8508ecbddc47992daf5c075b263
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / victor_native-0.29.2-cp312-cp312-win_amd64.whl

Download URL victor_native-0.29.2-cp312-cp312-win_amd64.whl
Size 2.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4ecae0c6bbfa74b1b8915cf1a3b7a1f860fcdd62d0a0a493b4d88f10802c1836
BLAKE2b-256 checksum
How to use checksums
e7ea32aca1bec6f601ad04689107a9485e98fd154a71f69d89048b0de4bad0ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / victor_native-0.29.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL victor_native-0.29.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
917946e6ee4dc46a021c58b6765d70c7c404898f6d9941958675d26ba3e4e297
BLAKE2b-256 checksum
How to use checksums
d09cd7c4b672c8640e86e46d9fb5d2ecba4b0e5252cd1d27cf76cbe50567bf49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / victor_native-0.29.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL victor_native-0.29.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.2 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
34f0fb7eabd40bc43e6164d417f6d7e5e5628938e730cacb8f16e7319e35511f
BLAKE2b-256 checksum
How to use checksums
d48b87c42e6f2ab80901edfe7946c6933c7cddd4338a768f8659c80e8e2fddc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / victor_native-0.29.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL victor_native-0.29.2-cp312-cp312-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b7158f73b846fec13026881ec92c21c916ffb378a022eb76e7573b3b666e8eb1
BLAKE2b-256 checksum
How to use checksums
939bbf5cc78a21b281a7b37e60dc5d7961fe0640777278e4c195b00fa0eb6acc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for victor-native 0.29.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for victor_native-0.29.2-cp313-cp313-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.29.2 This release

8 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page