Skip to main content

Crate merman_ffi

Crate merman_ffi 

Source
Expand description

C ABI exports for embedding merman in non-Rust hosts.

This crate is the only place where the public FFI boundary owns unsafe code. The core parser/render crates and shared binding facade remain safe Rust APIs.

Structs§

MermanBuffer
MermanEngine
MermanEngineResult
MermanHostTextMeasureRequest
MermanHostTextMeasureResult
MermanResult

Constants§

MERMAN_ABI_VERSION
MERMAN_TEXT_DIRECTION_AUTO
MERMAN_TEXT_DIRECTION_LTR
MERMAN_TEXT_DIRECTION_RTL
MERMAN_TEXT_WHITE_SPACE_BREAK_SPACES
MERMAN_TEXT_WHITE_SPACE_NORMAL
MERMAN_TEXT_WHITE_SPACE_NOWRAP
MERMAN_TEXT_WHITE_SPACE_PRE_WRAP
MERMAN_WRAP_MODE_HTML_LIKE
MERMAN_WRAP_MODE_SVG_LIKE
MERMAN_WRAP_MODE_SVG_LIKE_SINGLE_RUN

Functions§

merman_abi_version
Return the C ABI protocol version implemented by this library.
merman_analyze_document_facts_json
Analyze a host document to syntax/facts JSON bytes.
merman_analyze_document_json
Analyze a host document to diagnostics JSON bytes.
merman_analyze_json
Analyze Mermaid source to diagnostics JSON bytes.
merman_ascii_capabilities_json
Return ASCII rendering capability metadata as a JSON array.
merman_buffer_free
Free a buffer returned by this crate.
merman_buffer_struct_size
Return the Rust-side size of MermanBuffer.
merman_diagram_family_capabilities_json
Return diagram family parser/render capability metadata as a JSON array.
merman_engine_analyze_document_facts_json
Analyze a host document to syntax/facts JSON bytes using a reusable engine.
merman_engine_analyze_document_json
Analyze a host document to diagnostics JSON bytes using a reusable engine.
merman_engine_analyze_json
Analyze Mermaid source to diagnostics JSON bytes using a reusable engine.
merman_engine_free
Free an engine returned by merman_engine_new.
merman_engine_layout_json
Layout Mermaid source to layout JSON bytes using a reusable engine.
merman_engine_new
Create a reusable engine for repeated calls with the same options.
merman_engine_parse_json
Parse Mermaid source to semantic JSON bytes using a reusable engine.
merman_engine_render_ascii
Render Mermaid source to Unicode ASCII-art text using a reusable engine.
merman_engine_render_svg
Render Mermaid source to SVG bytes using a reusable engine.
merman_engine_result_struct_size
Return the Rust-side size of MermanEngineResult.
merman_engine_set_text_measure_callback
Install a host-provided text measurer on a reusable engine.
merman_engine_validate_json
Validate Mermaid source using a reusable engine.
merman_host_text_measure_request_struct_size
Return the Rust-side size of MermanHostTextMeasureRequest.
merman_host_text_measure_result_struct_size
Return the Rust-side size of MermanHostTextMeasureResult.
merman_layout_json
Layout Mermaid source to layout JSON bytes.
merman_lint_rule_catalog_json
Return lint rule catalog metadata as a versioned JSON response object.
merman_package_version
Return the merman-ffi crate package version as a static C string.
merman_parse_json
Parse Mermaid source to semantic JSON bytes.
merman_render_ascii
Render Mermaid source to Unicode ASCII-art text.
merman_render_svg
Render Mermaid source to SVG bytes.
merman_result_struct_size
Return the Rust-side size of MermanResult.
merman_supported_diagrams_json
Return supported diagram type metadata as a JSON string array.
merman_supported_host_theme_presets_json
Return supported host/editor theme preset metadata as a JSON string array.
merman_supported_themes_json
Return supported theme metadata as a JSON string array.
merman_validate_json
Validate Mermaid source and return a JSON validation payload.

Type Aliases§

MermanHostTextMeasureCallback