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.27.1

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.27.1
File Actions
victor_native-0.27.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for victor_native-0.27.1-cp313-cp313-win_amd64.whl
victor_native-0.27.1-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.27.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
victor_native-0.27.1-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.27.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
victor_native-0.27.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for victor_native-0.27.1-cp313-cp313-macosx_11_0_arm64.whl
victor_native-0.27.1-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details for victor_native-0.27.1-cp313-cp313-macosx_10_12_x86_64.whl
victor_native-0.27.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for victor_native-0.27.1-cp312-cp312-win_amd64.whl
victor_native-0.27.1-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.27.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
victor_native-0.27.1-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.27.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
victor_native-0.27.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for victor_native-0.27.1-cp312-cp312-macosx_11_0_arm64.whl
victor_native-0.27.1-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details for victor_native-0.27.1-cp312-cp312-macosx_10_12_x86_64.whl

Total release size: 21.8 MB

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

Download URL victor_native-0.27.1-cp313-cp313-win_amd64.whl
Size 2.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
cf2c85ccbb23b685e3a53df157556aa3c0b1006150000338ba18bf320883aa18
BLAKE2b-256 checksum
How to use checksums
c1da95a9ffd40ef82302015503d1f27bad8a61ce52c32fb45ce1c060ca704fb3
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 11, 2026.

Transparency log

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

Download URL victor_native-0.27.1-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
930031fa1399e6c14816090a3e830da80bc0c7f0988a07b7682ecf21e587f90e
BLAKE2b-256 checksum
How to use checksums
c3a4c4ba3f521f6067116b007d70434cfe4194dad0cfe83cbfbadd8e5637edb0
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 11, 2026.

Transparency log

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

Download URL victor_native-0.27.1-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
c7777b13b45645a7379409951f2c8878226c7a034cd551e0c65bb81ed35b4e59
BLAKE2b-256 checksum
How to use checksums
f4ab9f50019cb79978f0a13c19d58be6e615a85a10575c128376e10832f6fe15
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 11, 2026.

Transparency log

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

Download URL victor_native-0.27.1-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
f0f14587fca0c724a83dd9ce0f32353253647e674458d6e5c40550940eb55d13
BLAKE2b-256 checksum
How to use checksums
8f06f089564fa1abadb4bdd5bb7c1a81c901fbba8fe3da4bf4bdae5a933ce75f
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 11, 2026.

Transparency log

Release files / victor_native-0.27.1-cp313-cp313-macosx_10_12_x86_64.whl

Download URL victor_native-0.27.1-cp313-cp313-macosx_10_12_x86_64.whl
Size 2.2 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d1363f87503ff4b89e2021155ac4975d135460799e1ac443896f3530eec35ccb
BLAKE2b-256 checksum
How to use checksums
c32b11f2cebc21e2b064b3173f14d95f90f31b617e0caae16abc63c6398ccd5d
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 11, 2026.

Transparency log

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

Download URL victor_native-0.27.1-cp312-cp312-win_amd64.whl
Size 2.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
edae579471ef731f0466d20532b6e96c8064a38d54235966513044f9847a5e2c
BLAKE2b-256 checksum
How to use checksums
f0f1b291fd35fa9dd3285a5aeb25030d6e9408b7aa52fb21d90a01c83a5d9224
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 11, 2026.

Transparency log

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

Download URL victor_native-0.27.1-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
f5ad34996d0312cc4ff6ef45a1e2d776d1da624f88f7caee8db79ed95f80b212
BLAKE2b-256 checksum
How to use checksums
32dac77794b5b67bd8a183a7c89b087980a60884e7a426ebd3ee361ca4e01aef
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 11, 2026.

Transparency log

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

Download URL victor_native-0.27.1-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
17d47870978d66b6c844cb579026e0f49d19e639f397fdced0797623b6c695e4
BLAKE2b-256 checksum
How to use checksums
c97373b9095d2396bff4c91d391c8923b028507a8c8fd201a154a1fbf906ae38
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 11, 2026.

Transparency log

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

Download URL victor_native-0.27.1-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
3ef80569173744edaf39fd08a538c1ef526b85dcee076b740e2a6e34258ab9f3
BLAKE2b-256 checksum
How to use checksums
38852abfa140f3ad29213f8305280de47173c557c5932c31db9da01fb87cbddb
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 11, 2026.

Transparency log

Release files / victor_native-0.27.1-cp312-cp312-macosx_10_12_x86_64.whl

Download URL victor_native-0.27.1-cp312-cp312-macosx_10_12_x86_64.whl
Size 2.2 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b1a612a28f3452b22b55227c578f8fca9c0ad69c7ee4c2d5c90286e53867e58a
BLAKE2b-256 checksum
How to use checksums
9baf09ffd608f5ddfbad314d956452292bc91ecf95a5c3bbd85d865f7bd77b39
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 11, 2026.

Transparency log

Security for victor-native 0.27.1

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 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for victor_native-0.27.1-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 11, 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.27.1 This release

10 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