Skip to content

Add a workspace #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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
45 changes: 37 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,55 @@
[package]
name = "ttrpc"
version = "0.8.4"
authors = ["The AntFin Kata Team <[email protected]>"]
[workspace]
members = [
"./compiler",
"./ttrpc-codegen",
"./example",
"./"
]
resolver = "2"

[workspace.package]
edition = "2018"
license = "Apache-2.0"
keywords = ["ttrpc", "protobuf", "rpc"]
readme = "README.md"
repository = "https://github.com/containerd/ttrpc-rust"
homepage = "https://github.com/containerd/ttrpc-rust"
authors = ["The AntFin Kata Team <[email protected]>"]

[workspace.dependencies]
# The dependencies in this section can be used by the crates in this
# workspace by specifying `workspace = true` instead of the crate
# version. For example, for protobuf:
# protobuf = { workspace = true }
ttrpc = { version = "0.8.4", path = "./" }
ttrpc-codegen = { version = "0.5.0", path = "./ttrpc-codegen" }
ttrpc-compiler = { version = "0.7.0", path = "./compiler" }
protobuf = "3.7.2"
protobuf-codegen = "3.7.2"
protobuf-support = "3.7.2"

[package]
name = "ttrpc"
version = "0.8.4"
authors = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
keywords = ["ttrpc", "protobuf", "rpc"]
readme = "README.md"
description = "A Rust version of ttrpc."
rust-version = "1.70"

[dependencies]
protobuf = { version = "3.1.0" }
protobuf = { workspace = true }
libc = { version = "0.2.59", features = [ "extra_traits" ] }
nix = "0.26.2"
log = "0.4"
byteorder = "1.3.2"
thiserror = "1.0"
async-trait = { version = "0.1.31", optional = true }
async-stream = { version = "0.3.6", optional = true }
tokio = { version = "1", features = ["rt", "sync", "io-util", "macros", "time"], optional = true }
tokio = { version = "1", features = ["rt", "sync", "io-util", "macros", "time", "net"], optional = true }
futures = { version = "0.3", optional = true }
crossbeam = "0.8.0"

Expand All @@ -33,7 +62,7 @@ tokio-vsock = { version = "0.7.0", optional = true }
[build-dependencies]
# lock home to avoid conflict with latest version
home = "=0.5.9"
protobuf-codegen = "3.1.0"
protobuf-codegen = { workspace = true }

[features]
default = ["sync"]
Expand Down
27 changes: 27 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Release Process

This document describes the steps to release a new version of the crate or wasi-demo-app images.

## Crate Release Process

### Release Steps

1. Bump package and dependency versions in:
* `./compiler/Cargo.toml`: Bump the package version as needed.
* `./ttrpc-codegen/Cargo.toml`: Bump the package version as needed.
* `./Cargo.toml`: Bump package version as needed. Then bump the workspace dependencies version to match the respective crates versions.
2. Commit the changes and get them merged in the repo.
2. Dry run the `cargo publish` command as follow
```bash
cargo +nightly publish \
-Z package-workspace \
--dry-run \
--locked \
-p ttrpc \
-p ttrpc-codegen \
-p ttrpc-compiler
```
2. If the dry run succeeds, publish the crates that need publishing using `cargo publihs -p <crate>` in the following order
1. `ttrpc-compiler`
2. `ttrpc-codegen`
3. `ttrpc`
12 changes: 6 additions & 6 deletions compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[package]
name = "ttrpc-compiler"
version = "0.7.0"
edition = "2018"
authors = ["The AntFin Kata Team <[email protected]>"]
license = "Apache-2.0"
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
readme = "README.md"
keywords = ["compiler", "ttrpc", "protobuf"]
description = "ttRPC compiler for ttrpc"
categories = ["network-programming"]
repository = "https://github.com/containerd/ttrpc-rust/tree/master/compiler"
homepage = "https://github.com/containerd/ttrpc-rust/tree/master/compiler"
readme = "README.md"

[dependencies]
# lock home to avoid conflict with latest version
home = "=0.5.9"
protobuf = "2.27.1"
protobuf-codegen = "2.27.1"
protobuf = { workspace = true }
protobuf-codegen = { workspace = true }
prost = "0.8"
prost-build = "0.8"
prost-types = "0.8"
Expand Down
Loading