codemp/build.rs
alemi.dev 4fcab00d34
Some checks are pending
test / test-unit (push) Waiting to run
test / test-beta (beta) (push) Blocked by required conditions
test / test-beta (nightly) (push) Blocked by required conditions
test / test-functional (push) Blocked by required conditions
test / test-build (java, macos-latest) (push) Blocked by required conditions
test / test-build (java, ubuntu-latest) (push) Blocked by required conditions
test / test-build (java, windows-latest) (push) Blocked by required conditions
test / test-build (js, macos-latest) (push) Blocked by required conditions
test / test-build (js, ubuntu-latest) (push) Blocked by required conditions
test / test-build (js, windows-latest) (push) Blocked by required conditions
test / test-build (lua, macos-latest) (push) Blocked by required conditions
test / test-build (lua, ubuntu-latest) (push) Blocked by required conditions
test / test-build (lua, windows-latest) (push) Blocked by required conditions
test / test-build (py, macos-latest) (push) Blocked by required conditions
test / test-build (py, ubuntu-latest) (push) Blocked by required conditions
test / test-build (py, windows-latest) (push) Blocked by required conditions
chore: cargo features (#66)
* chore: changed features layout

now using `dep:` and `crate?/feat` syntaxes (introduced in rust 1.60).
this may mess with lua rockspec
2024-11-16 16:28:46 +01:00

26 lines
552 B
Rust

#[cfg(feature = "js")]
extern crate napi_build;
#[cfg(feature = "py")]
extern crate pyo3_build_config;
/// The main method of the buildscript, required by some glue modules.
fn main() {
#[cfg(feature = "js")]
{
napi_build::setup();
}
#[cfg(feature = "py")]
{
pyo3_build_config::add_extension_module_link_args();
}
#[cfg(feature = "lua")]
{
if let Ok("macos") = std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
println!("cargo:rustc-cdylib-link-arg=-undefined");
println!("cargo:rustc-cdylib-link-arg=dynamic_lookup");
}
}
}