// Contains the work-doing code for the C API interface, which should be exported to the C API shim in the header "capi-bridge.h" #include #include #include "capi-bridge.h" extern "C" { _export(internal) rng_t* RNG_IMPL(mkdriver)(rng_kind kind, u64* restrict seed) { switch(kind) { case RNG_KIND_CRAND: return new rng::crand(seed[0]); default: return NULL; } } }