18 releases (11 breaking)
Uses old Rust 2015
0.13.2 | Aug 15, 2018 |
---|---|
0.13.0 | Jul 24, 2018 |
0.3.0 | Mar 26, 2018 |
#2940 in Parser implementations
Used in nginx-config-mod
125KB
3.5K
SLoC
Nginx Config Parser (unofficial)
Documentation | Github | Crate
A parser, formatter and AST for nginx configs.
The goal is to:
- Validate nginx config, including custom rules
- Validate partial configs like location or server directive
- Extract facts from nginx config, like domains served or upstream list
- Support simple config rewritings like replace variable with actual value
- Generate nginx configs
We're starting with small subset of the nginx directives. And we're unlikely be supporting all of the config in the nearest future. But PR's on additional directives are accepted.
Non-goals:
- Being replacement for
nginx -t
License
Licensed under either of
- Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~1MB
~23K SLoC