-
Notifications
You must be signed in to change notification settings - Fork 0
C FFI
Leonard Ramminger edited this page Aug 31, 2026
·
1 revision
The ffi feature exposes a C ABI documented in ycallr.h (generated by cbindgen in CI).
cargo build --features ffiRegenerate the header:
cargo build --features ffi
cbindgen --crate ycallr-core -l c -o ycallr.h| Symbol | Purpose |
|---|---|
ycallr_parse_yaml |
Parse YAML at compile or debug time |
ycallr_install_yaml_file |
Install profile from YAML path |
ycallr_load_installed |
Load installed .pb by name |
ycallr_parse_proto |
Load from protobuf bytes |
ycallr_client_new |
Create HTTP client |
ycallr_call |
Execute command |
ycallr_set_base_url |
Override base URL at runtime |
ycallr_get_last_error |
Thread-local error string |
Functions return null or negative codes on failure. Read ycallr_get_last_error() for details.
Strings returned by the API must be freed with ycallr_string_free when documented as owned.
c_string_to_str(ptr) decodes NUL-terminated FFI return pointers into Option<String> without exposing raw pointer rules to callers.
- ycallr-cli (thin FFI frontend)
- C, Go, Python, or other languages via the same header
The CLI does not call YcallrClient directly; it only uses symbols from ycallr.h.
Overview
Profiles
Integration
Project