# trunk-rs/trunk

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/trunk-rs-trunk).**

4,170 stars · 309 forks · Rust · apache-2.0

## Links

- GitHub: https://github.com/trunk-rs/trunk
- Homepage: https://trunk-rs.github.io/trunk/
- awesome-repositories: https://awesome-repositories.com/repository/trunk-rs-trunk.md

## Topics

`assets` `build-tool` `bundler` `compiler` `html` `rust` `sass` `scss` `wasm` `wasm-bindgen`

## Description

Trunk is a WebAssembly build tool and orchestrator designed to automate the process of transforming Rust source code into deployable web applications. It serves as a frontend bundler that packages WebAssembly binaries along with HTML and static assets for browser deployment.

The system utilizes an HTML-driven build orchestration model, using the index HTML file as the primary configuration source to determine entry points and dependencies. It integrates with the Rust compiler and associated toolchains to transform code into optimized binaries and glue code.

The tool provides a development environment featuring a local HTTP server with hot-reloading file watching and a static asset pipeline. It also handles content-hash asset versioning to ensure browsers load updated versions of static files.

## Tags

### Development Tools & Productivity

- [WebAssembly Workflow Orchestrators](https://awesome-repositories.com/f/development-tools-productivity/webassembly-workflow-orchestrators.md) — Automates the end-to-end build process for Rust-based web applications from source to static site.
- [HTML Configuration Entry Points](https://awesome-repositories.com/f/development-tools-productivity/configuration-driven-orchestrators/html-configuration-entry-points.md) — Uses the index HTML file as the central configuration source to determine entry points and asset dependencies.
- [Static Asset Pipelines](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/asset-file-management/asset-processing-pipelines/asset-transformation-pipelines/static-asset-pipelines.md) — Features an automated pipeline for copying and organizing static assets into the distribution folder.
- [Hot-Reloading Servers](https://awesome-repositories.com/f/development-tools-productivity/hot-reloading-servers.md) — Provides a development server that automatically refreshes the browser upon source code changes.
- [Local Development Servers](https://awesome-repositories.com/f/development-tools-productivity/local-development-servers.md) — Ships a local HTTP server for real-time preview and testing of WebAssembly applications.

### Part of an Awesome List

- [WebAssembly Build Systems](https://awesome-repositories.com/f/awesome-lists/devtools/webassembly-build-systems.md) — Provides a complete build system for bundling WebAssembly binaries and assets using an HTML entry point.

### Programming Languages & Runtimes

- [Wasm Toolchain Coordinators](https://awesome-repositories.com/f/programming-languages-runtimes/webassembly-glue-code-generators/wasm-toolchain-coordinators.md) — Coordinates the Rust compiler and wasm-bindgen to transform source code into optimized binaries and glue code.

### Web Development

- [Asset Bundlers](https://awesome-repositories.com/f/web-development/asset-bundlers.md) — Packages WebAssembly modules, styles, and assets into browser-ready files.
- [Rust Frontend Frameworks](https://awesome-repositories.com/f/web-development/rust-frontend-frameworks.md) — Enables the creation of interactive web user interfaces using Rust for improved performance and type safety.
- [WebAssembly Compilation](https://awesome-repositories.com/f/web-development/webassembly-compilation.md) — Compiles Rust code into WebAssembly binaries and packages them for browser execution. ([source](https://trunk-rs.github.io/trunk/guide))
- [Asset Versioning](https://awesome-repositories.com/f/web-development/asset-versioning.md) — Implements content-hashing for static assets to ensure efficient browser cache invalidation.
- [Static Asset Management](https://awesome-repositories.com/f/web-development/static-asset-management.md) — Manages the organization and referencing of styles and static files alongside Wasm binaries.

### Software Engineering & Architecture

- [Single Page Applications](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/application-architecture-patterns/single-page-applications.md) — Supports the development and bundling of single-page applications using WebAssembly as the logic engine.
