Skip to content
Merged
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
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.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

[package]
name = "transcribe-cpp-sys"
version = "0.0.3"
version = "0.0.4"
edition = "2021"
rust-version = "1.74"
description = "Native FFI bindings for transcribe.cpp, a C/C++ speech-to-text library built on ggml"
Expand Down
41 changes: 41 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Releasing transcribe.cpp

The version is authored once in `include/transcribe.h`
(`TRANSCRIBE_VERSION_{MAJOR,MINOR,PATCH}`) and duplicated across ~14 files.
`scripts/release/prepare.py` writes all of them and regenerates the FFI;
`prepare.py --check` verifies the whole tree is consistent. A git tag matching
`v[0-9]*` is the **only** trigger for the release pipeline (`publish.yml`), and
the tag run does not re-run the drift gates — so **only ever tag a commit that
has gone green through branch CI on `main`.**

## Cutting a release (e.g. `0.0.x`)

```bash
# 1. Branch and write the bump everywhere (header, Cargo/npm/py manifests,
# both lockfiles, Swift, and the regenerated FFI) in one command.
git switch -c release-0.0.x
uv run --no-project scripts/release/prepare.py 0.0.x

# 2. Verify the tree is release-consistent. Only the version-bump files should
# show as modified; --check must not introduce anything else.
uv run --no-project scripts/release/prepare.py --check
git status --porcelain

# 3. Commit the bump and push the branch.
git commit -am "release: 0.0.x"
git push -u origin release-0.0.x

# 4. Open a PR. Wait for ALL branch CI green
# (rust-ci, python-bindings, typescript-ci, swift-ci, native-ci), then merge.
# Branch CI is the real gate — the tag run does NOT re-check it.

# 5. (optional) Dry run before tagging: full build + TestPyPI, no prod registries.
gh workflow run publish.yml -f version=0.0.x

# 6. After the PR merges, tag the merged commit on main and push the tag.
# Pulling main puts HEAD on the merge commit, so you tag exactly what CI
# proved. The tag string MUST equal the prepared version. The push publishes.
git checkout main && git fetch origin && git pull
git tag -a v0.0.x -m "transcribe.cpp v0.0.x"
git push origin v0.0.x
```
6 changes: 3 additions & 3 deletions bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "transcribe-cpp"
version = "0.0.3"
version = "0.0.4"
description = "Python bindings for transcribe.cpp"
readme = "README.md"
# 3.8 is EOL (2024-10); 3.9 is the floor. The binding is ctypes-only, so there
Expand Down Expand Up @@ -34,13 +34,13 @@ classifiers = [
# packaging fix still resolves); the import-time version/header-hash check in
# _library.py is the runtime backstop. check_version_sync.py gates this pin
# against include/transcribe.h.
dependencies = ["transcribe-cpp-native==0.0.3.*"]
dependencies = ["transcribe-cpp-native==0.0.4.*"]

[project.optional-dependencies]
# Opt-in accelerator providers — ADDITIVE: they install alongside the default
# provider and the best one wins at runtime. Same base-version pin contract
# as the hard dependency (gated by check_version_sync.py).
cu12 = ["transcribe-cpp-native-cu12==0.0.3.*"]
cu12 = ["transcribe-cpp-native-cu12==0.0.4.*"]
# Test-only deps. Run with: uv run --extra test pytest (from bindings/python).
# numpy is here so the numpy PCM-input tests run in every lane instead of
# silently skipping wherever numpy happens to be absent.
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/src/transcribe_cpp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
raise_for_status,
)

__version__ = "0.0.3"
__version__ = "0.0.4"

# String-enum types, exported so callers (and type checkers) can name them.
Backend = Literal["auto", "cpu", "metal", "vulkan", "cpu_accel", "cuda"]
Expand Down
4 changes: 2 additions & 2 deletions bindings/rust/transcribe-cpp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "transcribe-cpp"
version = "0.0.3"
version = "0.0.4"
edition = "2021"
rust-version = "1.74"
description = "Rust bindings for transcribe.cpp, a C/C++ speech-to-text library built on ggml"
Expand Down Expand Up @@ -36,7 +36,7 @@ dynamic-backends = ["shared", "transcribe-cpp-sys/dynamic-backends"]
# `transcribe-cpp --no-default-features`, silently re-enabling Metal. The backend
# features below forward explicitly, so the default (`metal`) still reaches sys
# via `metal = ["transcribe-cpp-sys/metal"]`.
transcribe-cpp-sys = { version = "0.0.3", path = "../../..", default-features = false }
transcribe-cpp-sys = { version = "0.0.4", path = "../../..", default-features = false }
thiserror = "2"
log = "0.4"

Expand Down
12 changes: 5 additions & 7 deletions bindings/rust/transcribe-cpp/tests/device_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ fn loaded_model_reports_an_enumerated_device() {
// A model loaded with default options resolves a device. That Device has no
// registry index (transcribe_model_get_device does not expose one), and it
// correlates back to a device from devices() by name (+ device_id when set).
let Some((model_path, _)) =
common::smoke_fixtures("loaded_model_reports_an_enumerated_device")
let Some((model_path, _)) = common::smoke_fixtures("loaded_model_reports_an_enumerated_device")
else {
return;
};
Expand All @@ -25,9 +24,9 @@ fn loaded_model_reports_an_enumerated_device() {
// It must match one of the enumerated devices by name, and by device_id
// when the model device reports one.
let all = devices();
let matched = all.iter().any(|d| {
d.name == dev.name && (dev.device_id.is_none() || d.device_id == dev.device_id)
});
let matched = all
.iter()
.any(|d| d.name == dev.name && (dev.device_id.is_none() || d.device_id == dev.device_id));
assert!(
matched,
"model device {dev:?} not found among enumerated devices {all:?}"
Expand All @@ -37,8 +36,7 @@ fn loaded_model_reports_an_enumerated_device() {
#[test]
fn negative_gpu_device_is_invalid_argument() {
// gpu_device must be >= 0; -1 is rejected before any device lookup.
let Some((model_path, _)) =
common::smoke_fixtures("negative_gpu_device_is_invalid_argument")
let Some((model_path, _)) = common::smoke_fixtures("negative_gpu_device_is_invalid_argument")
else {
return;
};
Expand Down
2 changes: 1 addition & 1 deletion bindings/swift/Sources/TranscribeCpp/TranscribeCpp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public enum Transcribe {
/// Version this binding was built against. Pinned here for the pre-1.0
/// base-version load gate; the version-sync milestone will generate it from
/// `include/transcribe.h` (the single source of truth) rather than hardcode.
public static let compiledVersion = "0.0.3"
public static let compiledVersion = "0.0.4"

/// `MAJOR.MINOR.PATCH` of the linked native library.
public static func version() -> String { String(cString: transcribe_version()) }
Expand Down
14 changes: 7 additions & 7 deletions bindings/typescript/package-lock.json

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

12 changes: 6 additions & 6 deletions bindings/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "transcribe-cpp",
"version": "0.0.3",
"version": "0.0.4",
"description": "TypeScript/Node.js bindings for transcribe.cpp — a C/C++ speech-to-text library built on ggml",
"type": "module",
"exports": {
Expand Down Expand Up @@ -38,11 +38,11 @@
"koffi": "^3.0.2"
},
"optionalDependencies": {
"@transcribe-cpp/darwin-arm64-metal": "0.0.3",
"@transcribe-cpp/darwin-x64-cpu": "0.0.3",
"@transcribe-cpp/linux-x64-cpu-vulkan": "0.0.3",
"@transcribe-cpp/linux-arm64-cpu-vulkan": "0.0.3",
"@transcribe-cpp/win32-x64-cpu-vulkan": "0.0.3"
"@transcribe-cpp/darwin-arm64-metal": "0.0.4",
"@transcribe-cpp/darwin-x64-cpu": "0.0.4",
"@transcribe-cpp/linux-x64-cpu-vulkan": "0.0.4",
"@transcribe-cpp/linux-arm64-cpu-vulkan": "0.0.4",
"@transcribe-cpp/win32-x64-cpu-vulkan": "0.0.4"
},
"devDependencies": {
"@types/node": "^22.0.0",
Expand Down
2 changes: 1 addition & 1 deletion include/transcribe.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
*/
#define TRANSCRIBE_VERSION_MAJOR 0
#define TRANSCRIBE_VERSION_MINOR 0
#define TRANSCRIBE_VERSION_PATCH 3
#define TRANSCRIBE_VERSION_PATCH 4

#define TRANSCRIBE_VERSION_STRINGIZE_(x) #x
#define TRANSCRIBE_VERSION_STRINGIZE(x) TRANSCRIBE_VERSION_STRINGIZE_(x)
Expand Down
Loading