esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

Embedding esbuild as a static C library

Open alshdavid opened this issue 2 months ago • 1 comments

Go projects can be compiled to static C libraries (.a .lib)

This would be fantastic as it would allow me to embed esbuild in my single binary Rust application.

alshdavid avatar Nov 06 '25 20:11 alshdavid

Language bindings other than JavaScript and Go are out of scope.

However, you're welcome to do this for yourself. That would presumably involve writing some Go FFI code that calls esbuild's Go API.

You may also find it easier to use an existing Rust library that does similar things to esbuild if you're already using Rust. There are already a few different ones available.

evanw avatar Nov 09 '25 01:11 evanw