Skip to content
Snippets Groups Projects
Verified Commit f3c858c1 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Build includes in parallel

parent f25c494a
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex set -e
include="$(realpath "$1")" include="$(realpath "$1")"
cbindgen="$(realpath cbindgen)"
cargo build --release --manifest-path cbindgen/Cargo.toml
cbindgen="$(realpath target/release/cbindgen)"
jobs=()
for config in src/header/*/cbindgen.toml for config in src/header/*/cbindgen.toml
do do
dir="$(dirname "$config")" dir="$(dirname "$config")"
...@@ -13,8 +16,13 @@ do ...@@ -13,8 +16,13 @@ do
then then
header="$include/${name/_//}.h" header="$include/${name/_//}.h"
pushd "$dir" pushd "$dir"
cargo run --release --manifest-path "$cbindgen/Cargo.toml" -- \ "$cbindgen" -c cbindgen.toml -o "$header" mod.rs &
-c cbindgen.toml -o "$header" mod.rs jobs+=($!)
popd popd
fi fi
done done
for job in "${jobs[@]}"
do
wait "$job"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment