iOS static lib compatible

This commit is contained in:
randogoth 2025-08-27 21:40:35 +03:00
parent 800d58ea89
commit 249a16536a
2 changed files with 24 additions and 1 deletions

View file

@ -5,7 +5,7 @@ edition = "2021"
[lib] [lib]
name = "onod3000" name = "onod3000"
crate-type = ["cdylib", "lib"] crate-type = ["cdylib", "staticlib", "lib"]
[dependencies] [dependencies]
flate2 = "1.0.35" flate2 = "1.0.35"
@ -19,3 +19,8 @@ python = ["dep:pyo3"]
[[bin]] [[bin]]
name="onod3000" name="onod3000"
file="src/bin/onod3000.rs" file="src/bin/onod3000.rs"
[profile.release]
lto = true
codegen-units = 1
panic = "abort"

18
include/onod3000.h Normal file
View file

@ -0,0 +1,18 @@
#pragma once
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
// Returns true on success. Writes three doubles: obs, z, p
bool onod_run(const char* test,
const uint8_t* samples,
size_t len,
double* result /* length >= 3 */);
#ifdef __cplusplus
}
#endif