Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MercuryWorkshop/epoxy-tls/llms.txt
Use this file to discover all available pages before exploring further.
@mercuryworkshop/epoxy-tls is available on npm and ships five package exports covering two build variants (full and minimal) in both bundled and non-bundled forms. Choose the variant that best fits your bundle size constraints and asset-serving setup, then follow the build-from-source instructions if you need to compile the WASM yourself.
Install via package manager
Package exports
The package exposes five named exports. Each export path resolves to a different combination of build variant and WASM delivery method.| Export path | Build | WASM delivery |
|---|---|---|
. / ./epoxy-bundled | Full | Bundled as base64 |
./epoxy | Full | Separate .wasm file |
./minimal-epoxy-bundled | Minimal | Bundled as base64 |
./minimal-epoxy | Minimal | Separate .wasm file |
. and ./epoxy-bundled — full build, WASM bundled (default)
"browser", "module", and "main" in package.json). Use it when you want the simplest setup and don’t mind the extra base64 overhead in your JS bundle.
./epoxy — full build, WASM loaded separately
./minimal-epoxy-bundled — minimal build, WASM bundled
./minimal-epoxy — minimal build, WASM loaded separately
Bundle variants
The package ships in two build variants that differ in which Epoxy features are included. Full build (./epoxy, ./epoxy-bundled, .)
Includes all features: HTTP/1 and HTTP/2 fetch with gzip and Brotli decompression, WebSocket connections via connect_websocket, and raw TLS/TCP/UDP streams.
Minimal build (./minimal-epoxy, ./minimal-epoxy-bundled)
Includes HTTP/1 fetch and raw TLS/TCP/UDP streams only. EpoxyHandlers and connect_websocket are not available. Produces a significantly smaller WASM binary.
For a detailed feature-by-feature comparison, see the Bundle variants page.
Building from source
If you want to compile the WASM binary yourself — for example, to apply custom patches or to use the latest unreleased code — you can build the client from the repository.Prerequisites
The build requires Rust nightly with the
wasm32-unknown-unknown target and the rust-std component. Install Rust via rustup and then run:wasm-bindgen— install via Cargo:cargo install wasm-bindgen-cliwasm-opt— get the binary from WebAssembly/binaryen releasesjq— install from your distribution’s package repositorygit— install from your distribution’s package repository
Run the build
From theclient/ directory of the cloned repository, run:
pkg/ directory. You can then import directly from pkg/ during local development or publish the contents of pkg/ to npm.