BUG: Compilation fail on Windows when the 'replication' feature is not enabled.
wyhaya opened this issue · 4 comments
wyhaya commented
[dependencies.libsql]
git = "https://github.com/tursodatabase/libsql"
rev = "6b13d77519db51289b63bb164d7844eb7ce9b25d"
default-features = false
features = ["core"]
Error
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\...\.cargo\git\checkouts\libsql-311658d335deb3b1\6b13d77\libsql-sys\src\connection.rs:285:26
|
285 | use std::os::unix::ffi::OsStrExt;
| ^^^^ could not find `unix` in `os`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\...\.cargo\git\checkouts\libsql-311658d335deb3b1\6b13d77\libsql-sys\src\connection.rs:286:73
|
286 | let path = std::ffi::CString::new(path.as_ref().as_os_str().as_bytes())
| ^^^^^^^^ help: there is a method with a similar name: `as_encoded_bytes`
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `libsql-sys` (lib) due to 2 previous errors
# Ok
features = ["core", "replication"]
Is the replication
feature mandatory?
meitrix8208 commented
@wyhaya
sorry, have you managed to compile libsql-server for windows or windows-gnu, if so could you explain how you did it? right now i am using cross and wsl
wyhaya commented
@meitrix8208 I've never tried to compile libsql-server so I don't know the answer to that 😮💨, I've always used pre-compiled libsql-server in Docker.
This issue is just a question I had about libsql-client.
haaawk commented
Seems related to rust-lang/rust#41703
LucioFranco commented
@wyhaya hi! for the moment things that require the C code don't compile on windows, I would recommend either two things 1) use the remote only client or 2) use WSL2 which is what I use for local development and should work no problem.