Skip to main content

Module ffi

Module ffi 

Source
Expand description

Raw FFI declarations matching the Swift @_cdecl exports in swift-bridge/Sources/FoundationModelsBridge.

These are intentionally opaque (*mut c_void) and unsafe; safe wrappers live in the parent modules.

Modules§

status
Status codes mirrored 1:1 from the FM_* constants in Swift.

Structs§

FFIGenerationOptions
Plain-old-data carrier for crate::generation::GenerationOptions.

Functions§

fm_adapter_compatibility_async
Async version of Adapter.compatibleAdapterIdentifiers(name:).
fm_adapter_compatible_identifiers_json
fm_adapter_compile
fm_adapter_create_from_file
fm_adapter_create_from_name
fm_adapter_create_from_name_async
Async version of Adapter(name:).
fm_adapter_metadata_json
fm_adapter_remove_obsolete
fm_bytes_free
fm_decimal_from_generated_content_json
fm_decimal_to_generated_content_json
fm_generation_id_create
fm_generation_schema_compile_json
fm_generation_schema_create_typed_json
fm_generation_schema_validate_json
fm_object_release
fm_refusal_explanation_from_transcript_json
fm_refusal_explanation_json
fm_refusal_explanation_stream
fm_refusal_explanation_stream_from_transcript_json
fm_session_create
fm_session_create_ex
fm_session_is_responding
fm_session_log_feedback
fm_session_log_feedback_attachment_json
fm_session_prewarm
fm_session_prewarm_prompt_json
fm_session_respond
fm_session_respond_request_json
fm_session_respond_with_schema
fm_session_stream_request_json
fm_session_stream_response
fm_session_transcript_json
fm_string_dup
fm_string_free
fm_system_model_availability_code
fm_system_model_availability_code_for
fm_system_model_create
fm_system_model_create_default
fm_system_model_create_with_adapter
fm_system_model_is_available
fm_system_model_supported_languages_json
fm_system_model_supports_locale
fm_system_model_token_count_prompt_async

Type Aliases§

FmAsyncCallback
3-argument async callback used by the async_api thunks in Async.swift.
FmRespondCallback
FmStreamCallback
FmToolCallback