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

This commit is contained in:
Conrad Kramer 2026-06-07 05:51:12 -07:00
parent 97c569fb35
commit 002bd382e9
199 changed files with 14268 additions and 185 deletions

View 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"

View 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(),
}
}