alef 0.110.4

Opinionated polyglot binding generator for Rust libraries
Documentation
//! Shared trait bridge code generation.
//!
//! Generates wrapper structs that allow foreign language objects (Python, JS, etc.)
//! to implement Rust traits via FFI. Each backend implements [`TraitBridgeGenerator`]
//! to provide language-specific dispatch logic; the shared functions in this module
//! handle the structural boilerplate.

mod carrier_prune;
mod delegates;
mod formatting;
mod generator;
mod lookup;
mod registration;
mod spec;
mod trait_impl;
mod wrapper;

pub use carrier_prune::{language_surface, prune_inactive_bridge_carriers, validated_language_surface};
pub use delegates::{default_delegate_name, forwarded_defaulted_methods, gen_bridge_default_delegates};
pub use formatting::{
    TraitMethodSig, bridge_param_type, format_param_type, format_param_type_with_lifetimes, format_return_type,
    format_type_ref, prim, to_camel_case, trait_method_signature, visitor_param_type,
};
pub use generator::{BridgeOutput, TraitBridgeGenerator, gen_bridge_all};
pub use lookup::{
    BridgeFieldMatch, OptionsFieldBridgeSite, active_bridge_trait_def, bridge_covers_function, bridge_handle_path,
    bridge_register_symbol, bridge_targets_language, bridge_wrapper_name, find_bridge_field, find_bridge_param,
    find_trait_def, forwardable_defaulted_method_names, is_bridge_handle_type_ref, is_native_marshalled_struct,
    is_trait_bridge_managed_fn, method_signature_references_trait, native_marshalled_opaque_params,
    native_marshalled_struct_params, native_marshalled_struct_returns, options_field_bridge_site,
    options_field_bridge_sites, type_references_trait,
};
pub(crate) use registration::host_function_path_for_config;
pub use registration::{
    gen_bridge_clear_fn, gen_bridge_registration_fn, gen_bridge_unregistration_fn, host_function_path,
};
pub use spec::{TraitBridgeSpec, own_vtable_methods, trait_snake_of, visitor_callback_methods, vtable_slot_names};
pub use trait_impl::gen_bridge_trait_impl;
pub use wrapper::{gen_bridge_debug_impl, gen_bridge_plugin_impl, gen_bridge_wrapper_struct, plugin_lifecycle_methods};

#[cfg(test)]
mod tests;