Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

3.1 KB
Raw Blame
[package]
name = "concat-android"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
publish = false
description = "Concat on Android: the activity that hosts the editor window."

# An Android app is a shared object the activity loads, not a program.
[lib]
crate-type = ["cdylib"]

[dependencies]
# The window, whole. Slint's android-activity backend is chosen by the
# window's own manifest for this target; this crate only names the
# activity's entry point.
concat.workspace = true
slint = { version = "1.18", default-features = false, features = [
    "std",
    "backend-android-activity-06",
    "compat-1-2",
] }
# Words to logcat: the log facade, the logger that writes it there, and
# libc for the pipe that carries stderr across.
log = "0.4"
android_logger = "0.15"
libc = "0.2"
# The bridge to the activity's Java: the document picker in java/, loaded
# from the dex that build.rs makes. The version Slint's backend uses, so
# there is one JNI in the binary.
jni = "0.22"

[build-dependencies]
# javac and d8 through the SDK, the way Slint's backend compiles its own
# helper.
android-build = "0.1"

# `cargo apk build -p concat-android` packages the shared object, the
# sherpa-onnx runtime libraries and the manifest below into an APK. The
# runtime libraries come from scripts/sherpa-mobile.sh.
[package.metadata.android]
package = "org.standalones.concat"
apk_name = "Concat"
build_targets = ["aarch64-linux-android"]
runtime_libs = "../../vendor/sherpa-onnx/jniLibs"
# The launcher icon, at every density Android asks for (48, 72, 96, 144,
# 192px); rendered from assets/new_concat_logo_512_rounded_light_theme.svg.
resources = "res"

[package.metadata.android.sdk]
# Android 8.0: AAudio, the audio path the engine plays through.
min_sdk_version = 26
target_sdk_version = 35

# Speech models are downloaded on first use.
[[package.metadata.android.uses_permission]]
name = "android.permission.INTERNET"

# The voiceover. A permission the person grants while the app runs, so
# the manifest only makes it askable; ConcatFiles.askMicrophone asks.
[[package.metadata.android.uses_permission]]
name = "android.permission.RECORD_AUDIO"

[package.metadata.android.application]
label = "Concat"
icon = "@mipmap/ic_launcher"
# The activity is never recreated for a change the window can take as it
# runs. A recreation ends Slint's event loop, and the end of the loop is
# the end of the process, so each of these closed the app mid-edit: dark
# mode switching on (at sunset, too), split screen, a larger font or
# display size, a new language, a keyboard plugged in.
[package.metadata.android.application.activity]
config_changes = "orientation|keyboardHidden|keyboard|navigation|screenSize|smallestScreenSize|screenLayout|uiMode|density|fontScale|fontWeightAdjustment|locale|layoutDirection"
launch_mode = "singleTop"
# Upright only. The phone shell is drawn for a screen held upright - the
# monitor over the lanes over the bar - and turned on its side it left no
# room for any of them (#221, #222, #229). Until there is a shell for a
# wide screen, the activity stays portrait, tablets included.
orientation = "portrait"

[lints]
workspace = true