P4CLI-20251
A simple Rust library for full-featured P4 (Perforce) CLI without bundling the binary — auto-detects system p4 or downloads from Perforce's official filehost. All errors are propagated via Result without any unwrap.
[]
= "0.6.1"
Synchronous API
Block until the process exits, then inspect the collected output.
use P4Cli;
With timeout detection:
use P4Cli;
use Duration;
Streaming API
Iterate over raw byte chunks as they arrive. The stream ends with P4StreamEvent::Exit.
use ;
Drop the stream mid-way to cancel the process.
Supported Platforms
| Target | Download |
|---|---|
| Windows x86_64 | bin.ntx64/p4.exe |
| macOS ARM64 | bin.macosx12arm64/p4 |
| macOS x86_64 | bin.macosx1015x86_64/p4 |
| Linux x86_64 (glibc/musl) | bin.linux26x86_64/p4 |
| Linux ARM64 (glibc/musl) | bin.linux26aarch64/p4 |
License
This project is licensed under the MIT License — see the LICENSE file for details.
The Perforce (p4) binary is proprietary software owned by Perforce Software, Inc.
Use is subject to Perforce's Master Terms & Conditions.
This crate does not bundle the binary — it either uses a system-installed copy or
downloads it directly from Perforce's official filehost.