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
8 changes: 5 additions & 3 deletions .github/workflows/bvt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ jobs:
name: Minimum Supported Rust Version
runs-on: ubuntu-latest
env:
RUSTUP_TOOLCHAIN: "1.85.0"
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback
RUSTUP_TOOLCHAIN: "1.80.0"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
run: rustup toolchain install 1.85.0 --profile minimal
run: |
rustup toolchain install 1.80.0 --profile minimal
- name: Install Protoc
run: ./install_protoc.sh
shell: bash
- name: Test runtime and code generators
run: |
cargo test --workspace --features async,sync,security_extension
cargo test -p ttrpc --no-default-features --features sync,async,prost
cargo check -p ttrpc-example --examples
cargo test --manifest-path ttrpc-codegen-prost/Cargo.toml
cargo check --manifest-path example-prost/Cargo.toml --examples

check:
name: Check
Expand Down
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resolver = "2"

[workspace.package]
edition = "2018"
rust-version = "1.85"
rust-version = "1.80"
Comment thread
Tim-Zhang marked this conversation as resolved.
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/containerd/ttrpc-rust"
Expand Down Expand Up @@ -76,6 +76,10 @@ prost-build = { version = "0.13", optional = true }

[dev-dependencies]
ttrpc-codegen = { workspace = true }
# Newer tempfile selects getrandom 0.4, which Cargo 1.80 cannot parse.
tempfile = ">=3.0, <3.25"
# Newer indexmap releases require a newer Rust/Cargo toolchain.
indexmap = ">=2.0, <2.12"

[features]
default = ["sync","rustprotobuf"]
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ ttrpc does not provide TLS. If you expose TCP beyond a trusted boundary, secure

## Compatibility

- Runtime and code generators minimum supported Rust version: **1.85**
- Runtime and code generators minimum supported Rust version: **1.80**
- With Rust 1.80–1.84, a fresh dependency resolution may select transitive
crates requiring a newer toolchain. If needed, constrain `tempfile` to
`<3.25` in your application's `Cargo.toml`. For `indexmap`, use `<2.12` on
Rust 1.80–1.81 or `<2.14` on Rust 1.82–1.84.
- Repository development toolchain: see [`rust-toolchain.toml`](https://github.com/containerd/ttrpc-rust/blob/master/rust-toolchain.toml)
- Default features: `sync`, `rustprotobuf`
- Optional features: `async`, `prost`, `security_extension` (Unix only)
Expand Down
3 changes: 2 additions & 1 deletion compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ protobuf = { workspace = true }
protobuf-codegen = { workspace = true }

[dev-dependencies]
tempfile = "3.0"
# Newer tempfile selects getrandom 0.4, which Cargo 1.80 cannot parse.
tempfile = ">=3.0, <3.25"

[[bin]]
name = "ttrpc_rust_plugin"
7 changes: 7 additions & 0 deletions example-prost/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "ttrpc-example-prost"
version = "0.2.0"
authors = ["The AntFin Kata Team <kata@list.alibaba-inc.com>"]
edition = "2018"
rust-version = "1.80"
license = "Apache-2.0"
keywords = ["ttrpc", "protobuf", "rpc", "prost"]
description = "An example of ttrpc using the Prost backend."
Expand All @@ -25,6 +26,12 @@ rand = "0.8.5"
[build-dependencies]
ttrpc-codegen-prost = { version = "0.1.0", path = "../ttrpc-codegen-prost" }

[dev-dependencies]
# Newer tempfile selects getrandom 0.4, which Cargo 1.80 cannot parse.
tempfile = ">=3.0, <3.25"
# Newer indexmap releases require a newer Rust/Cargo toolchain.
indexmap = ">=2.0, <2.12"

[[example]]
name = "client"
path = "./client.rs"
Expand Down
5 changes: 4 additions & 1 deletion example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "ttrpc-example"
version = "0.2.0"
authors = ["The AntFin Kata Team <kata@list.alibaba-inc.com>"]
edition = "2018"
rust-version = "1.80"
license = "Apache-2.0"
keywords = ["ttrpc", "protobuf", "rpc"]
readme = "README.md"
Expand All @@ -20,7 +21,9 @@ ctrlc = { version = "3.0", features = ["termination"] }
tokio = { version = "1.0.1", features = ["signal", "time", "rt-multi-thread", "macros"] }
async-trait = "0.1.42"
rand = "0.8.5"
clap = { version = "4.5.40", features = ["derive"] }
clap = { version = ">=4.5.40, <4.6", features = ["derive"] }
# clap 4.5 accepts clap_lex 1.1, whose 2024 edition needs newer Cargo.
clap_lex = ">=1.0, <1.1"

[[example]]
name = "client"
Expand Down
8 changes: 7 additions & 1 deletion ttrpc-codegen-prost/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "ttrpc-codegen-prost"
version = "0.1.0"
edition = "2021"
rust-version = "1.85"
rust-version = "1.80"
Comment thread
Tim-Zhang marked this conversation as resolved.
authors = ["The Ant Group Kata Team <kata@list.alibaba-inc.com>"]
license = "Apache-2.0"
keywords = ["codegen", "ttrpc", "protobuf"]
Expand All @@ -24,3 +24,9 @@ prost-types = "0.13"
prost-build = "0.13"
proc-macro2 = "1.0"
quote = "1.0"

[dev-dependencies]
# Newer tempfile selects getrandom 0.4, which Cargo 1.80 cannot parse.
tempfile = ">=3.0, <3.25"
# Newer indexmap releases require a newer Rust/Cargo toolchain.
indexmap = ">=2.0, <2.12"
3 changes: 2 additions & 1 deletion ttrpc-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ protobuf-parse = { workspace = true }
ttrpc-compiler = { workspace = true }

[dev-dependencies]
tempfile = "3"
# Newer tempfile selects getrandom 0.4, which Cargo 1.80 cannot parse.
tempfile = ">=3.0, <3.25"
Loading