diff options
author | Blaž Hrastnik | 2021-01-19 07:51:58 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-01-19 07:51:58 +0000 |
commit | 22fe2ebe72314681b5c87ed97b6a9d5a03c3dec2 (patch) | |
tree | 48b5a52212ac57a1b29f6e677b72f3fae2a5168c /helix-syntax | |
parent | d5db8929026e644fac83ba976b45b6606f0277d5 (diff) |
helix-syntax: Speed up compilation by compiling langs in parallel.
Diffstat (limited to 'helix-syntax')
-rw-r--r-- | helix-syntax/Cargo.toml | 1 | ||||
-rw-r--r-- | helix-syntax/build.rs | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/helix-syntax/Cargo.toml b/helix-syntax/Cargo.toml index 12da3924..86aaf360 100644 --- a/helix-syntax/Cargo.toml +++ b/helix-syntax/Cargo.toml @@ -11,3 +11,4 @@ tree-sitter = "0.17" [build-dependencies] cc = { version = "1", features = ["parallel"] } +rayon = { version = "1.5" } diff --git a/helix-syntax/build.rs b/helix-syntax/build.rs index 6b721c11..627a0290 100644 --- a/helix-syntax/build.rs +++ b/helix-syntax/build.rs @@ -1,3 +1,4 @@ +use rayon::prelude::*; use std::path::PathBuf; use std::{env, fs}; @@ -114,10 +115,10 @@ fn main() { "tree-sitter-cpp".to_string(), ]; let dirs = collect_tree_sitter_dirs(ignore); - for dir in dirs { + dirs.par_iter().for_each(|dir| { let language = &dir[12..]; // skip tree-sitter- prefix build_dir(&dir, &language); - } + }); build_dir("tree-sitter-typescript/tsx", "tsx"); build_dir("tree-sitter-typescript/typescript", "typescript"); } |