Expand description
§styx-ffi
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:
…along with corporate sponsors:
…without whom this work could not exist.
§License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option. C bindings for the Styx configuration language parser.
This crate provides a C-compatible API for parsing Styx documents.
Structs§
- Styx
Document - Opaque handle to a parsed Styx document.
- Styx
Object - Opaque handle to a Styx object.
- Styx
Parse Result - Result of a parse operation.
- Styx
Sequence - Opaque handle to a Styx sequence.
- Styx
Value - Opaque handle to a Styx value.
Enums§
- Styx
Payload Kind - 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).