daegun

Installing for C

The ABI is behind the capi feature. Ask for the shape you want:

cargo rustc --release --features capi --crate-type staticlib  # libdaegun.a, daegun.lib
cargo rustc --release --features capi --crate-type cdylib     # libdaegun.dylib, .so, .dll

Then compile against src/c-wrapper/daegun.h. A static library needs the platform frameworks the GPU backends call into, and a shared one carries its own:

PlatformLink line
macOS, iOScc app.c libdaegun.a -framework Metal -framework Foundation -framework QuartzCore
Linuxcc app.c libdaegun.a -lm -lpthread -ldl
Windowscl app.c daegun.lib ws2_32.lib userenv.lib ntdll.lib

Vulkan and Direct3D are opened by name at run time, so neither adds anything to link. A machine without them answers DAEGUN_UNSUPPORTED rather than failing to load.

Type to search.