Skip to content
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
18 changes: 9 additions & 9 deletions examples/auto/rust
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,12 @@ ngx_rust_module () {
# Module deps are usually added to the object file targets, but we don't have any
LINK_DEPS="$LINK_DEPS $ngx_rust_obj"

eval ${ngx_addon_id}_MODULES=\"\$${ngx_addon_id}_MODULES \
$ngx_rust_target_type:$ngx_rust_target_name\"
eval ${ngx_addon_id}_RUST_TARGETS=\"\$${ngx_addon_id}_RUST_TARGETS \
$ngx_rust_target_type:$ngx_rust_target_name\"

if [ -n "$ngx_rust_target_features" ]; then
eval ${ngx_addon_id}_FEATURES=\"\$${ngx_addon_id}_FEATURES \
$ngx_rust_target_features\"
eval ${ngx_addon_id}_RUST_FEATURES=\"\$${ngx_addon_id}_RUST_FEATURES \
$ngx_rust_target_features\"
fi

. auto/module
Expand All @@ -268,12 +268,12 @@ ngx_rust_make_modules () {
ngx_addon_id=$(echo "$ngx_addon_name" | sed -e 's/[^A-Za-z0-9_]/_/g')
ngx_cargo_manifest=${ngx_cargo_manifest:-"$ngx_addon_dir/Cargo.toml"}

eval ngx_rust_features="\$${ngx_addon_id}_FEATURES"
eval ngx_rust_modules="\$${ngx_addon_id}_MODULES"
eval ngx_rust_features="\$${ngx_addon_id}_RUST_FEATURES"
eval ngx_rust_targets="\$${ngx_addon_id}_RUST_TARGETS"

for module in $ngx_rust_modules; do
ngx_rust_target_type=${module%%:*}
ngx_rust_target_name=${module#*:}
for target in $ngx_rust_targets; do
ngx_rust_target_type=${target%%:*}
ngx_rust_target_name=${target#*:}

ngx_rust_make_module
done
Expand Down
8 changes: 8 additions & 0 deletions nginx-sys/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ fn main() -> Result<(), BoxError> {
println!("cargo:rerun-if-changed=build/wrapper.h");

let nginx = NginxSource::from_env();
println!(
"cargo:rerun-if-changed={}",
nginx.build_dir.join("Makefile").to_string_lossy()
);
println!(
"cargo:rerun-if-changed={}",
nginx.build_dir.join("ngx_auto_config.h").to_string_lossy()
);
// Read autoconf generated makefile for NGINX and generate Rust bindings based on its includes
generate_binding(&nginx);
Ok(())
Expand Down
Loading