6 releases (stable)

1.1.1 Aug 29, 2024
1.1.0 Mar 26, 2024
1.0.2 Mar 23, 2023
1.0.1 Jun 24, 2022
1.0.0-rc.1 Mar 7, 2022

#39 in Configuration

Download history 1069/week @ 2024-08-16 752/week @ 2024-08-23 837/week @ 2024-08-30 869/week @ 2024-09-06 736/week @ 2024-09-13 1060/week @ 2024-09-20 1115/week @ 2024-09-27 954/week @ 2024-10-04 1187/week @ 2024-10-11 2592/week @ 2024-10-18 3315/week @ 2024-10-25 3195/week @ 2024-11-01 2874/week @ 2024-11-08 4224/week @ 2024-11-15 3502/week @ 2024-11-22 3257/week @ 2024-11-29

14,286 downloads per month
Used in 2 crates

Apache-2.0

81KB
2K SLoC

ec4rs: EditorConfig For Rust

CI crates.io API docs

An EditorConfig core in safe Rust.

This library enables you to integrate EditorConfig support into any tools which may benefit from it, such as code editors, formatters, and style linters. It includes mechanisms for type-safe parsing of properties, so that your tool doesn't have to do it itself. It also exposes significant portions of its logic, allowing you to use only the parts you need.

Name idea shamelessly stolen from ec4j. This library has minimal dependencies (only std at this time).

For example usage, see the docs.

Testing

The main repository for this library includes the EditorConfig core tests as a Git submodule. This library should pass all of these tests. To run the test suite, run the following commands in a POSIX-like shell:

cargo build --package ec4rs_tools
git submodule update --init --recursive
cd tests
cmake -DEDITORCONFIG_CMD="$PWD/../target/debug/ec4rs-parse" .
ctest .

License

ec4rs is licensed under the Apache License 2.0 with no NOTICE text.

Contributors submitting code changes must agree to the terms of the Developer Certificate of Origin (DCO) to have their contributions accepted for inclusion. A copy of the DCO may be found in DCO.txt. Contributors should sign-off on their commits (see git commit -s) to indicate explicit agreement.

Dependencies

~125KB