Compiling app v0.1.0 (D:\develop\sqlitevector\src-tauri) error[E0432]: unresolved import `crate::AppState` --> src\mcp.rs:11:5 | 11 | use crate::AppState; | ^^^^^^^^^^^^^^^ no `AppState` in the root error[E0433]: failed to resolve: use of unresolved module or unlinked crate `env` --> src\lib.rs:37:38 | 37 | let llama_base_url = env::var("LLAMA_CPP_BASE_URL").unwrap_or_else(|_| "http://localhost:8080".to_string()); | ^^^ use of unresolved module or unlinked crate `env` | = help: if you wanted to use a crate named `env`, use `cargo add env` to add it to your `Cargo.toml` help: consider importing this module | 6 + use std::env; | error[E0433]: failed to resolve: use of unresolved module or unlinked crate `env` --> src\lib.rs:38:39 | 38 | let embedding_model = env::var("LLAMA_CPP_EMBEDDING_MODEL").unwrap_or_else(|_| "nomic-embed-text".to_string()); | ^^^ use of unresolved module or unlinked crate `env` | = help: if you wanted to use a crate named `env`, use `cargo add env` to add it to your `Cargo.toml` help: consider importing this module | 6 + use std::env; | error[E0433]: failed to resolve: use of unresolved module or unlinked crate `env` --> src\lib.rs:39:40 | 39 | let completion_model = env::var("LLAMA_CPP_MODEL").unwrap_or_else(|_| "mistral".to_string()); | ^^^ use of unresolved module or unlinked crate `env` | = help: if you wanted to use a crate named `env`, use `cargo add env` to add it to your `Cargo.toml` help: consider importing this module | 6 + use std::env; | error[E0422]: cannot find struct, variant or union type `AppState` in this scope --> src\lib.rs:43:38 | 43 | let state = Arc::new(AppState { | ^^^^^^^^ not found in this scope error[E0433]: failed to resolve: use of unresolved module or unlinked crate `env` --> src\lib.rs:51:32 | 51 | let mcp_port = env::var("MCP_PORT") | ^^^ use of unresolved module or unlinked crate `env` | = help: if you wanted to use a crate named `env`, use `cargo add env` to add it to your `Cargo.toml` help: consider importing this module | 6 + use std::env; | warning: unused import: `items::Entity as ItemsEntity` --> src\mcp.rs:12:30 | 12 | use crate::entities::{items, items::Entity as ItemsEntity}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default warning: unused import: `crate::entities::items` --> src\lib.rs:6:5 | 6 | use crate::entities::items; | ^^^^^^^^^^^^^^^^^^^^^^ error[E0282]: type annotations needed --> src\mcp.rs:38:5 | 38 | axum::serve(listener, app).await.unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type error[E0282]: type annotations needed --> src\mcp.rs:206:9 | 206 | let embedding = state.llama.get_embedding(content).await?; | ^^^^^^^^^ ... 220 | let embedding_bytes: Vec = embedding.iter() | --------- type must be known at this point | help: consider giving `embedding` an explicit type | 206 | let embedding: /* Type */ = state.llama.get_embedding(content).await?; | ++++++++++++ error[E0282]: type annotations needed --> src\mcp.rs:221:20 | 221 | .flat_map(|f| f.to_le_bytes()) | ^ - type must be known at this point | help: consider giving this closure parameter an explicit type | 221 | .flat_map(|f: /* Type */| f.to_le_bytes()) | ++++++++++++ error[E0282]: type annotations needed --> src\mcp.rs:288:19 | 288 | "id": res.try_get::("", "id")?, | ^^^ cannot infer type error: this function depends on never type fallback being `()` --> src\mcp.rs:300:1 | 300 | async fn handle_llm_generate(state: &AppState, prompt: &str, n_predict: i32, temperature: f32) -> anyhow::Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the types explicitly note: in edition 2024, the requirement `!: Serialize` will fail --> src\mcp.rs:302:8 | 302 | Ok(serde_json::json!({ | ________^ 303 | | "content": [{ "type": "text", "text": text }] 304 | | })) | |______^ = note: `#[deny(dependency_on_unit_never_type_fallback)]` (part of `#[deny(rust_2024_compatibility)]`) on by default = note: this error originates in the macro `$crate::json_internal` which comes from the expansion of the macro `serde_json::json` (in Nightly builds, run with -Z macro-backtrace for more info) help: use `()` annotations to avoid fallback changes | 301 | let text: () = state.llama.completion(prompt, n_predict, temperature).await?; | ++++ warning: variable does not need to be mutable --> src\db.rs:63:13 | 63 | let mut opt = ConnectOptions::new("sqlite::memory:"); | ----^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default Some errors have detailed explanations: E0282, E0422, E0432, E0433. For more information about an error, try `rustc --explain E0282`. warning: `app` (lib) generated 2 warnings (2 duplicates) error: could not compile `app` (lib) due to 12 previous errors; 2 warnings emitted warning: build failed, waiting for other jobs to finish... warning: `app` (lib test) generated 3 warnings error: could not compile `app` (lib test) due to 12 previous errors; 3 warnings emitted