Files
libsignal/rust/bridge/shared/testing/build.rs
Alex Konradi 0e4d420f69 Add libsignal-jni-testing crate with test-only functions for Java
This parallels the exiting libsignal-jni crate but exports functions from 
libsignal-bridge-testing instead of libsignal-bridge. The crate is compiled as 
a separate shared object that is included in the published libsignal package, 
but which can be excluded at Android packaging time.
2024-07-09 13:07:36 -04:00

15 lines
555 B
Rust

//
// Copyright 2024 Signal Messenger, LLC.
// SPDX-License-Identifier: AGPL-3.0-only
//
fn main() {
// Set environment variables for bridge_fn to produce correctly-named symbols for FFI and JNI.
println!("cargo:rustc-env=LIBSIGNAL_BRIDGE_FN_PREFIX_FFI=signal_");
// This naming convention comes from JNI:
// https://docs.oracle.com/en/java/javase/20/docs/specs/jni/design.html#resolving-native-method-names
println!(
"cargo:rustc-env=LIBSIGNAL_BRIDGE_FN_PREFIX_JNI=Java_org_signal_libsignal_internal_NativeTesting_"
);
}