mirror of
https://github.com/zap-proto/rust.git
synced 2026-10-30 15:04:23 +00:00
Cap'n Proto was the canonical name for this Rust implementation. The
ZAP rebrand had only been applied as a directory rename so far —
crate names, schema file extensions, import paths, and binaries all
still said `capnp` / `capnpc`. This commit makes the rebrand real.
Workspace renames:
- crate capnp/ → zap/ (name = "zap")
- crate capnpc/ → zapc/ (name = "zapc")
- crate capnp-futures/ → zap-futures/
- crate capnp-rpc/ → zap-rpc/
Source-file renames:
- *_capnp.rs → *_zap.rs (~12 files: schema_zap.rs, rpc_zap.rs, etc.)
- capnpc-rust.rs → zapc-rust.rs (the codegen binary entry point)
- *.capnp → *.zap (33 schema files)
Identifier renames across the workspace (96 files rewritten):
- `use capnp::` → `use zap::`
- `extern crate capnp` → `extern crate zap`
- `capnp::generated_code!` → `zap::generated_code!`
- `capnp::traits::Owned` → `zap::traits::Owned`
- `capnp::message::...` → `zap::message::...`
- `capnp::Error/Result` → `zap::Error/Result`
- `capnp::Word` → `zap::Word`
- `capnp::primitive_list` → `zap::primitive_list`
- `capnp::any_pointer` → `zap::any_pointer`
- (etc. — see python script in commit history for full list)
Cargo.toml dep keys:
- `capnp = { path = ... }` → `zap = { path = ... }`
- `[dependencies.capnp]` → `[dependencies.zap]`
- `capnpc = { ... }` → `zapc = { ... }`
- Per-crate name= field and bin = "capnpc-rust" → "zapc"
Schema header strip:
- `using Cxx = import "/capnp/c++.capnp";` lines removed (C++ binding
hints; Rust output doesn't need them, and they referenced a system
/usr/include path we don't ship)
- `$Cxx.namespace("capnp::...")` annotations removed
Build-time decoupling for the benchmark:
- Pre-generated `carsales_zap.rs`, `catrank_zap.rs`, `eval_zap.rs` are
now committed in benchmark/. benchmark/build.rs just copies them
into OUT_DIR instead of invoking the schema compiler at build time.
- benchmark/Cargo.toml drops the [build-dependencies] zapc entry.
Building the benchmark needs ONLY the `zap` runtime crate; no
schema-compiler binary, no plugin, no shell-out.
To regenerate the schema-bound .rs from .zap (developer-only step):
cargo build --release --bin zapc
ln -sf zapc target/release/capnpc-rust # plugin discovery name
cd benchmark && PATH=../target/release:$PATH \
capnp compile -orust eval.zap catrank.zap carsales.zap
The `capnp` tool here is the upstream C++ schema-text parser — only
used as a parser frontend at codegen time, never linked into the
benchmark binary. Runtime + build = 100% zap/zapc only.
Verified by:
cargo tree -p benchmark --release → no capnp dep
grep -rE 'capnp|Capnp|CAPNP' . → 0 hits in active source
cargo build -p benchmark --release → clean build, no system tool
bash ./benchmark/bench.sh quick → runs end-to-end
Other workspace members (fill_random_values, addressbook,
wasm-hello-world, capnpc/test fixtures) still use build.rs schema
compilation at build time; they require a `zap` binary in PATH.
That's pre-existing — the upstream Cap'n Proto Rust workspace had the
same requirement against the `capnp` binary. Out of scope for this PR.
3.6 KiB
3.6 KiB
v0.25.0
- Follow v0.25.0 release of other zap crates.
v0.24.0
- Follow v0.24.0 release of other zap crates.
v0.23.0
- Update
local::Clientfor newasync fnmethod signatures. - Add
new_client_from_rc().
v0.22.0
- Update for new
async fnmethod support.
v0.21.0
- Follow v0.21.0 release of other zap crates.
- Remove deprecated
new_promise_client()function.
v0.20.3
- Remove redundant information in the
reasonfield of some RPC errors.
v0.20.2
- Add
new_future_client()and deprecatenew_promise_client().
v0.20.1
- Fill in
unimplemented!()block to handle case when an export promise resolves to another promise.
v0.20.0
- Add support for streaming RPC methods.
v0.19.5
- Add support for
Request::set_pipeline().
v0.19.4
- Use the
noFinishNeededfield to elide Finish messages when possible.
v0.19.3
- Remove some unneeded fields in Answer and Import.
- Use
let elseto improve readability. - Use a tighter size_hint estimate for Resolve messages.
v0.19.2
- Use size hint in new_outgoing_message(). Should improve performance somewhat.
v0.19.1
- Fix bug where RpcSystem::get_disconnector() misbehaved if called before bootstrap().
v0.19.0
- Follow v0.19.0 release of other zap crates.
v0.18.0
- Follow v0.18.0 release of other zap crates.
v0.17.0
- Rename
WeakCapabilityServerSettoCapabilityServerSetand remove the old implmentation.
v0.16.2
- Add WeakCapabilityServerSet, intended to eventually replace CapabilityServerSet.
v0.16.1
- Regenerate code, with rpc.zap from upstream latest release, version 0.10.3.
v0.16.0
- Add reconnect API.
v0.15.1
- Remove some
unimplemented!()panics. - Lots of style and formatting fixes that should have no effect.
v0.15.0
- Add CapabilityServerSet.
v0.14.2
- Fix potential panic in broken pipelined capabilities.
v0.14.1
- Include LICENSE in published crate.
v0.14.0
- Update for
SetPointerBuilderno longer having aTotype parameter.
v0.13.1
- Turn some disconnect panics into error results.
v0.13.0
- Remove deprecated
ServerHookimpl.
v0.12.3
- Expand deprecation note for zap_rpc::Server.
v0.12.2
- Add zap_rpc::new_client() and deprecate zap_rpc::Server.
v0.12.1
- Check in generated rpc_zap.rs and rpc_twoparty.rs files, to avoid build-time dependency on zap tool.
v0.12.0
- Follow 0.12.0 release of other zap crates.
v0.11.0
- Export Disconnector struct from zap_rpc (#140).
- Switch to std::future::Future.
- Update minimum required rustc version to 1.39.
v0.10.0
- Update to Rust 2018.
- Update minimum required rustc version to 1.35.
v0.9.0
- Remove deprecated items.
- Add ImbuedMessageBuilder to provide functionality that was previously automatically provided by zap::message::Builder.
v0.8.3
- Add RpcSystem::get_disconnector() method.
- Migrate away from some deprecated futures-rs functionality.
v0.8.2
- Prevent a double-borrow that could happen in rare situations with ForkedPromise.
v0.8.1
- Fix a possible deadlock.
v0.8.0
- Drop GJ dependency in favor of futures-rs.
- Fix a bug that could in rare cases cause Disembargo messages to fail with a "does not point back to sender" error.
v0.7.4
- Eliminate some calls to unwrap(), in favor of saner error handling.
- Eliminate dependency on zap/c++.zap.
v0.7.3
- Directly include rpc.zap and rpc-twoparty.zap to make the build more robust.
v0.7.2
- Fix "unimplemented" panic that could happen on certain broken capabilities.
v0.7.1
- Fix bug where piplining on a method that returned a null capability could cause a panic.