From 62a0aefe44d479b633a56a5cc4450952ca46c6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 4 Oct 2019 10:26:32 +0200 Subject: [PATCH] Make the project be a workspace --- Cargo.toml | 46 +++---------------- meilidb-core/Cargo.toml | 41 +++++++++++++++++ {src => meilidb-core/src}/automaton/dfa.rs | 0 {src => meilidb-core/src}/automaton/mod.rs | 0 .../src}/automaton/query_enhancer.rs | 0 .../src}/criterion/document_id.rs | 0 {src => meilidb-core/src}/criterion/exact.rs | 0 {src => meilidb-core/src}/criterion/mod.rs | 0 .../src}/criterion/number_of_words.rs | 0 .../src}/criterion/sum_of_typos.rs | 0 .../src}/criterion/sum_of_words_attribute.rs | 0 .../src}/criterion/sum_of_words_position.rs | 0 .../src}/criterion/words_proximity.rs | 0 {src => meilidb-core/src}/error.rs | 0 {src => meilidb-core/src}/lib.rs | 0 {src => meilidb-core/src}/main.rs | 4 +- {src => meilidb-core/src}/number.rs | 0 {src => meilidb-core/src}/query_builder.rs | 0 {src => meilidb-core/src}/ranked_map.rs | 0 {src => meilidb-core/src}/raw_document.rs | 0 {src => meilidb-core/src}/raw_indexer.rs | 0 {src => meilidb-core/src}/reordered_attrs.rs | 0 .../src}/serde/convert_to_number.rs | 0 .../src}/serde/convert_to_string.rs | 0 .../src}/serde/deserializer.rs | 0 .../src}/serde/extract_document_id.rs | 0 {src => meilidb-core/src}/serde/indexer.rs | 0 {src => meilidb-core/src}/serde/mod.rs | 0 {src => meilidb-core/src}/serde/serializer.rs | 0 {src => meilidb-core/src}/store/docs_words.rs | 0 .../src}/store/documents_fields.rs | 0 {src => meilidb-core/src}/store/main.rs | 0 {src => meilidb-core/src}/store/mod.rs | 0 .../src}/store/postings_lists.rs | 0 {src => meilidb-core/src}/store/synonyms.rs | 0 {src => meilidb-core/src}/store/updates.rs | 0 .../src}/store/updates_results.rs | 0 .../src}/update/documents_addition.rs | 0 .../src}/update/documents_deletion.rs | 0 {src => meilidb-core/src}/update/mod.rs | 0 40 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 meilidb-core/Cargo.toml rename {src => meilidb-core/src}/automaton/dfa.rs (100%) rename {src => meilidb-core/src}/automaton/mod.rs (100%) rename {src => meilidb-core/src}/automaton/query_enhancer.rs (100%) rename {src => meilidb-core/src}/criterion/document_id.rs (100%) rename {src => meilidb-core/src}/criterion/exact.rs (100%) rename {src => meilidb-core/src}/criterion/mod.rs (100%) rename {src => meilidb-core/src}/criterion/number_of_words.rs (100%) rename {src => meilidb-core/src}/criterion/sum_of_typos.rs (100%) rename {src => meilidb-core/src}/criterion/sum_of_words_attribute.rs (100%) rename {src => meilidb-core/src}/criterion/sum_of_words_position.rs (100%) rename {src => meilidb-core/src}/criterion/words_proximity.rs (100%) rename {src => meilidb-core/src}/error.rs (100%) rename {src => meilidb-core/src}/lib.rs (100%) rename {src => meilidb-core/src}/main.rs (94%) rename {src => meilidb-core/src}/number.rs (100%) rename {src => meilidb-core/src}/query_builder.rs (100%) rename {src => meilidb-core/src}/ranked_map.rs (100%) rename {src => meilidb-core/src}/raw_document.rs (100%) rename {src => meilidb-core/src}/raw_indexer.rs (100%) rename {src => meilidb-core/src}/reordered_attrs.rs (100%) rename {src => meilidb-core/src}/serde/convert_to_number.rs (100%) rename {src => meilidb-core/src}/serde/convert_to_string.rs (100%) rename {src => meilidb-core/src}/serde/deserializer.rs (100%) rename {src => meilidb-core/src}/serde/extract_document_id.rs (100%) rename {src => meilidb-core/src}/serde/indexer.rs (100%) rename {src => meilidb-core/src}/serde/mod.rs (100%) rename {src => meilidb-core/src}/serde/serializer.rs (100%) rename {src => meilidb-core/src}/store/docs_words.rs (100%) rename {src => meilidb-core/src}/store/documents_fields.rs (100%) rename {src => meilidb-core/src}/store/main.rs (100%) rename {src => meilidb-core/src}/store/mod.rs (100%) rename {src => meilidb-core/src}/store/postings_lists.rs (100%) rename {src => meilidb-core/src}/store/synonyms.rs (100%) rename {src => meilidb-core/src}/store/updates.rs (100%) rename {src => meilidb-core/src}/store/updates_results.rs (100%) rename {src => meilidb-core/src}/update/documents_addition.rs (100%) rename {src => meilidb-core/src}/update/documents_deletion.rs (100%) rename {src => meilidb-core/src}/update/mod.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 7ebbd6a43..9bb83ccef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,41 +1,7 @@ -[package] -name = "new-meilidb" -version = "0.1.0" -authors = ["Clément Renault "] -edition = "2018" +[workspace] +members = [ + "meilidb-core", +] -[dependencies] -bincode = "1.1.4" -byteorder = "1.3.2" -deunicode = "1.0.0" -hashbrown = { version = "0.6.0", features = ["serde"] } -once_cell = "1.2.0" -ordered-float = { version = "1.0.2", features = ["serde"] } -rkv = "0.10.2" -sdset = "0.3.2" -serde = { version = "1.0.99", features = ["derive"] } -serde_json = "1.0.40" -siphasher = "0.3.0" -slice-group-by = "0.2.6" -zerocopy = "0.2.8" - -meilidb-schema = { path = "../MeiliDB/meilidb-schema", version = "0.1.0" } -meilidb-tokenizer = { path = "../MeiliDB/meilidb-tokenizer", version = "0.1.0" } - -[dependencies.rmp-serde] -git = "https://github.com/3Hren/msgpack-rust.git" -rev = "40b3d48" - -[dependencies.rmpv] -git = "https://github.com/3Hren/msgpack-rust.git" -rev = "40b3d48" -features = ["with-serde"] - -[dependencies.levenshtein_automata] -git = "https://github.com/Kerollmops/levenshtein-automata.git" -branch = "arc-byte-slice" -features = ["fst_automaton"] - -[dependencies.fst] -git = "https://github.com/Kerollmops/fst.git" -branch = "arc-byte-slice" +[profile.release] +debug = true diff --git a/meilidb-core/Cargo.toml b/meilidb-core/Cargo.toml new file mode 100644 index 000000000..b288a7414 --- /dev/null +++ b/meilidb-core/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "meilidb-core" +version = "0.1.0" +authors = ["Clément Renault "] +edition = "2018" + +[dependencies] +bincode = "1.1.4" +byteorder = "1.3.2" +deunicode = "1.0.0" +hashbrown = { version = "0.6.0", features = ["serde"] } +once_cell = "1.2.0" +ordered-float = { version = "1.0.2", features = ["serde"] } +rkv = "0.10.2" +sdset = "0.3.2" +serde = { version = "1.0.99", features = ["derive"] } +serde_json = "1.0.40" +siphasher = "0.3.0" +slice-group-by = "0.2.6" +zerocopy = "0.2.8" + +meilidb-schema = { path = "../../MeiliDB/meilidb-schema", version = "0.1.0" } +meilidb-tokenizer = { path = "../../MeiliDB/meilidb-tokenizer", version = "0.1.0" } + +[dependencies.rmp-serde] +git = "https://github.com/3Hren/msgpack-rust.git" +rev = "40b3d48" + +[dependencies.rmpv] +git = "https://github.com/3Hren/msgpack-rust.git" +rev = "40b3d48" +features = ["with-serde"] + +[dependencies.levenshtein_automata] +git = "https://github.com/Kerollmops/levenshtein-automata.git" +branch = "arc-byte-slice" +features = ["fst_automaton"] + +[dependencies.fst] +git = "https://github.com/Kerollmops/fst.git" +branch = "arc-byte-slice" diff --git a/src/automaton/dfa.rs b/meilidb-core/src/automaton/dfa.rs similarity index 100% rename from src/automaton/dfa.rs rename to meilidb-core/src/automaton/dfa.rs diff --git a/src/automaton/mod.rs b/meilidb-core/src/automaton/mod.rs similarity index 100% rename from src/automaton/mod.rs rename to meilidb-core/src/automaton/mod.rs diff --git a/src/automaton/query_enhancer.rs b/meilidb-core/src/automaton/query_enhancer.rs similarity index 100% rename from src/automaton/query_enhancer.rs rename to meilidb-core/src/automaton/query_enhancer.rs diff --git a/src/criterion/document_id.rs b/meilidb-core/src/criterion/document_id.rs similarity index 100% rename from src/criterion/document_id.rs rename to meilidb-core/src/criterion/document_id.rs diff --git a/src/criterion/exact.rs b/meilidb-core/src/criterion/exact.rs similarity index 100% rename from src/criterion/exact.rs rename to meilidb-core/src/criterion/exact.rs diff --git a/src/criterion/mod.rs b/meilidb-core/src/criterion/mod.rs similarity index 100% rename from src/criterion/mod.rs rename to meilidb-core/src/criterion/mod.rs diff --git a/src/criterion/number_of_words.rs b/meilidb-core/src/criterion/number_of_words.rs similarity index 100% rename from src/criterion/number_of_words.rs rename to meilidb-core/src/criterion/number_of_words.rs diff --git a/src/criterion/sum_of_typos.rs b/meilidb-core/src/criterion/sum_of_typos.rs similarity index 100% rename from src/criterion/sum_of_typos.rs rename to meilidb-core/src/criterion/sum_of_typos.rs diff --git a/src/criterion/sum_of_words_attribute.rs b/meilidb-core/src/criterion/sum_of_words_attribute.rs similarity index 100% rename from src/criterion/sum_of_words_attribute.rs rename to meilidb-core/src/criterion/sum_of_words_attribute.rs diff --git a/src/criterion/sum_of_words_position.rs b/meilidb-core/src/criterion/sum_of_words_position.rs similarity index 100% rename from src/criterion/sum_of_words_position.rs rename to meilidb-core/src/criterion/sum_of_words_position.rs diff --git a/src/criterion/words_proximity.rs b/meilidb-core/src/criterion/words_proximity.rs similarity index 100% rename from src/criterion/words_proximity.rs rename to meilidb-core/src/criterion/words_proximity.rs diff --git a/src/error.rs b/meilidb-core/src/error.rs similarity index 100% rename from src/error.rs rename to meilidb-core/src/error.rs diff --git a/src/lib.rs b/meilidb-core/src/lib.rs similarity index 100% rename from src/lib.rs rename to meilidb-core/src/lib.rs diff --git a/src/main.rs b/meilidb-core/src/main.rs similarity index 94% rename from src/main.rs rename to meilidb-core/src/main.rs index 527156aa0..0b50f3ce7 100644 --- a/src/main.rs +++ b/meilidb-core/src/main.rs @@ -2,8 +2,8 @@ use rkv::{Manager, Rkv, SingleStore, Value, StoreOptions}; use std::{fs, path::Path}; use meilidb_schema::SchemaAttr; -use new_meilidb::{store, QueryBuilder, DocumentId}; -use new_meilidb::raw_indexer::{RawIndexer, Indexed}; +use meilidb_core::{store, QueryBuilder, DocumentId}; +use meilidb_core::raw_indexer::{RawIndexer, Indexed}; fn main() { let path = Path::new("test.rkv"); diff --git a/src/number.rs b/meilidb-core/src/number.rs similarity index 100% rename from src/number.rs rename to meilidb-core/src/number.rs diff --git a/src/query_builder.rs b/meilidb-core/src/query_builder.rs similarity index 100% rename from src/query_builder.rs rename to meilidb-core/src/query_builder.rs diff --git a/src/ranked_map.rs b/meilidb-core/src/ranked_map.rs similarity index 100% rename from src/ranked_map.rs rename to meilidb-core/src/ranked_map.rs diff --git a/src/raw_document.rs b/meilidb-core/src/raw_document.rs similarity index 100% rename from src/raw_document.rs rename to meilidb-core/src/raw_document.rs diff --git a/src/raw_indexer.rs b/meilidb-core/src/raw_indexer.rs similarity index 100% rename from src/raw_indexer.rs rename to meilidb-core/src/raw_indexer.rs diff --git a/src/reordered_attrs.rs b/meilidb-core/src/reordered_attrs.rs similarity index 100% rename from src/reordered_attrs.rs rename to meilidb-core/src/reordered_attrs.rs diff --git a/src/serde/convert_to_number.rs b/meilidb-core/src/serde/convert_to_number.rs similarity index 100% rename from src/serde/convert_to_number.rs rename to meilidb-core/src/serde/convert_to_number.rs diff --git a/src/serde/convert_to_string.rs b/meilidb-core/src/serde/convert_to_string.rs similarity index 100% rename from src/serde/convert_to_string.rs rename to meilidb-core/src/serde/convert_to_string.rs diff --git a/src/serde/deserializer.rs b/meilidb-core/src/serde/deserializer.rs similarity index 100% rename from src/serde/deserializer.rs rename to meilidb-core/src/serde/deserializer.rs diff --git a/src/serde/extract_document_id.rs b/meilidb-core/src/serde/extract_document_id.rs similarity index 100% rename from src/serde/extract_document_id.rs rename to meilidb-core/src/serde/extract_document_id.rs diff --git a/src/serde/indexer.rs b/meilidb-core/src/serde/indexer.rs similarity index 100% rename from src/serde/indexer.rs rename to meilidb-core/src/serde/indexer.rs diff --git a/src/serde/mod.rs b/meilidb-core/src/serde/mod.rs similarity index 100% rename from src/serde/mod.rs rename to meilidb-core/src/serde/mod.rs diff --git a/src/serde/serializer.rs b/meilidb-core/src/serde/serializer.rs similarity index 100% rename from src/serde/serializer.rs rename to meilidb-core/src/serde/serializer.rs diff --git a/src/store/docs_words.rs b/meilidb-core/src/store/docs_words.rs similarity index 100% rename from src/store/docs_words.rs rename to meilidb-core/src/store/docs_words.rs diff --git a/src/store/documents_fields.rs b/meilidb-core/src/store/documents_fields.rs similarity index 100% rename from src/store/documents_fields.rs rename to meilidb-core/src/store/documents_fields.rs diff --git a/src/store/main.rs b/meilidb-core/src/store/main.rs similarity index 100% rename from src/store/main.rs rename to meilidb-core/src/store/main.rs diff --git a/src/store/mod.rs b/meilidb-core/src/store/mod.rs similarity index 100% rename from src/store/mod.rs rename to meilidb-core/src/store/mod.rs diff --git a/src/store/postings_lists.rs b/meilidb-core/src/store/postings_lists.rs similarity index 100% rename from src/store/postings_lists.rs rename to meilidb-core/src/store/postings_lists.rs diff --git a/src/store/synonyms.rs b/meilidb-core/src/store/synonyms.rs similarity index 100% rename from src/store/synonyms.rs rename to meilidb-core/src/store/synonyms.rs diff --git a/src/store/updates.rs b/meilidb-core/src/store/updates.rs similarity index 100% rename from src/store/updates.rs rename to meilidb-core/src/store/updates.rs diff --git a/src/store/updates_results.rs b/meilidb-core/src/store/updates_results.rs similarity index 100% rename from src/store/updates_results.rs rename to meilidb-core/src/store/updates_results.rs diff --git a/src/update/documents_addition.rs b/meilidb-core/src/update/documents_addition.rs similarity index 100% rename from src/update/documents_addition.rs rename to meilidb-core/src/update/documents_addition.rs diff --git a/src/update/documents_deletion.rs b/meilidb-core/src/update/documents_deletion.rs similarity index 100% rename from src/update/documents_deletion.rs rename to meilidb-core/src/update/documents_deletion.rs diff --git a/src/update/mod.rs b/meilidb-core/src/update/mod.rs similarity index 100% rename from src/update/mod.rs rename to meilidb-core/src/update/mod.rs