mirror of
https://github.com/signalapp/libsignal.git
synced 2026-05-12 18:07:08 +02:00
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.
15 lines
555 B
Rust
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_"
|
|
);
|
|
}
|