From 443c32c93622764a89cd3f0682ef8b1c6a6723dc Mon Sep 17 00:00:00 2001 From: Dominik Nakamura Date: Mon, 15 Jan 2024 15:28:29 +0900 Subject: [PATCH] feat(parser): add `simd` feature to the parser The `winnow` crate has a `simd` feature which enables some extra performance improvements. This might limit possible target platforms for compilations so the flag is exposed as optional feature on the parser crate instead. All binary crates will use this flag, but potential users of the parser crate can omit the feature if it causes issues. --- crates/mabo-cli/Cargo.toml | 2 +- crates/mabo-go/Cargo.toml | 2 +- crates/mabo-lsp/Cargo.toml | 2 +- crates/mabo-parser/Cargo.toml | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/mabo-cli/Cargo.toml b/crates/mabo-cli/Cargo.toml index b0be118..19bffe7 100644 --- a/crates/mabo-cli/Cargo.toml +++ b/crates/mabo-cli/Cargo.toml @@ -19,7 +19,7 @@ clap.workspace = true glob.workspace = true mabo-compiler = { path = "../mabo-compiler" } mabo-doc = { path = "../mabo-doc" } -mabo-parser = { path = "../mabo-parser" } +mabo-parser = { path = "../mabo-parser", features = ["simd"] } mabo-project = { path = "../mabo-project" } miette = { workspace = true, features = ["fancy-no-backtrace"] } mimalloc.workspace = true diff --git a/crates/mabo-go/Cargo.toml b/crates/mabo-go/Cargo.toml index 0fe0aed..d78f8f5 100644 --- a/crates/mabo-go/Cargo.toml +++ b/crates/mabo-go/Cargo.toml @@ -14,7 +14,7 @@ anyhow.workspace = true clap.workspace = true heck = "0.4.1" mabo-compiler = { path = "../mabo-compiler" } -mabo-parser = { path = "../mabo-parser" } +mabo-parser = { path = "../mabo-parser", features = ["simd"] } mabo-project = { path = "../mabo-project" } miette = { workspace = true, features = ["fancy-no-backtrace"] } mimalloc.workspace = true diff --git a/crates/mabo-lsp/Cargo.toml b/crates/mabo-lsp/Cargo.toml index 9ade9e9..8419ad6 100644 --- a/crates/mabo-lsp/Cargo.toml +++ b/crates/mabo-lsp/Cargo.toml @@ -19,7 +19,7 @@ lsp-server = "0.7.6" lsp-types = { version = "0.95.0", features = ["proposed"] } mabo-compiler = { path = "../mabo-compiler" } mabo-meta = { path = "../mabo-meta" } -mabo-parser = { path = "../mabo-parser" } +mabo-parser = { path = "../mabo-parser", features = ["simd"] } mabo-project = { path = "../mabo-project" } ouroboros = "0.18.2" parking_lot = "0.12.1" diff --git a/crates/mabo-parser/Cargo.toml b/crates/mabo-parser/Cargo.toml index 119e7c3..82622f0 100644 --- a/crates/mabo-parser/Cargo.toml +++ b/crates/mabo-parser/Cargo.toml @@ -26,6 +26,7 @@ miette = { workspace = true, features = ["fancy-no-backtrace"] } [features] debug = [] +simd = ["winnow/simd"] [lints] workspace = true