Skip to content

Commit

Permalink
Prepare aws-lc-sys v0.24.2
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jan 3, 2025
1 parent c5e6879 commit d94973c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 32 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ jobs:
fail-fast: false
matrix:
target:
- [aarch64-linux-android, 0]
- [aarch64-unknown-linux-gnu, 1]
- [aarch64-unknown-linux-musl, 1]
- [arm-linux-androideabi, 0]
- [arm-unknown-linux-gnueabihf, 0]
- [arm-unknown-linux-musleabi, 1]
- [arm-unknown-linux-musleabihf, 1]
- [armv7-linux-androideabi, 0]
- [armv7-unknown-linux-gnueabihf, 0]
- [i686-unknown-linux-gnu, 0]
- [powerpc-unknown-linux-gnu, 1]
- [powerpc64-unknown-linux-gnu, 1]
- [powerpc64le-unknown-linux-gnu, 1]
- [riscv64gc-unknown-linux-gnu, 0]
- [s390x-unknown-linux-gnu, 0]
- [x86_64-pc-windows-gnu, 0]
- [x86_64-unknown-linux-musl, 0]
- [ aarch64-linux-android, 0, 1 ]
- [ aarch64-unknown-linux-gnu, 1, 1 ]
- [ aarch64-unknown-linux-musl, 1, 1 ]
- [ arm-linux-androideabi, 0, 0 ]
- [ arm-unknown-linux-gnueabihf, 0, 0 ]
- [ arm-unknown-linux-musleabi, 1, 0 ]
- [ arm-unknown-linux-musleabihf, 1, 0 ]
- [ armv7-linux-androideabi, 0, 0 ]
- [ armv7-unknown-linux-gnueabihf, 0, 0 ]
- [ i686-unknown-linux-gnu, 0, 1 ]
- [ powerpc-unknown-linux-gnu, 1, 0 ]
- [ powerpc64-unknown-linux-gnu, 1, 0 ]
- [ powerpc64le-unknown-linux-gnu, 1, 0 ]
- [ riscv64gc-unknown-linux-gnu, 0, 0 ]
- [ s390x-unknown-linux-gnu, 0, 0 ]
- [ x86_64-pc-windows-gnu, 0, 1 ]
- [ x86_64-unknown-linux-musl, 0, 1 ]
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -70,6 +70,9 @@ jobs:
- if: ${{ !startsWith(matrix.target[0], 'x86_64') }}
run: |
echo 'AWS_LC_RS_DISABLE_SLOW_TESTS=1' >> "$GITHUB_ENV"
- if: ${{ matrix.target[2] == 1 }}
run: |
echo 'AWS_LC_SYS_EXTERNAL_BINDGEN=0' >> "$GITHUB_ENV"
- name: Cross-compilation (test release)
run: cross test -p aws-lc-rs --release --features unstable --target ${{ matrix.target[0] }}
- if: ${{ matrix.target[1] == 1 }}
Expand Down Expand Up @@ -259,7 +262,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [13.4, 14.1]
target: [ 13.4, 14.1 ]
steps:
- uses: actions/checkout@v4
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/sys-bindings-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [ aarch64-unknown-linux-gnu, i686-unknown-linux-gnu, aarch64-unknown-linux-musl, x86_64-unknown-linux-musl ]
target:
- "aarch64-linux-android"
- "aarch64-unknown-linux-gnu"
- "i686-unknown-linux-gnu"
- "aarch64-unknown-linux-musl"
- "x86_64-unknown-linux-musl"
steps:
- uses: actions/checkout@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions aws-lc-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "aws-lc-sys"
description = "AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It іs based on code from the Google BoringSSL project and the OpenSSL project."
version = "0.24.1"
links = "aws_lc_0_24_1"
version = "0.24.2"
links = "aws_lc_0_24_2"
authors = ["AWS-LC"]
edition = "2021"
repository = "https://github.com/aws/aws-lc-rs"
Expand Down
27 changes: 16 additions & 11 deletions aws-lc-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ fn generate_src_bindings(manifest_dir: &Path, prefix: &Option<String>, src_bindi
..Default::default()
},
)
.write_to_file(src_bindings_path.join(format!("{}.rs", target_platform_prefix("crypto"))))
.write_to_file(src_bindings_path)
.expect("write bindings");
}

Expand Down Expand Up @@ -430,6 +430,7 @@ fn initialize() {
let target = target();
let supported_platform = match target.as_str() {
"aarch64-apple-darwin"
| "aarch64-linux-android"
| "aarch64-pc-windows-msvc"
| "aarch64-unknown-linux-gnu"
| "aarch64-unknown-linux-musl"
Expand Down Expand Up @@ -521,6 +522,7 @@ fn test_nasm_command() -> bool {
fn prepare_cargo_cfg() {
if cfg!(clippy) {
println!("cargo:rustc-check-cfg=cfg(use_bindgen_generated)");
println!("cargo:rustc-check-cfg=cfg(aarch64_linux_android)");
println!("cargo:rustc-check-cfg=cfg(aarch64_apple_darwin)");
println!("cargo:rustc-check-cfg=cfg(aarch64_pc_windows_msvc)");
println!("cargo:rustc-check-cfg=cfg(aarch64_unknown_linux_gnu)");
Expand Down Expand Up @@ -588,12 +590,14 @@ fn main() {
if is_pregenerating_bindings() {
#[cfg(feature = "bindgen")]
{
emit_warning(&format!(
"Generating src bindings. Platform: '{}' Prefix: '{prefix:?}'",
target()
));
let src_bindings_path = Path::new(&manifest_dir).join("src");
generate_src_bindings(&manifest_dir, &prefix, &src_bindings_path);
let src_bindings_path = Path::new(&manifest_dir)
.join("src")
.join(format!("{}.rs", target_platform_prefix("crypto")));
if is_external_bindgen() {
invoke_external_bindgen(&manifest_dir, &prefix, &src_bindings_path).unwrap();
} else {
generate_src_bindings(&manifest_dir, &prefix, &src_bindings_path);
}
bindings_available = true;
}
} else if is_bindgen_required() {
Expand All @@ -603,10 +607,6 @@ fn main() {
}

if !bindings_available && !cfg!(feature = "ssl") {
emit_warning(&format!(
"Generating bindings - external bindgen. Platform: {}",
target()
));
let gen_bindings_path = out_dir().join("bindings.rs");
let result = invoke_external_bindgen(&manifest_dir, &prefix, &gen_bindings_path);
match result {
Expand Down Expand Up @@ -749,6 +749,11 @@ fn invoke_external_bindgen(
) -> Result<(), String> {
verify_bindgen()?;

emit_warning(&format!(
"Generating bindings - external bindgen. Platform: {}",
target()
));

let options = BindingOptions {
// We collect the symbols w/o the prefix added
build_prefix: None,
Expand Down
1 change: 1 addition & 0 deletions aws-lc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ macro_rules! platform_binding {
};
}

platform_binding!(aarch64_linux_android);
platform_binding!(aarch64_apple_darwin);
platform_binding!(aarch64_pc_windows_msvc);
platform_binding!(aarch64_unknown_linux_gnu);
Expand Down

0 comments on commit d94973c

Please sign in to comment.