Missing files when building libsql-client v0.31.8 crate on Windows

Hi, I'm building a small project that requires the libsql-client = '0.31.8' crate, which depends on sqlite3-parser = '0.8.0'.

Everything works well on my MacBook, but I get the following error on Windows.

The panicked statement in the sqlite3-parser-0.8.0\build.rs file

assert!(Command::new(rlemon)
    .arg("-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT")
    .arg("-Tthird_party/lemon/lempar.rs")
    .arg(format!("-d{out_dir}"))
    .arg(sql_parser)
    .status()?
    .success());

It looks to me that when rlemon concats out_dir and sql_parser, a \ was used rather than a /. So I modified the lemon.c source file to normalise the slashes contained in the path strings. However the files that the build-script-build.exe ties to access are still not emitted properly, and I still get the Can't open file error.

I'm relatively new to Rust and total C newb, and would really appreciate some tips and pointers on what to do next in order to debug this.

Thanks.

For people who might encounter this in the future, I figured out the issues:

  1. the fopen function does not create subdirectories, they need to be manually created for the files to be emitted properly
  2. the mod.rs source file inside the sqlite3-parser crate tries to read from an incorrect path with this statement include!(concat!(env!("OUT_DIR"), "/parse.rs"));, while the emitted file is located at /src/parser/parse.rs (defined by it's own build.rs)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.