mirror of
https://github.com/FluxaMedia/fluxa-core.git
synced 2026-07-26 20:02:13 +00:00
Phase 0 of the fluxa-android KMP/CMP migration needs an xcframework + Swift UniFFI bindings for fluxa_core. Adds an "ios" feature (full-api + uniffi-bindings, no jni/dolby_vision, mirroring the existing "desktop" feature), a staticlib crate-type for xcframework embedding, a [bindings.swift] uniffi.toml section, and a macOS-only build script that produces FluxaCore.xcframework for aarch64-apple-ios and aarch64-apple-ios-sim. Verified on Linux: `cargo check --target aarch64-apple-ios --features ios` and the aarch64-apple-ios-sim equivalent both compile cleanly, so the crate itself has no Android/JNI-only code leaking into the iOS feature set. Actual linking/xcframework packaging needs a Mac with Xcode — untested here.
86 lines
1.8 KiB
TOML
86 lines
1.8 KiB
TOML
[workspace]
|
|
members = ["fluxa-streaming-engine"]
|
|
exclude = ["fuzz"]
|
|
resolver = "2"
|
|
|
|
[workspace.dependencies]
|
|
dolby_vision = { version = "3.3.2", default-features = false }
|
|
fluxa_core = { path = ".", default-features = false }
|
|
jni = { version = "0.21" }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = "debuginfo"
|
|
panic = "unwind"
|
|
|
|
[workspace.lints.rust]
|
|
unsafe_op_in_unsafe_fn = "warn"
|
|
|
|
[workspace.lints.clippy]
|
|
unwrap_used = "warn"
|
|
expect_used = "warn"
|
|
indexing_slicing = "warn"
|
|
panic = "warn"
|
|
|
|
[package]
|
|
name = "fluxa_core"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "staticlib", "rlib"]
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[[bin]]
|
|
name = "uniffi-bindgen"
|
|
path = "uniffi-bindgen.rs"
|
|
required-features = ["uniffi-cli"]
|
|
|
|
[features]
|
|
default = ["native"]
|
|
native = [
|
|
"full-api",
|
|
"dep:jni",
|
|
"dep:dolby_vision",
|
|
"uniffi-bindings",
|
|
]
|
|
desktop = ["full-api"]
|
|
ios = ["full-api", "uniffi-bindings"]
|
|
full-api = []
|
|
streaming-shared = []
|
|
uniffi-bindings = ["dep:uniffi", "full-api"]
|
|
uniffi-cli = ["uniffi-bindings", "uniffi/cli"]
|
|
wasm = ["full-api", "dep:wasm-bindgen", "chrono/wasmbind"]
|
|
fuzzing = []
|
|
bench = []
|
|
|
|
[dependencies]
|
|
base64 = "0.22"
|
|
chrono = { version = "0.4.45", features = ["serde"] }
|
|
dolby_vision = { workspace = true, optional = true }
|
|
jni = { workspace = true, optional = true }
|
|
regex = "1"
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
uniffi = { version = "0.31.1", optional = true }
|
|
wasm-bindgen = { version = "0.2", optional = true }
|
|
web-time = "1"
|
|
|
|
[dev-dependencies]
|
|
criterion = { version = "0.5", default-features = false }
|
|
|
|
[[bench]]
|
|
name = "headless_engine_dispatch"
|
|
harness = false
|
|
required-features = ["bench"]
|
|
|
|
[[bench]]
|
|
name = "stream_ranking"
|
|
harness = false
|
|
required-features = ["bench"]
|