Keep configuration flags, feature toggles, and build settings concise and well-organized. Use simpler names where appropriate and consolidate related flags when possible to improve readability and maintainability.
Keep configuration flags, feature toggles, and build settings concise and well-organized. Use simpler names where appropriate and consolidate related flags when possible to improve readability and maintainability.
When defining new configuration flags:
Example of simplifying multiple flags:
# Before: Multiple separate flags
- RUSTFLAGS: -Dwarnings --check-cfg=cfg(loom) --check-cfg=cfg(tokio_unstable) --check-cfg=cfg(tokio_taskdump) --check-cfg=cfg(fuzzing)
# After: Consolidated flags
+ RUSTFLAGS: -Dwarnings --check-cfg=cfg(loom, tokio_unstable, tokio_taskdump, fuzzing)
For feature flags and conditional compilation:
# Before: Verbose, redundant naming
- --cfg tokio_unstable_uring
# After: Simplified naming
+ --cfg tokio_uring
This approach makes configuration more maintainable, reduces verbosity, and improves readability, especially as the number of configuration options grows over time.
Enter the URL of a public GitHub repository