crossbind
GitHub

A Conan package

ConanCenter's C and C++ libraries are a line of config away: conan:zlib/zlib.h is zlib's header from its Conan package.

crossbind.config.js names the package and its version, and crossbind has Conan build it for the platform. main.js imports from the header with conan: before the package's name, and the functions it names are bound.

That suits a package with a C API. A C++ library that is all templates binds nothing by itself: include it from your own C++, as A library in your C++ does. ConanCenter covers both.

Try it
Ask compressBound about 10 bytes and about a million, and see how little the overhead grows.
Open in playground
Runs without a compile until the C++, Rust, packages or imports change.
Press Run, or Ctrl+Enter, to run main.js.
Type to search every guide page and section.
↑↓ navigate↵ openesc close