Wire Forge-native release infrastructure
Some checks failed
Cache: Publish Nix / Publish Nix Cache (push) Waiting to run
Build Rust / Cargo Test (push) Successful in 4m14s
Build Site / Next.js Build (push) Failing after 6s
Infra: OpenTofu / OpenTofu (grafana) (push) Successful in 5s
Lint Governance / BEP Metadata (push) Successful in 0s
Build: Android / Android Rust Core Stub (push) Failing after 23s
Some checks failed
Cache: Publish Nix / Publish Nix Cache (push) Waiting to run
Build Rust / Cargo Test (push) Successful in 4m14s
Build Site / Next.js Build (push) Failing after 6s
Infra: OpenTofu / OpenTofu (grafana) (push) Successful in 5s
Lint Governance / BEP Metadata (push) Successful in 0s
Build: Android / Android Rust Core Stub (push) Failing after 23s
This commit is contained in:
parent
97c569fb35
commit
002bd382e9
199 changed files with 14268 additions and 185 deletions
13
crates/burrow-mobile-ffi/Cargo.toml
Normal file
13
crates/burrow-mobile-ffi/Cargo.toml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[package]
|
||||
name = "burrow-mobile-ffi"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Mobile FFI boundary for the Burrow Rust core."
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "staticlib"]
|
||||
|
||||
[dependencies]
|
||||
burrow-core = { path = "../burrow-core" }
|
||||
jni = "0.21"
|
||||
27
crates/burrow-mobile-ffi/src/lib.rs
Normal file
27
crates/burrow-mobile-ffi/src/lib.rs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#![deny(missing_debug_implementations)]
|
||||
|
||||
use std::ffi::c_char;
|
||||
|
||||
use jni::objects::JClass;
|
||||
use jni::sys::jstring;
|
||||
use jni::JNIEnv;
|
||||
|
||||
static CORE_VERSION: &[u8] = concat!(env!("CARGO_PKG_VERSION"), "\0").as_bytes();
|
||||
|
||||
/// C ABI entrypoint for platform shells that do not use JNI.
|
||||
#[no_mangle]
|
||||
pub extern "C" fn burrow_core_version() -> *const c_char {
|
||||
CORE_VERSION.as_ptr().cast()
|
||||
}
|
||||
|
||||
/// JNI entrypoint used by the Android Kotlin stub.
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_net_burrow_android_BurrowCore_version(
|
||||
env: JNIEnv<'_>,
|
||||
_class: JClass<'_>,
|
||||
) -> jstring {
|
||||
match env.new_string(burrow_core::identity()) {
|
||||
Ok(value) => value.into_raw(),
|
||||
Err(_) => std::ptr::null_mut(),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue