Expand description
Safe, ergonomic Rust abstraction over the AIR Native Extension (ANE) C API (fre-sys) for native-side development.
§Getting Started
The primary entry points of this crate are the macros extension! and function!.
Refer to their documentation for details and examples.
§Flash Runtime Extension Lifecycle
Flash-runtime ━━━━┓
┃
ExtensionContext.loadExtension ━━━━━━━━━━━━┫
↓ ┃
┏━━━━ Extension-Load ━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ ↓ ┃
┃ Initializer → Extension-Data ┃
┃ ↓ ┃
┃ ┏━━ ExtensionContext.createExtensionContext ━━┫
┃ ┃ ↓ ┃
┃ ┃ Context-Initializer → Context-Data ┃
┃ ┃ ↓ ↓ ↓ ↓ ┃
┃ ┃ Function-Data → Function Extension-Data ┃
┃ ┃ ↑ ┃
┃ ┣━━ ExtensionContext.call ━━━━━━━━━━━━━━━━━━━━┫
┃ ┃ ┃
┃ ┃ Extension-Data ┃
┃ ┃ ↑ ┃
┃ ┃ Context-Data ≈ `ContextRegistry` ┃
┃ ┃ ↓ ↑ ┃
┃ ┃ Context-Finalizer Function-Data ┃
┃ ┃ ↑ ┃
┃ ┗━━ ExtensionContext.dispose ━━━━━━━━━━━━━━━━━┫
┃ ┃
┃ Extension-Data → Finalizer ┃
┃ ↑ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━ Extension-Unload ━━━━┛Modules§
- as3
- Namespace for ActionScript 3 classes and objects.
- c
fre-sys- context
- Core implementation of the extension abstraction.
- data
- This module provides safe conversions between concrete typed instances and raw pointers for native data.
- error
- event
- Asynchronous event dispatching utilities for cross-thread scenarios, providing a safe interface for interacting with the Flash Runtime.
- function
- misc
- prelude
- types
- Abstractions over AS3 objects for integration with its type system.
- utils
- validated
- Validated types for safe interaction with the C API and the Flash Runtime, ensuring data passed across the FFI boundary is well-formed and valid.
Macros§
- class
- Defines a new AS3 class.
- extension
- Generates and links the required Flash Runtime Extension entry points and lifecycle hooks, bridging the C ABI with safe Rust abstractions.
- function
- Defines a function intended for context registration by generating its ABI-compatible wrapper and binding it to a Rust implementation.
- ucstringify
- Interprets the input tokens as a string literal and yields a const
UCStr.