Document Path: docs/appforge/native-languages.md
Appforge provides dedicated native language integration via the command:
tsc native add <language>Supported languages include:
kotlin: Android Kotlin extensions and Activity bridgesjava: Legacy Android Java librariesswift: iOS and macOS native modulesrust: High-performance cross-compiled shared librariescpp: C++ native code via CMake / NDKc: Pure C ABI modules
Running tsc native add kotlin sets up:
native/
└── kotlin/
├── build.gradle.kts
└── src/main/kotlin/com/techscript/nativeplugins/
└── CustomPlugin.kt
Running tsc native add rust sets up:
native/
└── rust/
├── Cargo.toml
└── src/
└── lib.rs (extern "C" functions)
Running tsc native add cpp sets up:
native/
└── cpp/
├── CMakeLists.txt
└── src/
└── plugin.cpp
From TechScript code:
use native
# Call native module registered in native/
result = native.call("custom_plugin", "do_action", ["param1", 42])
say $"Native returned: {result}"
On Android, calls route through JNI to the Kotlin/Java plugin registry. On desktop, calls route through dynamic library symbol lookup (libloading).