Crate styx_ffi

Crate styx_ffi 

Source
Expand description

§styx-ffi

crates.io documentation MIT/Apache-2.0 licensed

C FFI bindings for the Styx configuration language. Allows using Styx from C, C++, and other languages with C interop.

§Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

…along with corporate sponsors:

AWS Zed Depot

…without whom this work could not exist.

§License

Licensed under either of:

at your option. C bindings for the Styx configuration language parser.

This crate provides a C-compatible API for parsing Styx documents.

Structs§

StyxDocument
Opaque handle to a parsed Styx document.
StyxObject
Opaque handle to a Styx object.
StyxParseResult
Result of a parse operation.
StyxSequence
Opaque handle to a Styx sequence.
StyxValue
Opaque handle to a Styx value.

Enums§

StyxPayloadKind
Type of a Styx value’s payload.

Functions§

styx_document_get
Get a value by path from a document.
styx_document_root
Get the root object of a document.
styx_free_document
Free a parsed document.
styx_free_string
Free a string returned by the library.
styx_object_get
Get a value from an object by key.
styx_object_key_at
Get the key at a given index in an object.
styx_object_len
Get the number of entries in an object.
styx_object_value_at
Get the value at a given index in an object.
styx_parse
Parse a Styx document from a UTF-8 string.
styx_sequence_get
Get an item from a sequence by index.
styx_sequence_len
Get the number of items in a sequence.
styx_value_as_object
Get the object payload of a value (null if not an object).
styx_value_as_sequence
Get the sequence payload of a value (null if not a sequence).
styx_value_get
Get a nested value by path.
styx_value_is_unit
Check if a value is unit (no tag, no payload).
styx_value_payload_kind
Get the payload kind of a value.
styx_value_scalar
Get the scalar text of a value (null if not a scalar).
styx_value_tag
Get the tag name of a value (null if no tag).