Hello I'm new to rust. I've been reading the rust book and doing lots of research.
I'm attempting to add a rest API to Mozilla's Project Mentat. I think I've got most of the structure working but I'm running into issues in the query-projector crate.
Here is the first error
error[E0432]: unresolved import `serde`
--> query-projector/src/lib.rs:74:9
|
74 | pub use serde::Serialize;
| ^^^^^ maybe a missing crate `serde`?
The error index: Rust Compiler Error Index indicates that there may be a spelling mestake (checked) some difference due to rust edition (tried setting edition to 2021) no luck. I also double checked the cargo.toml in the query-projector crate.
query-projector/Cargo.toml
[package]
name = "mentat_query_projector"
version = "0.0.2"
workspace = ".."
[features]
sqlcipher = ["rusqlite/sqlcipher"]
[dependencies]
failure = "~0.1"
indexmap = "~1.7"
serde = { version = "~1.0", optional = true }
serde_derive = { version = "~1.0", optional = true }
serde_json = "~1.0"
[dependencies.rusqlite]
version = "~0.26"
features = ["limits", "bundled"]
[dependencies.core_traits]
path = "../core-traits"
[dependencies.edn]
path = "../edn"
[dependencies.mentat_core]
path = "../core"
[dependencies.mentat_db]
path = "../db"
[dependencies.db_traits]
path = "../db-traits"
[dependencies.mentat_query_algebrizer]
path = "../query-algebrizer"
[dependencies.mentat_query_pull]
path = "../query-pull"
[dependencies.query_pull_traits]
path = "../query-pull-traits"
[dependencies.query_projector_traits]
path = "../query-projector-traits"
[dependencies.mentat_query_sql]
path = "../query-sql"
[dev-dependencies.mentat_sql]
path = "../sql"
I've tried clearing the build cache removing cargo.lock files and continue to get the same error. Ideas?
Full source code here: GitHub - TechplexEngineer/mentat at web-server