##// END OF EJS Templates
rust-pathauditor: use interior mutability for use in multi-threaded contexts...
rust-pathauditor: use interior mutability for use in multi-threaded contexts The usual recommendation for using `RwLock` or `Mutex` is that if there are about as many write as there are reads, use `Mutex`, and if there are more reads than writes, use `RwLock`. If after the main bottleneck (i.e. parallel traversal) is removed this shows up on profiles, we should investigate using the `parking_lot` since we don't need a poisoning API, or maybe move to different types of caches entirely. Differential Revision: https://phab.mercurial-scm.org/D8213

File last commit:

r44786:d8d4fa9a default
r45022:07d9fd60 default
Show More
build.rs
25 lines | 548 B | application/rls-services+xml | RustLexer
// build.rs
//
// Copyright 2020 Raphaël Gomès <rgomes@octobus.net>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
#[cfg(feature = "with-re2")]
use cc;
#[cfg(feature = "with-re2")]
fn compile_re2() {
cc::Build::new()
.cpp(true)
.flag("-std=c++11")
.file("src/re2/rust_re2.cpp")
.compile("librustre.a");
println!("cargo:rustc-link-lib=re2");
}
fn main() {
#[cfg(feature = "with-re2")]
compile_re2();
}