Guide

Building and linking

From the repository root:

cargo xtask capi

This leaves everything in target/capi/:

File For
ayatsuri.h the header
libayatsuri_capi.so, .dylib, ayatsuri_capi.dll loading as a plugin
libayatsuri_capi.a, ayatsuri_capi.lib compiling into your program
LICENSE Apache-2.0
# shared
cc host.c -I. -L. -layatsuri_capi
# static, with unused code removed by your linker
cc host.c -I. libayatsuri_capi.a -Wl,--gc-sections -lpthread -ldl -lm
#   macOS: -Wl,-dead_strip -framework CoreFoundation    MSVC: /OPT:REF

The library is built with full link-time optimisation and stripped symbols: only the ay2d_ functions are visible, and with the static library your linker drops every one you never call. examples/host.c is a complete program that drives every call; it is also the check CI runs.