Skip to content

Commit 4f3930c

Browse files
chore: use static link explicitly (#7)
* chore: use static link * chore: improve table format
1 parent c388dce commit 4f3930c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ cargo run --example basic
4444

4545
This wrapper provides identical results to the original C implementation. The [`basic.rs`](./examples/basic.rs) example processes 50M samples and produces the **exact same** anomaly counts and thresholds as the reference [`basic.c`](https://asiffer.github.io/libspot/20_get_started/) implementation:
4646

47-
| Metric | C Implementation | Rust Wrapper | Identical |
48-
|:------:|:----------------:|:------------:|:--------:|
49-
| **Anomalies** | 25,898 | 25,898 | |
50-
| **Excess** | 71,938 | 71,938 | |
51-
| **Normal** | 49,902,164 | 49,902,164 | |
52-
| **Z** | 7.422655 | 7.422655 | |
53-
| **T** | 6.236165 | 6.236165 | |
54-
| **Performance** | ~5.476262s | ~5.479736s | |
47+
| Metric | C Implementation | Rust Wrapper | Identical |
48+
|:---------------:|:----------------:|:------------:|:---------:|
49+
| **Anomalies** | 25,898 | 25,898 | |
50+
| **Excess** | 71,938 | 71,938 | |
51+
| **Normal** | 49,902,164 | 49,902,164 | |
52+
| **Z** | 7.422655 | 7.422655 | |
53+
| **T** | 6.236165 | 6.236165 | |
54+
| **Performance** | ~5.476262s | ~5.479736s | |
5555

5656
We run the benchmark with:
5757
- Rust: `cargo run -r --example basic`(with `-r` flag to run the example in release mode).

src/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct SpotRaw {
4545
}
4646

4747
// FFI declarations
48-
#[link(name = "spot")]
48+
#[link(name = "spot", kind = "static")]
4949
extern "C" {
5050
pub fn spot_init(
5151
spot: *mut SpotRaw,

0 commit comments

Comments
 (0)