From: Jakub Jirutka Date: Sun, 30 May 2021 16:19:35 +0200 Subject: [PATCH] Build syntect with onig instead of fancy-regex Replace pure Rust fancy-regex with onig linked against system-provided oniguruma library. From the syntect's Readme (https://github.com/trishume/syntect): > The advantage of fancy-regex is that it does not require the onig crate > which requires building and linking the Oniguruma C library. Many users > experience difficulty building the onig crate, especially on Windows > and Webassembly. > As far as our tests can tell this new engine is just as correct, but it > hasn't been tested as extensively in production. It also currently seems > to be about half the speed of the default Oniguruma engine Oniguruma engine is faster than the fancy-regex engine and the syntect project chose the latter as the default only to avoid difficulties with linking Oniguruma (C library) on some platforms. That's not our case. Moreover, gitui built with Oniguruma instead of fancy-regex is smaller (2.9 MiB x 3.8 MiB). libonig.so is 0.5 MiB, so we saved 0.4 MiB or 0.9 MiB, if libonig.so is already installed for some other package. --- a/Cargo.toml +++ b/Cargo.toml @@ -47,1 +47,1 @@ -syntect = { version = "4.6", default-features = false, features = ["metadata", "default-fancy"] } +syntect = { version = "4.6", default-features = false, features = ["metadata", "default-onig"] }