Add human-readable size parsing and CLI/env configuration for cache settings (v0.2.0)#12
Merged
GrassBlock1 merged 8 commits intomasterfrom Feb 10, 2026
Merged
Conversation
…size Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
…he settings Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add size recognition and configurability for settings
Add human-readable size parsing and CLI/env configuration for cache settings (v0.2.0)
Feb 10, 2026
GrassBlock1
approved these changes
Feb 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Extends Akkoproxy’s configuration system to accept human-readable byte sizes for cache limits and adds CLI/environment-variable overrides for cache-related settings, alongside a version bump to v0.2.0.
Changes:
- Add
bytesize-backed parsing somax_item_sizeanddisk_cache_max_sizecan be configured as either raw bytes or human-readable strings. - Add CLI flags and environment variables to override
forward_headers_enabledand disk cache settings with defined precedence. - Bump crate version to
0.2.0and document changes in the changelog and example config.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Adds CLI flags, env var overrides, and size parsing helper for disk cache max size. |
| src/config.rs | Adds custom serde deserializer to accept numeric or human-readable size strings; adds tests for parsing. |
| config.example.toml | Updates examples/comments to show human-readable cache size formats. |
| Cargo.toml | Bumps version and adds bytesize dependency. |
| Cargo.lock | Updates lockfile for v0.2.0 and adds bytesize. |
| CHANGELOG.md | Adds v0.2.0 release notes and updates comparison links. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends configuration system to support human-readable byte sizes and adds CLI/environment variable overrides for cache-related settings.
Changes
Human-readable size formats
max_item_sizeanddisk_cache_max_sizenow accept "10M", "1G", "10MiB", "1GiB" etc. alongside numeric bytesbytesizecrate for parsing (supports both decimal MB/GB and binary MiB/GiB units)CLI options
--forward-headers/--no-forward-headers--disk-cache/--no-disk-cache--disk-cache-path <PATH>--disk-cache-max-size <SIZE>(accepts human-readable formats)Environment variables
FORWARD_HEADERS_ENABLED(boolean)DISK_CACHE_ENABLED(boolean)DISK_CACHE_PATH(string)DISK_CACHE_MAX_SIZE(supports human-readable formats)Configuration precedence remains:
env vars > CLI options > config fileVersion
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.