Any C library is one declaration away
Velt talks to C directly now. Declare a function from any library with a C header and call it: databases, compression, image and audio codecs, system APIs. No wrapper language, no build script, no Rust toolchain. velt/ffi covers pointers, buffers, C strings and out-parameters, and C structs and constants work too.
Every call is checked against the library’s real C headers, and bundled C sources build with a pinned compiler on every platform. You stay in control: a dependency with native code only builds if your package.velt lists it in allowNative, and velt check lists every unsafe place for review.
declare c("c") function llabs(x: i64): i64; export function absolute(x: i64): i64 { // SAFETY: `llabs` takes any `long long` but LLONG_MIN. return unsafe { llabs(x) }; }
declare c, compiled from the bundled SQLite 3.53.2. No Rust crate any more.cloudflare24 host functionsThe same idea for JavaScript hosts: declare host binds R2, D1, KV, the cache and Durable Objects on Workers.redisNo native codeWritten in plain Velt, so it needs no allowNative entry at all.