* refactor(mobile): move the native core decoders into a codecs crate * make Format private * rename the decode export and options for what they hold * drop the unused ios and server groups and rename the target params (cherry picked from commit 11bf875313782b8a9e10269bb6f85226b7bdcd72)
14 lines
595 B
Rust
14 lines
595 B
Rust
use std::path::Path;
|
|
|
|
fn main() {
|
|
// Files that define exported items. A directory here would make Flutter rerun the hook every build.
|
|
println!("cargo:rerun-if-changed=src/lib.rs");
|
|
println!("cargo:rerun-if-changed=src/decode.rs");
|
|
println!("cargo:rerun-if-changed=src/thumbhash.rs");
|
|
println!("cargo:rerun-if-changed=cbindgen.toml");
|
|
let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
cbindgen::generate(&crate_dir)
|
|
.unwrap_or_else(|e| panic!("cbindgen failed: {e}"))
|
|
.write_to_file(Path::new(&crate_dir).join("include/native_core.h"));
|
|
}
|