# rakyll/statik

**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/rakyll-statik).**

3,828 stars · 228 forks · Go · Apache-2.0

## Links

- GitHub: https://github.com/rakyll/statik
- awesome-repositories: https://awesome-repositories.com/repository/rakyll-statik.md

## Topics

`files` `go` `golang` `http` `http-server` `static`

## Description

Statik is a build tool for the Go language that transforms directory structures and files into byte arrays within source code. This process enables the creation of single-binary distributions by embedding static assets directly into the compiled executable.

The tool ensures deterministic builds by stripping file modification timestamps, resulting in consistent binary outputs across different environments. It also includes a build-time asset filter to limit the inclusion of specific file extensions and minimize the final executable size.

To access these embedded assets, the project provides a virtual file system interface that maps binary data to a standard file system API. This allows applications to interact with embedded resources as if they were stored on a physical disk.

## Tags

### Development Tools & Productivity

- [Static Asset Embedding](https://awesome-repositories.com/f/development-tools-productivity/static-binaries/static-binary-compilers/static-asset-embedding.md) — Ships a CLI utility that transforms directory structures and files into embedded Go source code. ([source](https://cdn.jsdelivr.net/gh/rakyll/statik@master/README.md))
- [Virtual File System Generators](https://awesome-repositories.com/f/development-tools-productivity/build-time-asset-processing/virtual-file-system-generators.md) — Generates a virtual file system interface from static directory structures during the Go compilation process.
- [Single-Binary Distributions](https://awesome-repositories.com/f/development-tools-productivity/single-binary-distributions.md) — Bundles all required static assets into a single executable to eliminate external file dependencies.
- [Virtual File Systems](https://awesome-repositories.com/f/development-tools-productivity/virtual-file-systems.md) — Provides a virtual file system interface that maps embedded byte arrays to a standard file system API.
- [Asset Filtering Rules](https://awesome-repositories.com/f/development-tools-productivity/asset-filtering-rules.md) — Provides rules to exclude specific files or directories based on extensions before they are embedded.
- [Deterministic Timestamp Stripping](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/debugging-diagnostics/debugging-inspection-tools/debugging-and-inspection-tools/runtime-debugging/debug-symbol-stripping/binary-metadata-stripping/deterministic-timestamp-stripping.md) — Removes file modification timestamps during the build process to ensure bit-for-bit identical binary outputs.
- [Extension Filtering](https://awesome-repositories.com/f/development-tools-productivity/static-binaries/static-binary-compilers/static-asset-embedding/extension-filtering.md) — Limits the inclusion of assets to specific file extensions to minimize the resulting binary size. ([source](https://cdn.jsdelivr.net/gh/rakyll/statik@master/README.md))

### DevOps & Infrastructure

- [Binary Asset Embedders](https://awesome-repositories.com/f/devops-infrastructure/distribution-packaging/software-distribution/compiled-binaries/binary-asset-embedders.md) — Transforms directory structures and files into byte arrays within Go source code for single-binary distribution.

### Programming Languages & Runtimes

- [Byte Array Converters](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/source-code-templates/source-code-transformation-engines/go-source-to-source-transformers/byte-array-converters.md) — Converts static files into Go source code byte slices to enable embedding within the compiled binary.
- [Build Size Optimizers](https://awesome-repositories.com/f/programming-languages-runtimes/go-performance-optimization/build-size-optimizers.md) — Optimizes Go binary size by filtering specific files and removing timestamps during the build process.

### Data & Databases

- [Build Resource Filtering](https://awesome-repositories.com/f/data-databases/asset-filtering/asset-discovery-filters/project-resource-filtering/build-resource-filtering.md) — Includes only specific file extensions in the final binary to minimize the resulting executable size.

### Part of an Awesome List

- [Embedded Resources](https://awesome-repositories.com/f/awesome-lists/devtools/embedded-resources.md) — Embeds static files into Go executables.
- [Resource Embedding](https://awesome-repositories.com/f/awesome-lists/devtools/resource-embedding.md) — Embed static files into Go executables.
- [Static Asset Embedding](https://awesome-repositories.com/f/awesome-lists/devtools/static-asset-embedding.md) — Embeds static files into Go programs.
