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

chore: Move prost to a subdirectory #1033

Merged
merged 1 commit into from
Apr 22, 2024
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: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ jobs:
uses: ./.github/actions/setup-ninja
- uses: Swatinem/rust-cache@v2
- name: test
run: cargo test --workspace --all-targets
run: cargo test --all-targets
- name: test no-default-features
run: cargo test -p prost-build -p prost-derive -p prost-types --all-targets --no-default-features
# Run doc tests separately: https://github.com/rust-lang/cargo/issues/6669
- name: test doc
run: cargo test --workspace --doc
run: cargo test --doc
- name: test doc no-default-features
run: cargo test -p prost-build -p prost-derive -p prost-types --doc --no-default-features

Expand All @@ -91,7 +91,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- uses: taiki-e/install-action@cargo-minimal-versions
- run: cargo minimal-versions --no-private check --workspace --all-features
- run: cargo minimal-versions --no-private check --all-features

kani:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
with:
crate: cargo-no-std-check
- name: prost cargo-no-std-check
run: cargo no-std-check --manifest-path Cargo.toml --no-default-features
run: cargo no-std-check --manifest-path prost/Cargo.toml --no-default-features
- name: prost-types cargo-no-std-check
run: cargo no-std-check --manifest-path prost-types/Cargo.toml --no-default-features
# prost-build depends on prost with --no-default-features, but when
Expand Down
46 changes: 2 additions & 44 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
[package]
name = "prost"
version = "0.12.4"
authors = [
"Dan Burkert <dan@danburkert.com>",
"Lucio Franco <luciofranco14@gmail.com>",
"Casper Meijn <casper@meijn.net>",
"Tokio Contributors <team@tokio.rs>",
]
license = "Apache-2.0"
repository = "https://github.com/tokio-rs/prost"
documentation = "https://docs.rs/prost"
readme = "README.md"
description = "A Protocol Buffers implementation for the Rust Language."
keywords = ["protobuf", "serialization"]
categories = ["encoding"]
edition = "2021"
rust-version = "1.70"

[workspace]
members = [
"conformance",
"prost",
"prost-build",
"prost-derive",
"prost-types",
Expand All @@ -38,31 +20,7 @@ exclude = [
"afl",
]

[lib]
# https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
bench = false

[features]
default = ["derive", "std"]
derive = ["dep:prost-derive"]
prost-derive = ["derive"] # deprecated, please use derive feature instead
no-recursion-limit = []
std = []

[dependencies]
bytes = { version = "1", default-features = false }
prost-derive = { version = "0.12.4", path = "prost-derive", optional = true }

[dev-dependencies]
criterion = { version = "0.4", default-features = false }
env_logger = { version = "0.10", default-features = false }
log = "0.4"
proptest = "1"
rand = "0.8"
resolver = "2"

[profile.bench]
debug = true

[[bench]]
name = "varint"
harness = false
2 changes: 1 addition & 1 deletion conformance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ edition = "2018"
[dependencies]
bytes = "1"
env_logger = { version = "0.10", default-features = false }
prost = { path = ".." }
prost = { path = "../prost" }
protobuf = { path = "../protobuf" }
tests = { path = "../tests" }
2 changes: 1 addition & 1 deletion prost-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ itertools = { version = ">=0.10, <=0.12", default-features = false, features = [
log = "0.4.4"
multimap = { version = ">=0.8, <=0.10", default-features = false }
petgraph = { version = "0.6", default-features = false }
prost = { version = "0.12.4", path = "..", default-features = false }
prost = { version = "0.12.4", path = "../prost", default-features = false }
prost-types = { version = "0.12.4", path = "../prost-types", default-features = false }
tempfile = "3"
once_cell = "1.17.1"
Expand Down
2 changes: 1 addition & 1 deletion prost-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ default = ["std"]
std = ["prost/std"]

[dependencies]
prost = { version = "0.12.4", path = "..", default-features = false, features = ["prost-derive"] }
prost = { version = "0.12.4", path = "../prost", default-features = false, features = ["prost-derive"] }

[dev-dependencies]
proptest = "1"
44 changes: 44 additions & 0 deletions prost/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[package]
name = "prost"
version = "0.12.4"
authors = [
"Dan Burkert <dan@danburkert.com>",
"Lucio Franco <luciofranco14@gmail.com>",
"Casper Meijn <casper@meijn.net>",
"Tokio Contributors <team@tokio.rs>",
]
license = "Apache-2.0"
repository = "https://github.com/tokio-rs/prost"
documentation = "https://docs.rs/prost"
readme = "../README.md"
description = "A Protocol Buffers implementation for the Rust Language."
keywords = ["protobuf", "serialization"]
categories = ["encoding"]
edition = "2021"
rust-version = "1.70"

[lib]
# https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
bench = false

[features]
default = ["derive", "std"]
derive = ["dep:prost-derive"]
prost-derive = ["derive"] # deprecated, please use derive feature instead
no-recursion-limit = []
std = []

[dependencies]
bytes = { version = "1", default-features = false }
prost-derive = { version = "0.12.4", path = "../prost-derive", optional = true }

[dev-dependencies]
criterion = { version = "0.4", default-features = false }
env_logger = { version = "0.10", default-features = false }
log = "0.4"
proptest = "1"
rand = "0.8"

[[bench]]
name = "varint"
harness = false
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib.rs → prost/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![doc(html_root_url = "https://docs.rs/prost/0.12.2")]
#![cfg_attr(not(feature = "std"), no_std)]
#![doc = include_str!("../README.md")]
#![doc = include_str!("../../README.md")]

// Re-export the alloc crate for use within derived code.
#[doc(hidden)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false
edition = "2018"

[dependencies]
prost = { path = ".." }
prost = { path = "../prost" }
prost-types = { path = "../prost-types" }

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion tests-2015/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ std = []
anyhow = "1.0.1"
bytes = "1"
cfg-if = "1"
prost = { path = ".." }
prost = { path = "../prost" }
prost-types = { path = "../prost-types" }
protobuf = { path = "../protobuf" }

Expand Down
2 changes: 1 addition & 1 deletion tests-no-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ path = "../tests/src/lib.rs"
anyhow = { version = "1.0.45", default-features = false }
bytes = { version = "1", default-features = false }
cfg-if = "1"
prost = { path = "..", default-features = false, features = ["derive"] }
prost = { path = "../prost", default-features = false, features = ["derive"] }
prost-types = { path = "../prost-types", default-features = false }
protobuf = { path = "../protobuf" }

Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ std = []
anyhow = "1.0.1"
# bytes = "1"
cfg-if = "1"
prost = { path = ".." }
prost = { path = "../prost" }
prost-types = { path = "../prost-types" }
protobuf = { path = "../protobuf" }

Expand Down
2 changes: 1 addition & 1 deletion tests/single-include/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false
license = "MIT"

[dependencies]
prost = { path = "../.." }
prost = { path = "../../prost" }

[build-dependencies]
prost-build = { path = "../../prost-build" }
Loading