Skip to content

Commit

Permalink
add debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Oct 4, 2024
1 parent 8f08668 commit 2966869
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
cargo-audit
chromedriver
geckodriver

nodejs
yarn-berry
] ++ lib.optionals isDarwin [
libiconv
frameworks.CoreServices
Expand Down
4 changes: 3 additions & 1 deletion src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ pub async fn init_sqlite() {
.expect("Serialization must be infallible for const struct");
let mem = Memory::new(&js_sys::Object::from(mem))
.expect("Wasm Memory could not be instantiated");
let proxy_uri = wasm_bindgen::link_to!(module = "/src/js/sqlite3-opfs-async-proxy.js");
tracing::debug!("proxy_uri={:?}", proxy_uri);
let opts = serde_wasm_bindgen::to_value(&Opts {
wasm_binary: WASM,
wasm_memory: mem,
proxy_uri: wasm_bindgen::link_to!(module = "/src/js/sqlite3-opfs-async-proxy.js"),
proxy_uri,
})
.expect("serialization must be infallible for const struct");
let opts = Object::from(opts);
Expand Down
2 changes: 0 additions & 2 deletions tests/test/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ async fn can_find() {
tracing::info!("{changed} rows changed");

let res: Option<StoredBook> = dsl::books.find(1).first(&mut conn).optional().unwrap();
tracing::debug!("res: {:?}", res);
tracing::debug!("FIND RES: {:?}", res);

let res: Vec<StoredBook> = diesel::sql_query("SELECT * FROM books where (id = 1)")
.load::<StoredBook>(&mut conn).unwrap();
Expand Down

0 comments on commit 2966869

Please sign in to comment.