Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file.

## Unreleased

## [0.0.2] - 2026-08-27

### Changed

- Pinned bundled native vllm.cpp to tag `v0.0.2`, commit `7020de93652ca920424a10ac5255b34810dd2f24`, moving the stable C contract from ABI 10 with 19 functions to ABI 17 with 35 functions; system libraries must match the new ABI, layouts, signatures, and exports.
- Model construction now obtains native defaults and overlays only explicit Rust settings, preserving helper defaults including `block_size=32`, `max_num_seqs=32`, and `gpu_memory_utilization=0.92`.
- Hardened deterministic backend configuration, binding/export/package checks, package curation, and multi-architecture Triton packaging: all six vendored AOT trees are embedded, exact-SM dispatched, and paired with portable fallback on other accepted targets.
- Raised the safe crate unpacked package limit to 512 KiB while retaining its 40-file and 128-KiB compressed limits; sys limits remain 1,400 files, 40 MiB unpacked, and 6 MiB compressed.

### Added

- `Device::{Auto, Cpu, Cuda}` selection and KV-memory controls with native precedence `num_blocks > kv_cache_memory_bytes > gpu_memory_utilization` and profile/fallback sizing.
- Pre-tokenized `Engine::complete_tokens` with owned token output, optional copied completion metadata, and explicit truncation reporting.
- Thread-local, exclusive `TranscriptionEngine` and `EmbeddingEngine` owners with borrowed inputs and Rust-owned transcription and row-major embedding results.
- Separate `VideoEngine` checkpoint-set ownership, blocking generation parameters/results, and standalone `VideoMuxParams`/`VideoMuxArgv` composition that never executes ffmpeg.
- Model-free acceptance gates for docs, tests, ABI/layout/signature/exports, native fixtures, sanitizers, link modes, packages, downstream consumers, publish dry-run, and exact MSRV.

### Compatibility

- Both Rust crates are lockstep version `0.0.2`; `vllm-cpp` depends on exactly `vllm-cpp-sys =0.0.2`.
- ABI-10 system libraries are incompatible. ABI 17 has no task query, so task-specific owners cannot introspect a checkpoint at load time and native wrong-task `InvalidArgument` errors remain authoritative.

### Known limitations

- Native Linux x86_64 CPU is the supported runtime family. The native `vllm_server_main` entry point remains raw-only; the safe crate exposes no tokenizer, task query, raw handle, HTTP-server wrapper, ffmpeg execution, or general process execution.
- Video generation writes filesystem artifacts and may leave partial output. No successful Rust MiniMax-H3 generation fixture is claimed for this candidate.
- Exact-candidate prepared-Qwen inference/sanitizers, native-only TSan, Miri, Linux ARM64, Apple ARM64, Vulkan, CUDA/CUTLASS/Triton, Metal/MLX, and accelerator runtime lanes were not run.

## [0.0.1] - 2026-08-22

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ members = ["vllm-cpp", "vllm-cpp-sys"]
resolver = "2"

[workspace.package]
version = "0.0.1"
version = "0.0.2"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/querymt/vllm-cpp-rs"
rust-version = "1.85"

[workspace.dependencies]
vllm-cpp-sys = { version = "=0.0.1", path = "vllm-cpp-sys", default-features = false }
vllm-cpp-sys = { version = "=0.0.2", path = "vllm-cpp-sys", default-features = false }
76 changes: 32 additions & 44 deletions README.md

Large diffs are not rendered by default.

79 changes: 55 additions & 24 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,90 @@
# Releasing

Releases are prepared and published manually. The repository does not tag, publish, or create a GitHub release automatically. A successful local candidate or dry-run is not a release; crates.io publication is an irreversible registry action.
Releases are prepared and published manually. A candidate pass or dry-run does not authorize a Git tag, crates.io upload, merge, push, or GitHub release. Publication is an irreversible registry action and requires separate maintainer authorization.

## Prepare a candidate

1. Start from the reviewed release commit and verify the branch, `HEAD`, and intended remote identity.
2. Require a clean worktree and index, including initialized submodules:
1. Start from the exact independently reviewed release commit. Require a clean root worktree and index and a clean, detached native submodule:

```console
test -z "$(git status --short --untracked-files=all)"
git diff --quiet
git diff --cached --quiet
git submodule status --recursive
test "$(git -C vllm-cpp-sys/vllm.cpp rev-parse HEAD)" = 34aedfbe8ed9779697905541a62e2160ccfd9c05
test "$(git -C vllm-cpp-sys/vllm.cpp symbolic-ref -q HEAD || true)" = ""
test -z "$(git -C vllm-cpp-sys/vllm.cpp status --short --untracked-files=all)"
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

3. Confirm the release version in the workspace manifest, both normalized package manifests, `Cargo.lock`, and the pinned native `project(vllm_cpp VERSION ...)` declaration. Both crates and the native CMake project must use the same version, and `vllm-cpp` must depend on exactly that `vllm-cpp-sys` version. The CMake project declaration is the native release version authority; do not derive the crate version from `git describe` or the nearest native tag.
4. Confirm the native gitlink is `34aedfbe8ed9779697905541a62e2160ccfd9c05`, `VLLM_ABI_VERSION` is 10 in the pinned public C header and checked-in bindings, and generated bindings have no drift.
5. Move the relevant entries from `Unreleased` to a dated version section. Describe only validated support; preserve known backend/runtime blockers.
6. Audit dual-license metadata, crate license files, `NOTICE`, `THIRD_PARTY.md`, imported license texts, and the package inventory. Do not publish models, fixtures, build output, caches, SDKs, external CUTLASS trees, or repository-local paths.
7. Run the complete maintainer validation from the pinned development shell. At minimum run formatting, lint, model-free tests, docs, sys conformance, all CPU link modes, package extraction/downstream tests, and the exact MSRV gate.
2. Verify native identity directly, never with `git describe`:

## Inspect and dry-run
```console
native=vllm-cpp-sys/vllm.cpp
test "$(git rev-parse HEAD:vllm-cpp-sys/vllm.cpp)" = 7020de93652ca920424a10ac5255b34810dd2f24
test "$(git -C "$native" rev-parse HEAD)" = 7020de93652ca920424a10ac5255b34810dd2f24
test "$(git -C "$native" rev-parse 'refs/tags/v0.0.2^{}')" = 7020de93652ca920424a10ac5255b34810dd2f24
test "$(git -C "$native" rev-parse 'HEAD^{tree}')" = 28df226f0ef9924e67d563c3bef4712d0e628c5a
```

3. Use `cargo metadata --locked --no-deps --format-version 1` and normalized package manifests to require both Rust crates at `0.0.2` and the safe dependency requirement exactly `=0.0.2`. Confirm both local package records in `Cargo.lock`. Separately parse native `project(vllm_cpp VERSION 0.0.2 LANGUAGES CXX)` from `CMakeLists.txt`. Rust and native versions are independent release identities that happen to both be `0.0.2` here; equality is not a universal policy.
4. Require `VLLM_ABI_VERSION == 17` in the pinned header and generated bindings and exactly 35 stable C functions. Run binding-drift, C11/C++20 header, every C/Rust layout and signature, runtime ABI, all-function link, and exact dynamic-export checks. ABI-10 system libraries are incompatible.
5. Keep `Unreleased` empty above the dated release entry. Describe only validated support and preserve known limitations.
6. Audit root and crate dual-license metadata, `LICENSE-MIT`, `LICENSE-APACHE`, native `LICENSE`/`NOTICE`, `THIRD_PARTY.md`, and every imported license text against the exact package inventories. Reject models, media fixtures, build output, caches, SDKs, external CUTLASS trees, internal records, and repository-local paths.

## Validate

Build fresh archives; do not trust old files under `target/package`:
Run the mandatory Linux x86_64 CPU gates from the pinned shell:

```console
cargo package -p vllm-cpp-sys --locked --list
cargo package -p vllm-cpp --locked --list
just package-test
env -u VLLM_CPP_TEST_MODEL nix develop -c just ci
nix develop .#msrv -c just msrv
cargo check --locked --workspace --all-targets --features vllm-cpp/serde
RUSTDOCFLAGS='-D warnings' cargo doc --locked --workspace --no-deps --features vllm-cpp/serde
git diff --check
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

`just ci` includes formatting, warnings-denied lint/docs, model-free workspace tests, generated bindings and ABI conformance, four CPU link modes, the native C API fixture, model-free ASan/UBSan/leak checks, package/extracted/downstream validation, and no-upload publish dry-run. Run the exact MSRV gate separately so stable-toolchain success cannot mask it.

Prepared-Qwen inference/sanitizers, native-only TSan, successful Rust MiniMax-H3 generation, Miri, Linux ARM64, Apple ARM64, Vulkan, CUDA/CUTLASS/Triton, Metal/MLX, and accelerator runtime are optional or deferred. Record one only when it ran against the exact candidate; configured workflows and older results are not candidate evidence.

## Inspect packages

Use two fresh, separate `CARGO_TARGET_DIR` values; do not trust existing `target/package` files:

```console
CARGO_NET_OFFLINE=true CARGO_TARGET_DIR=target/package-release-a just package-test
CARGO_NET_OFFLINE=true CARGO_TARGET_DIR=target/package-release-b just package-test
just publish-dry-run
```

Inspect both sorted inventories and extracted normalized `Cargo.toml` files. Confirm the packages contain their READMEs, dual licenses, notices and provenance where applicable, source, tests, examples, and every required native/backend input. Confirm extracted builds and independent downstream consumers pass offline and that the safe consumer resolves the extracted sys crate rather than the workspace.
For both runs, retain:

- sorted `cargo package --list` inventories and archive basenames;
- normalized `Cargo.toml` manifests, including exact `vllm-cpp-sys =0.0.2`;
- file counts and unpacked/compressed sizes, enforcing sys limits of 1,400 files, 40 MiB unpacked, and 6 MiB compressed and safe limits of 40 files, 512 KiB unpacked, and 128 KiB compressed;
- complete license/notice/provenance inventories and checks that current READMEs, source, tests, examples, and required native/backend inputs are present;
- SHA-256 for both archives from each run and successful extracted/offline builds, all four extracted sys link modes, and independent sys and safe downstream consumers.

Require identical sorted inventories and semantically identical normalized manifests between runs. Compare archive hashes and record both outcomes, but do not assume byte identity: Cargo-generated `.cargo_vcs_info.json`, archive metadata, or timestamps may differ. Claim reproducible bytes only when both hashes actually match and the comparison explains the metadata involved.

`just publish-dry-run` uses Cargo's workspace dry-run in sys-first order without uploading. The preceding package gate provides the full extracted/offline verification; the workspace command uses `--no-verify` to avoid a registry-resolution cycle before the exact sys version exists on crates.io. After sys is published, run `cargo publish -p vllm-cpp --locked --dry-run` and require its full verification to pass before the safe upload.
`just publish-dry-run` uses Cargo's sys-first workspace order with `--no-verify` and never uploads. It cannot provide the safe crate's full registry-resolution verification before exact sys `0.0.2` is available from crates.io. Check both crate-version slots are available before any future upload; do not reserve or publish them during candidate preparation.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## Publish

Only an authorized maintainer should publish, from the exact reviewed commit with a clean worktree and index. Verify crates.io credentials and ownership, then publish one crate at a time:
Only a separately authorized maintainer may publish from the exact reviewed commit with a clean root and detached submodule. Publish sys first:

```console
cargo publish -p vllm-cpp-sys --locked
# Wait until crates.io serves the exact sys version.
# Wait until crates.io serves exact vllm-cpp-sys 0.0.2.
cargo publish -p vllm-cpp --locked --dry-run
cargo publish -p vllm-cpp --locked
```

The sys crate must be accepted and available from crates.io before publishing the safe crate because the safe archive declares an exact registry dependency. After both uploads, verify the registry metadata, package contents, docs.rs results, and a clean downstream build. Create the Git tag and release notes only for the exact published commit and version.
The full safe dry-run must resolve registry sys `0.0.2` before the safe upload. After both uploads, verify registry metadata, archives, docs.rs, licenses, and a clean downstream build. Create a tag and GitHub release only after separate authorization and only for the exact published commit.

## Abort and recovery

- Before an upload succeeds, abort on any mismatch, validation failure, unexpected file, dirty state, changed lockfile, changed native pin/ABI, or inaccurate release note. Fix the issue in a separately reviewed commit and restart the checklist.
- After crates.io accepts a version, that version cannot be replaced or deleted. Never rebuild a different archive under the same version.
- If the sys crate publishes but the safe crate fails, stop and diagnose. Retry the unchanged safe version only when the failure is transient and the exact reviewed archive remains valid; otherwise prepare a new coordinated version.
- Yank a published version only when leaving it selectable would harm users. Yanking prevents new resolution but does not erase the crate, undo existing lockfiles, or make the version reusable. Record the reason publicly and publish a corrected new version.
- Never use `cargo yank` as an ordinary abort mechanism, and never publish merely to test credentials or packaging.
- Before upload, abort on any mismatch, failed gate, unexpected file, dirty state, changed lockfile, native identity/ABI/export drift, inaccurate support statement, or unavailable version. Fix it in a separately reviewed commit and restart.
- Accepted crates.io versions cannot be replaced or deleted. Never rebuild different bytes under the same version.
- If sys publishes but safe fails, stop and diagnose. Retry unchanged safe bytes only for a transient failure; otherwise prepare a new coordinated version.
- Yank only when leaving a version selectable would harm users. Yanking does not erase the crate or make the version reusable.
- Never use `cargo yank` as an ordinary abort mechanism or publish merely to test credentials or packaging.
2 changes: 1 addition & 1 deletion vllm-cpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Safe model inference, streaming, chat, and concurrent requests for vllm.cpp"
description = "Safe vllm.cpp completion, streaming, chat, requests, token completion, transcription, embeddings, video, and mux argv APIs"
readme = "README.md"
documentation = "https://docs.rs/vllm-cpp"
keywords = ["llm", "inference", "vllm", "vllm-cpp", "machine-learning"]
Expand Down
Loading
Loading