1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

Add unicode feature to switch between regex and regex-lite crates as a trade-off between full unicode support and binary size (#3291)

* - Add `unicode` feature to switch between `regex` and `regex-lite`

as a trade-off between full unicode support and binary size.

* Update CHANGES.md

* Update CHANGES.md

* refactor: move regexset code selection to own module

* docs: add docs within RegexSet module

* chore: restore manifests

* test: ensure all actix-router codepaths are tested

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
LoveSy
2024-03-03 23:50:16 +08:00
committed by GitHub
parent 994ea45d91
commit c10f05a867
11 changed files with 112 additions and 20 deletions

View File

@ -17,12 +17,16 @@ name = "actix_router"
path = "src/lib.rs"
[features]
default = ["http"]
default = ["http", "unicode"]
http = ["dep:http"]
unicode = ["dep:regex"]
[dependencies]
bytestring = ">=0.1.5, <2"
cfg-if = "1"
http = { version = "0.2.7", optional = true }
regex = "1.5"
regex = { version = "1.5", optional = true }
regex-lite = "0.1"
serde = "1"
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
@ -35,6 +39,7 @@ percent-encoding = "2.1"
[[bench]]
name = "router"
harness = false
required-features = ["unicode"]
[[bench]]
name = "quoter"