tursodatabase / tursodatabase/libsql
libsql+tokio doesn't work on windows - stack overflow
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
I tried to use libsql (as per example) with tauri. It works flawlessly on linux and macos but it fails on windows. I think it's stuck somewhere in libsql::parser and smallvec, but I'm not certain. When I was going through the code base i went across those two references:
https://github.com/gwenn/lemon-rs/issues/8
https://github.com/gwenn/lemon-rs/pull/19
Error:
thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\rust-pg.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
main.rs
#[tokio::main]
async fn main() {
let auth_token = String::from("token");
let url = String::from("https://<turso-db>");
let db = libsql::Builder::new_remote(url, auth_token)
.build()
.await
.unwrap();
let conn = db.connect().unwrap();
let _result = conn.query(
"SELECT name FROM users WHERE name = ?",
libsql::params!["damian"],
)
.await;
}
Cargo.toml
[package]
name = "rust-pg"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1", features = ["full"] }
libsql = { git = "https://github.com/tursodatabase/libsql" }
[patch.crates-io]
sqlite3-parser = { git = "https://github.com/LucioFranco/lemon-rs" }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the main.rs reproduction and Cargo.toml, then run it on Windows to confirm the stack overflow. Inspect the libsql::parser and smallvec paths mentioned in the report, along with the linked lemon-rs issue and pull request. Done means the provided query completes without STATUS_STACK_OVERFLOW on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sqlite
- Domain
- databases, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100