Safe, ergonomic Rust abstraction over the AIR Native Extension (ANE) C API (fre-sys) for native-side development.
This crate depends on the AIR SDK via fre-sys. See its documentation for setup instructions.
- Adobe AIR SDK from HARMAN
- AIR | AIR SDK
- ActionScript 3.0 Language Reference
- Adobe Flash Platform * Developing Native Extensions for AdobeAIR
- Adobe ActionScript® 3 (AS3) API Reference
This crate provides safe abstractions over the ANE C API.
Underlying objects may still be modified externally by the AIR runtime.
Unsafe code is minimized and encapsulated, but correct usage of this crate's API is still required.
MIT OR Apache-2.0
use fre_rs::prelude::*;
fre_rs::extension! {
extern symbol_initializer;
gen context_initializer, final;
}
fn context_initializer(frt: &FlashRuntime) -> FunctionSet {
let mut funcs = FunctionSet::new();
funcs.add(None, None::<()>, method_name);
funcs
}
fre_rs::function! {
method_name (frt, _, args) -> Str {
frt.trace(args);
Str::new(frt, "Hello! Flash Runtime")
}
}