esbuild-rs

Crates.ioesbuild-rs
lib.rsesbuild-rs
version0.13.8
sourcesrc
created_at2020-07-10 12:17:55.600185
updated_at2021-10-23 05:45:52.606973
descriptionRust wrapper for esbuild, an extremely fast JS minifier written in Go
homepagehttps://github.com/wilsonzlin/esbuild-rs
repositoryhttps://github.com/wilsonzlin/esbuild-rs.git
max_upload_size
id263613
size2,479,242
Wilson Lin (wilsonzlin)

documentation

README

esbuild-rs

Rust wrapper for esbuild using FFI and Cgo. esbuild is an extremely fast JavaScript minifier written in Go.

Using

This library requires Go 1.13 or higher. The Go source is included and compiled at build time. The build will not interfere with or create files in GOROOT or GOPATH, or download any Go dependencies.

Check the docs for the API.

Async

A fork of esbuild is used to allow taking advantage of the Go scheduler for optimal concurrency. Friendly functions that use Futures are available, which are suitable for most cases; for advanced usage, direct functions that take a callback and return immediately are also available, requiring additional concurrency management on top.

Windows

Since Cgo uses GCC, a GCC compiler is required to compile the Go library, even if the MSVC Rust toolchain is used. TDM-GCC is recommended.

If the msvc toolchain is used, this library will compile a DLL, embed it into the resulting Rust binary, and load it at runtime from memory using MemoryModule. This happens transparently at build time and run time, and requires no extra effort.

Commit count: 113

cargo fmt