mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-06 09:12:55 +00:00
NOBUG expose a version public api. Handy to check if the compilation was made with simd or not.
This commit is contained in:
@@ -34,6 +34,7 @@ lz4 = "1.13"
|
||||
time = "0.1"
|
||||
uuid = "0.1"
|
||||
chan = "0.1"
|
||||
version = "2"
|
||||
crossbeam = "0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
11
src/lib.rs
11
src/lib.rs
@@ -26,6 +26,9 @@ extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[macro_use]
|
||||
extern crate version;
|
||||
|
||||
#[macro_use]
|
||||
extern crate fst;
|
||||
extern crate byteorder;
|
||||
@@ -111,7 +114,15 @@ pub use postings::DocSet;
|
||||
pub use postings::Postings;
|
||||
pub use postings::SegmentPostingsOption;
|
||||
|
||||
#[cfg(feature="simdcompression")]
|
||||
pub fn version() -> &'static str {
|
||||
concat!(version!(), "-simd")
|
||||
}
|
||||
|
||||
#[cfg(not(feature="simdcompression"))]
|
||||
pub fn version() -> &'static str {
|
||||
concat!(version!(), "-nosimd")
|
||||
}
|
||||
|
||||
/// Tantivy's makes it possible to personalize when
|
||||
/// the indexer should merge its segments
|
||||
|
||||
Reference in New Issue
Block a user