Skip to main content

Module direct_model

Module direct_model 

Source
Expand description

Shared Direct-First Hybrid FFI lowering model used across all 7 target emitters (Rust, C11, C++20, Swift 6, Kotlin/JNI, TypeScript/WASM, and Dart) so every language agrees on C ABI signatures, enum widths, NvBytesSink / NvAsyncBytesDone calling conventions, and zero-waste wire payload shapes.

Structs§

DirectReturnSpec
Complete lowered return contract for a Direct-First method.

Enums§

DirectErrKind
Error channel of a Direct-First method return.
DirectOkKind
Ok payload shape of a Direct-First method return.
DirectParamKind
How one method parameter crosses a Direct-First C ABI boundary.
WirePayloadShape
Zero-waste wire payload encoding strategy for ByteTransport requests, replies, and push events.

Functions§

camel_enum_wire_write_method
Canonical camelCase WireWriter method name for an enum’s underlying integer repr.
camel_wire_write_method
Canonical camelCase WireWriter scalar/string/bytes method name shared across Dart, TypeScript, and Kotlin emitters (single source of truth).
classify_direct_param
Classifies a parameter type for Direct-First C ABI lowering.
classify_wire_params
Classifies a parameter list (request or event) into a zero-waste wire shape.
classify_wire_single
Classifies a single HybridType payload (reply or single-param request/event).
enum_repr
Looks up the effective integer repr string ("u8"/"u16"/"u32"/"i32") of enum name.
enum_repr_c_type
C11 integer typedef matching a HybridEnumSpec::repr_str().
enum_repr_dart_ann
Dart dart:ffi struct field annotation matching a HybridEnumSpec::repr_str().
enum_repr_dart_ffi_type
Dart dart:ffi native integer type matching a HybridEnumSpec::repr_str().
enum_repr_rust_type
Rust integer repr matching a HybridEnumSpec::repr_str().
enum_repr_swift_type
Swift integer raw type matching a HybridEnumSpec::repr_str().
fixed_wire_size
Positional nativeview-codec wire byte size if ty has a fixed, statically known encoded size.
is_direct_host
Returns true iff m is binding = "direct" and impl = "host".
is_direct_rust
Returns true iff m is binding = "direct" and impl = "rust".
mod_c_fn_name
mod_event_id_const
mod_host_ops_name
mod_method_id_const
mod_schema_hash_const
mod_service_id_const
mod_upper
spec_has_direct_modules
Returns true iff any module in spec uses binding = "direct".
spec_uses_legacy_hybrid_runtime
Returns true iff any module uses binding = "vtable", any view is present (views use nativeview_abi::hybrid props/events), or any signature references HybridType::Value.
wire_min_bytes
Conservative minimum encoded byte size of ty on the positional nativeview-codec wire (used across Rust and foreign hosts to bound Vec<T> pre-allocation against DoS).