Most of the code is here. It needs some linker config but basically you wrap symbols which depend on too new versions of glibc and dynamically load them or call some other implementation internally
https://github.com/oven-sh/bun/blob/main/src/bun.js/bindings...