XAMPPRocky / fluent-templates

Easily add Fluent to your Rust project.
Apache License 2.0
136 stars 28 forks source link

Add ignore as optional feature #48

Closed goweiwen closed 1 year ago

goweiwen commented 1 year ago

The ignore crate pulls in regex, which adds to the binary size quite significantly. If we do not need the .ignore features, we can opt out of it and drop the dependency.

This PR locks the ignore crate behind a use-ignore default feature, and adds a walkdir optional feature. When walkdir is enabled, we use the walkdir crate to traverse the directory instead. This does not respect .ignore files.

If neither use-ignore nor walkdir features are enabled, a compile-time error is raised.

XAMPPRocky commented 1 year ago

Thank you for your PR, and congrats on your first contribution! 🎉