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§
- _internal
- Internal implementation details of the crate. Not intended for public use.
- as3
- 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
- Miscellaneous items that do not yet have a clear module placement. Their current structure is not ideal and may be refactored as the crate evolves or as the underlying ANE C API improves.
- prelude
- types
- Abstractions over ActionScript 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.