Skip to content

Commit 5a3a64e

Browse files
All good
1 parent e2b9446 commit 5a3a64e

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

Justfile

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
# Just manual: https://github.com/casey/just
22

33
check:
4-
cargo hack --each-feature --exclude-all-features clippy
4+
cargo hack --each-feature --exclude-all-features clippy --manifest-path rubicon/Cargo.toml
55

66
test:
77
cargo run --manifest-path test-crates/bin/Cargo.toml
8-
9-
build:
10-
#!/usr/bin/env bash -eux
11-
cd rubicon
12-
13-
export RUSTFLAGS="-Clink-arg=-undefined -Clink-arg=dynamic_lookup"
14-
15-
echo "======== Regular build ========"
16-
cargo build
17-
nm target/debug/librubicon.dylib | grep -E 'RUBICON_(TL|PL)_SAMPLE'
18-
19-
echo "======== Export globals ========"
20-
cargo build --features export-globals
21-
nm target/debug/librubicon.dylib | grep -E 'RUBICON_(TL|PL)_SAMPLE'
22-
23-
echo "======== Import globals ========"
24-
cargo build --features import-globals
25-
nm target/debug/librubicon.dylib | grep -E 'RUBICON_(TL|PL)_SAMPLE'

rubicon/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#[cfg(all(feature = "export-globals", feature = "import-globals"))]
22
compile_error!("The features `export-globals` and `import-globals` cannot be used together");
33

4+
#[cfg(any(feature = "export-globals", feature = "import-globals"))]
45
pub use paste::paste;
56

67
//===== crimes

test-crates/bin/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ fn main() {
2020

2121
let modules = ["../mod_a", "../mod_b"];
2222
for module in modules {
23+
soprintln!("building {module}");
2324
let output = std::process::Command::new("cargo")
2425
.arg("b")
2526
.env(
@@ -39,6 +40,7 @@ fn main() {
3940
}
4041
}
4142

43+
soprintln!("loading modules...");
4244
let lib_a =
4345
unsafe { libloading::Library::new("../mod_a/target/debug/libmod_a.dylib").unwrap() };
4446
let lib_a = Box::leak(Box::new(lib_a));

0 commit comments

Comments
 (0)