API Reference
MetaFFI provides language-specific APIs that share the same structure across all supported languages:
MetaFFIRuntime— Load a foreign language runtime into the processMetaFFIModule— Load a foreign module (JAR,.pyfile, compiled.dll/.so)load/load_entity— Load a specific entity (function, method, field) and get back a callable
Language APIs
| Language | API | Install |
|---|---|---|
| Python3 | MetaFFIRuntime, MetaFFIModule |
pip install metaffi-api |
| JVM | MetaFFIRuntime, MetaFFIModule, Caller |
metaffi.api.jar (ships with installer) |
| Go | MetaFFIRuntime, MetaFFIModule |
go get github.com/MetaFFI/sdk/api/go |
Common Pattern
All three APIs follow the same pattern:
1. Create runtime → MetaFFIRuntime("openjdk")
2. Load module → runtime.load_module("mylib.jar")
3. Load entity → module.load_entity("class=...,callable=...", params, retvals)
4. Call it → result = entity(args...)
5. Release → runtime.release_runtime_plugin()
The Entity Path documentation describes how to specify the location of entities within each language’s modules.