Skip to content

Commit

Permalink
bindings: use aws-lc-rs instead of aws-lc-sys (#4415)
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft authored Feb 15, 2024
1 parent 0998358 commit ec044bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bindings/rust/s2n-tls-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ fn main() {
}

fn env<N: AsRef<str>>(name: N) -> String {
option_env(name).expect("missing env var")
let name = name.as_ref();
option_env(name).unwrap_or_else(|| panic!("missing env var {name:?}"))
}

fn option_env<N: AsRef<str>>(name: N) -> Option<String> {
Expand Down Expand Up @@ -197,9 +198,9 @@ impl Default for Libcrypto {

eprintln!("cargo:rerun-if-env-changed={}", name);

let link = format!("aws_lc_{version}_crypto");
let include = value;
let root = env(format!("DEP_AWS_LC_{version}_ROOT"));
let link = env(format!("DEP_AWS_LC_{version}_LIBCRYPTO"));

return Self {
version,
Expand Down
2 changes: 2 additions & 0 deletions bindings/rust/s2n-tls-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ mod api;
pub use api::*;

mod features;

#[allow(unused_imports)]
pub use features::*;

// Additional defines that don't get imported with bindgen
Expand Down
2 changes: 1 addition & 1 deletion bindings/rust/s2n-tls-sys/templates/Cargo.template
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stacktrace = []
# unstable-foo = []

[dependencies]
aws-lc-sys = { version = "0.13" }
aws-lc-rs = { version = "1.6.2" }
libc = "0.2"

[build-dependencies]
Expand Down

0 comments on commit ec044bf

Please sign in to comment.