Skip to main content

P4Rust

Safe Rust bindings to the Perforce 2026.1 C++ API. Precompiled resources support Windows MSVC, Linux GNU, and macOS on x64 and ARM64. Consumers compile only Rust.

Published Packages

Language Link Compatibility
Rust crates.io Windows MSVC, Linux GNU (glibc 2.28+), macOS 12+; x64 and ARM64. Consumers compile only Rust.
Python PyPI CPython 3.9+ (cp39-abi3), including free-threaded CPython 3.15+ (cp315-abi3.abi3t); Windows, Linux (glibc 2.28+), macOS 12+; x64 and ARM64.

Rust

[dependencies]
p4rust = "0.1"
use p4rust::{Client, Config, Event, Result, ResultExt};

// Stream file records, progress, and command completion.
fn main() -> Result<()> {
    let client = Client::new(Config::new("localhost:1666", "user", "workspace"))
        .context("Failed to create client")?;
    let events = client
        .command("sync")
        .args(["D:/workspace/file.txt"])
        .run()
        .context("Failed to start sync")?;

    for event in events {
        match event.context("Failed to sync file")? {
            Event::Record(record) => {
                for (key, value) in record.fields() {
                    println!("{key}: {value}");
                }
            }
            Event::Progress(progress) => {
                println!(
                    "{:?}: {}/{}",
                    progress.kind, progress.current, progress.total
                );
            }
            Event::Message(message) | Event::HandleError(message) => {
                println!("{}", message.text);
            }
            event => println!("{event:#?}"),
        }
    }
    Ok(())
}

run() streams events; collect_output() collects results. Configure input, timeout, and cancellation on the builder.

Use FastReconcile for parallel local processing.

let events = client
    .command("reconcile")
    .args(["-n", "-m", "D:/workspace/..."])
    .reconcile_handler(
        p4rust::FastReconcile::new()
            .metadata_workers(8)
            .digest_workers(4)
            .move_workers(4),
    )
    .run()
    .context("Failed to start reconcile")?;

for event in events {
    println!("{:#?}", event.context("Failed to reconcile")?);
}

-n previews changes; -m checks timestamps before contents; -M enables move detection.

Python

Install p4rust from PyPI with pip install p4rust. Wheels support ordinary CPython 3.9+ and free-threaded CPython 3.15+ on the same six platforms. Public APIs include complete typing and preserve native message codes, bytes, progress, and completion status. The Python ZIP is also available from GitHub Releases.

from p4rust import Client, Config, RecordEvent

client = Client(Config("localhost:1666", "user", "workspace"))
events = (
    client
    .command("files")
    .args(["D:/workspace/..."])
    .timeout(30.0)
    .run()
)
with events:
    for event in events:
        if isinstance(event, RecordEvent):
            print(event.record.fields())

Use .input(form), .cancellation(token), or .reconcile_handler(FastReconcile()) before .run(). collect_output() collects the remaining stream; close() cancels a command.

Maintainers

xtask builds native resources and packages all six targets. GitHub Actions runs builds, Clippy, and Python typing checks, publishes changed crates.io versions and Python wheels to PyPI, and releases separate Rust and Python ZIPs.

Metadata

Release files for p4rust 0.1.14

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 p4rust 0.1.14
File Actions
p4rust-0.1.14-cp315-abi3.abi3t-win_arm64.whl CPython 3.15 abi3t, abi3 Windows ARM64 Details for p4rust-0.1.14-cp315-abi3.abi3t-win_arm64.whl
p4rust-0.1.14-cp315-abi3.abi3t-win_amd64.whl CPython 3.15 abi3, abi3t Windows x86-64 Details for p4rust-0.1.14-cp315-abi3.abi3t-win_amd64.whl
p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl CPython 3.15 abi3t, abi3 Linux glibc 2.28+ x86-64 Details for p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ ARM64 Details for p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_x86_64.whl CPython 3.15 abi3t, abi3 macOS 12.0+ x86-64 Details for p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_x86_64.whl
p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_arm64.whl CPython 3.15 abi3, abi3t macOS 12.0+ ARM64 Details for p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_arm64.whl
p4rust-0.1.14-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details for p4rust-0.1.14-cp39-abi3-win_arm64.whl
p4rust-0.1.14-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for p4rust-0.1.14-cp39-abi3-win_amd64.whl
p4rust-0.1.14-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for p4rust-0.1.14-cp39-abi3-manylinux_2_28_x86_64.whl
p4rust-0.1.14-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for p4rust-0.1.14-cp39-abi3-manylinux_2_28_aarch64.whl
p4rust-0.1.14-cp39-abi3-macosx_12_0_x86_64.whl CPython 3.9 abi3 macOS 12.0+ x86-64 Details for p4rust-0.1.14-cp39-abi3-macosx_12_0_x86_64.whl
p4rust-0.1.14-cp39-abi3-macosx_12_0_arm64.whl CPython 3.9 abi3 macOS 12.0+ ARM64 Details for p4rust-0.1.14-cp39-abi3-macosx_12_0_arm64.whl

Total release size: 43.2 MB

Release files / p4rust-0.1.14-cp315-abi3.abi3t-win_arm64.whl

Download URL p4rust-0.1.14-cp315-abi3.abi3t-win_arm64.whl
Size 3.0 MB
Tags CPython 3.15 Windows ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
773153d0f7f6fbec7babe4eae441663a708d802cff90e66ab4817b98a6bbeb3c
BLAKE2b-256 checksum
How to use checksums
aaf1cc7194e4beeceaa1ca08b2ced639bcffe336d95c4fb8d5abb8ed12ceabb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp315-abi3.abi3t-win_amd64.whl

Download URL p4rust-0.1.14-cp315-abi3.abi3t-win_amd64.whl
Size 3.5 MB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
ef7d009138617d76aabd1d3ce4d0e15f6d4652aaf5d50d8332b4859a2b156461
BLAKE2b-256 checksum
How to use checksums
68e4e9e3b27efa358a3af40ed44cda2b63939b85cece76a032564b9a20b308f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl

Download URL p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Size 4.0 MB
Tags CPython 3.15 Linux glibc 2.28+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
3ca471c7fd005ecac6a7556ec212a2230dd52f4dc60d9e3f74ca61b886e27208
BLAKE2b-256 checksum
How to use checksums
c41d6eb90eab7a9070dd69260136353636ce9a5b9b9dd43d837949b11bf93a57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl

Download URL p4rust-0.1.14-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 4.3 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
51f28f204a73e6af48a24a76ed172a7801808091fdcde6c2339bb3feebdd5e60
BLAKE2b-256 checksum
How to use checksums
c1d2d48db1a3ded99638c3535907237baee82e46c11d677d02af1267454c9a16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_x86_64.whl

Download URL p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_x86_64.whl
Size 3.2 MB
Tags CPython 3.15 abi3 abi3t macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
92fdb9deab8fef84dd0d5e8a9d6f5e29ea9bbf984216fae5432c640e9445b120
BLAKE2b-256 checksum
How to use checksums
de86a5b7ef99b349eb10fed73b6941e2dae12efecadcadd2bd4e2a5f39a5adbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_arm64.whl

Download URL p4rust-0.1.14-cp315-abi3.abi3t-macosx_12_0_arm64.whl
Size 3.5 MB
Tags CPython 3.15 abi3 abi3t macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
40e837c579d4399780c94e8f54a1482f516dcb633b44d4bad037fd3f13c111ee
BLAKE2b-256 checksum
How to use checksums
18f3fbaf542c5e8da733415cd8cdb9304e9eeee0177d656cb33c675a897c097b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp39-abi3-win_arm64.whl

Download URL p4rust-0.1.14-cp39-abi3-win_arm64.whl
Size 3.0 MB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
a80f8348e947426134d08c1c917effb45808d9027f14e111272bb1e8b7866379
BLAKE2b-256 checksum
How to use checksums
435e7ee21100110bf0f5827afc8d8c4c2fa07d8877fb995ebcca7961d04cc5df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp39-abi3-win_amd64.whl

Download URL p4rust-0.1.14-cp39-abi3-win_amd64.whl
Size 3.5 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
045129e38eb0be357913795a95feb4e6424f3a0b84c737cac277751177a63a5d
BLAKE2b-256 checksum
How to use checksums
03ec5d93c46d24fd8f83de4907745aed3aeee2b5e1c03eead397f270c66540f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL p4rust-0.1.14-cp39-abi3-manylinux_2_28_x86_64.whl
Size 4.0 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
ef6263846c582c30df76ec278e9b296215919155e5c758f0026d90849b7f59ab
BLAKE2b-256 checksum
How to use checksums
e016a405ff96c7b9f24227be224dcf4bfaf9a6ff7d1677c44141dc8565dd6bfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL p4rust-0.1.14-cp39-abi3-manylinux_2_28_aarch64.whl
Size 4.3 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
6abb4c59a9d763aedaefa52f6942692d21eca7ab5ed2986f3742eb6976a212d7
BLAKE2b-256 checksum
How to use checksums
cd990a3cb229d14681fa46cb616ea63c7012bc76a9d32d398a261bd009fccceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp39-abi3-macosx_12_0_x86_64.whl

Download URL p4rust-0.1.14-cp39-abi3-macosx_12_0_x86_64.whl
Size 3.2 MB
Tags CPython 3.9 abi3 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
4195605431a737f5a1dcafc9a67ffbd9072906164415e208c3fdd98d790f3bca
BLAKE2b-256 checksum
How to use checksums
624d5216918ff3accaf604f43d1c4865fd51ee376a3e0c1f25135b88315f764d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / p4rust-0.1.14-cp39-abi3-macosx_12_0_arm64.whl

Download URL p4rust-0.1.14-cp39-abi3-macosx_12_0_arm64.whl
Size 3.5 MB
Tags CPython 3.9 abi3 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
43c430b41eeace583ab7e9a4d44755c50ae1b0b50e288932ac2ead788f065e49
BLAKE2b-256 checksum
How to use checksums
eb3baa7e7b93da0aef8b406a20172bb9c9614c820dbb4e24d2dca845d51020e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for p4rust 0.1.14

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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