samuel-vitorino / lm.rs

Minimal LLM inference in Rust
MIT License
925 stars 26 forks source link

could not build backend #9

Closed cybors closed 1 month ago

cybors commented 1 month ago

i try to build backend with command on Windows

cargo build --release --features backend --bin backend

``error[E0433]: failed to resolve: use of undeclared crate or modulebase64 --> src\bin\backend.rs:10:5 | 10 | use base64::prelude::*; | ^^^^^^ use of undeclared crate or modulebase64`

error[E0432]: unresolved import serde --> src\bin\backend.rs:9:5 | 9 | use serde::{Deserialize, Serialize}; | ^^^^^ use of undeclared crate or module serde

error[E0433]: failed to resolve: use of undeclared crate or module serde_json --> src\bin\backend.rs:158:31 | 158 | match serde_json::from_str::(&text) { | ^^^^^^^^^^ use of undeclared crate or module serde_json

error[E0433]: failed to resolve: use of undeclared crate or module serde_json --> src\bin\backend.rs:291:39 | 291 | if write.send(serde_json::to_string(&response).unwrap().into()).await.is_err() { | ^^^^^^^^^^ use of undeclared crate or module serde_json

error[E0433]: failed to resolve: use of undeclared crate or module serde_json --> src\bin\backend.rs:300:31 | 300 | if write.send(serde_json::to_string(&response).unwrap().into()).await.is_err() { | ^^^^^^^^^^ use of undeclared crate or module serde_json

Some errors have detailed explanations: E0432, E0433. For more information about an error, try rustc --explain E0432. error: could not compile lmrs (bin "backend") due to 5 previous errors```

samuel-vitorino commented 1 month ago

I messed up some dependecies when adding support for multimodality, pushed a commit that should fix it.

samuel-vitorino commented 1 month ago

Also make sure you are passing the RUSTFLAGS="-C target-cpu=native" to improve performance.