The goal of this rewrite was not to mechanically translate the old iron code, but to replace it with an axum implementation while keeping the CLI and the main runtime behavior aligned as closely as practical, with a smaller direct dependency surface.
The default direct dependencies are:
axum 0.8.8clap 4.6.0tokio 1.50.0flate2 1.1.9mime_guess 2.0.5httpdate 1.0.3base64 0.22.1time 0.3.47
When the tls feature is enabled, it additionally pulls in:
openssl 0.10.76tokio-openssl 0.6.5
clap intentionally does not use derive, and TLS is intentionally behind a single tls feature that is disabled by default.
- The server now sits on a maintained async stack instead of the old
ironecosystem. - The direct dependency surface is smaller and easier to reason about.
- TLS uses
axum::servewith a custom listener instead of addingaxum-server. - The codebase is split into focused modules for config, server setup, handlers, and utilities.
- The default build does not carry OpenSSL or TLS glue code.
To keep the default build smaller, TLS is disabled unless tls is enabled.
Impact:
- Default builds are smaller and compile faster.
- TLS-capable builds depend on system OpenSSL compatibility.
--certstill uses PKCS#12, which keeps CLI behavior aligned but keeps TLS on the OpenSSL path.
Regular file responses and compressed file responses are streamed instead of buffering the entire file.
Impact:
- Memory usage is much lower for large files.
- Compressed responses still use a background thread per streamed file response.
Uploads are written to temporary files first, then moved into place after CSRF validation succeeds.
Impact:
- Large uploads do not need to sit fully in memory.
- Failed CSRF validation cleans up temporary files.
--base-url is normalized to start with /, and to end with / when it is not root.
Impact:
- Inputs like
prefix,/prefix, and/prefix/all normalize to/prefix/.
- Relative paths are resolved against the server root.
- Absolute paths are used as-is.
This is more explicit than the old behavior and matches the current help text.
The old middleware-based compression path had some inconsistent historical behavior for HEAD.
The current implementation does not preserve those quirks:
HEADdoes not read and compress the whole file just to compute a compressed length.- The result is cleaner HTTP behavior, but not byte-for-byte historical parity in that edge case.
- CLI flags and short options
- Directory listing
--index--upload/--csrf--auth--redirect--nocache--norange--cors--coop/--coep--compress--try-file--base-url--cert/--certpasswith PKCS#12
--openuseshttps://when TLS is enabled- Error pages escape injected text
--corsresponds toOPTIONSpreflight requests--upload-size-limitsupports human-readable values such as30K,50M, and1G, interpreted with powers of 1024
The current replacement is covered by black-box HTTP tests for:
- directory listing
try-file- basic auth
- range requests
- cache revalidation
- CORS preflight
- upload with CSRF
- gzip compression
Both default and tls builds pass cargo test and cargo clippy.