Skip to content

Commit

Permalink
Use workspace metadata for crates
Browse files Browse the repository at this point in the history
  • Loading branch information
inikulin committed Jul 8, 2023
1 parent c4e8a94 commit a4bf734
Show file tree
Hide file tree
Showing 8 changed files with 6,037 additions and 471 deletions.
31 changes: 30 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,33 @@ members = [
"tokio-boring",
"hyper-boring"
]
resolver = "2"
resolver = "2"

[workspace.package]
version = "3.0.0"
repository = "https://github.com/cloudflare/boring"
edition = "2021"

[workspace.dependencies]
boring-sys = { version = "3.0", path = "./boring-sys" }
boring = { version = "3.0", path = "./boring" }
tokio-boring = { version = "3.0", path = "./tokio-boring" }

bindgen = { version = "0.65.1", default-features = false, features = ["runtime"] }
cmake = "0.1"
fslock = "0.2"
bitflags = "1.0"
foreign-types = "0.5"
lazy_static = "1"
libc = "0.2"
hex = "0.4"
rusty-hook = "^0.11"
futures = "0.3"
tokio = { version = "1", features = ["full"] }
anyhow = "1"
antidote = "1.0.0"
http = "0.2"
hyper = { version = "0.14", default-features = false, features = ["full"] }
linked_hash_set = "0.1"
once_cell = "1.0"
tower-layer = "0.3"
18 changes: 10 additions & 8 deletions boring-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
name = "boring-sys"
version = "2.1.0"
version = { workspace = true }
authors = ["Alex Crichton <[email protected]>",
"Steven Fackler <[email protected]>",
"Ivan Nikulin <[email protected]>"]
license = "MIT"
description = "FFI bindings to BoringSSL"
repository = "https://github.com/cloudflare/boring"
repository = { workspace = true }
documentation = "https://docs.rs/boring-sys"
links = "boringssl"
readme = "README.md"
categories = ["cryptography", "external-ffi-bindings"]
edition = "2021"
edition = { workspace = true }
include = [
"/*.md",
"/*.toml",
Expand All @@ -28,11 +28,6 @@ include = [
"/scripts"
]

[build-dependencies]
bindgen = { version = "0.65.1", default-features = false, features = ["runtime"] }
cmake = "0.1"
fslock = "0.2.1"

[features]
# Use a FIPS-validated version of boringssl.
fips = []
Expand All @@ -42,3 +37,10 @@ rpk = []

# Enables post-quantum crypto (https://blog.cloudflare.com/post-quantum-for-all/)
post-quantum = []

[build-dependencies]
bindgen = { workspace = true }
cmake = { workspace = true }
fslock = { workspace = true }


11 changes: 9 additions & 2 deletions boring-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,17 @@ fn ensure_patches_applied() -> io::Result<()> {

lock_file.lock()?;

let boring_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(BORING_SSL_PATH);

let mut cmd = Command::new("git");

cmd.args(["reset", "--hard"]).current_dir(&boring_dir);

run_command(&mut cmd)?;

let mut cmd = Command::new("git");

cmd.args(["reset", "--hard"])
.current_dir(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(BORING_SSL_PATH));
cmd.args(["clean", "-fdx"]).current_dir(&boring_dir);

run_command(&mut cmd)?;

Expand Down
Loading

0 comments on commit a4bf734

Please sign in to comment.