Table of Contents generated with DocToc
This directory contains automatically generated C header files for the Synta FFI.
The main C header file, generated from Rust FFI code using cbindgen.
Warning: Do not modify this file manually. It is automatically regenerated when building the synta-ffi crate.
To regenerate:
cargo build --release -p synta-ffiInclude the header in your C code:
#include <synta.h>
// Example: Decode an integer
const uint8_t data[] = {0x02, 0x01, 0x2A}; // INTEGER 42
SyntaDecoder* decoder = synta_decoder_new(data, sizeof(data), SyntaEncoding_Der);
SyntaInteger* integer = NULL;
if (synta_decode_integer(decoder, &integer) == SyntaErrorCode_Success) {
int64_t value;
if (synta_integer_to_i64(integer, &value) == SyntaErrorCode_Success) {
printf("Value: %lld\n", (long long)value);
}
synta_integer_free(integer);
}
synta_decoder_free(decoder);gcc myapp.c $(pkg-config --cflags --libs csynta) -o myappfind_package(Synta REQUIRED)
target_link_libraries(myapp Synta::Synta)gcc myapp.c -I/path/to/include -L/path/to/lib -lcsynta -o myappSee the following documents for more information:
- C API Reference - Complete API documentation
- Memory Management - Memory ownership and safety
- Migration from OpenSSL - Guide for OpenSSL users