diff --git a/Cargo.lock b/Cargo.lock index f42165992..79c477a01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4220,6 +4220,7 @@ dependencies = [ name = "turso_node" version = "0.2.0-pre.3" dependencies = [ + "chrono", "napi", "napi-build", "napi-derive", @@ -4322,7 +4323,6 @@ name = "turso_sync_js" version = "0.2.0-pre.3" dependencies = [ "genawaiter", - "http", "napi", "napi-build", "napi-derive", diff --git a/Cargo.toml b/Cargo.toml index 2771c2a31..33352e546 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,9 +33,7 @@ members = [ "perf/throughput/turso", "perf/throughput/rusqlite", ] -exclude = [ - "perf/latency/limbo", -] +exclude = ["perf/latency/limbo"] [workspace.package] version = "0.2.0-pre.3" @@ -60,7 +58,7 @@ limbo_percentile = { path = "extensions/percentile", version = "0.2.0-pre.3" } limbo_regexp = { path = "extensions/regexp", version = "0.2.0-pre.3" } turso_sqlite3_parser = { path = "vendored/sqlite3-parser", version = "0.2.0-pre.3" } limbo_uuid = { path = "extensions/uuid", version = "0.2.0-pre.3" } -turso_parser = { path = "parser", version = "0.2.0-pre.3" } +turso_parser = { path = "parser", version = "0.2.0-pre.3" } sql_generation = { path = "sql_generation" } strum = { version = "0.26", features = ["derive"] } strum_macros = "0.26" diff --git a/bindings/javascript/Cargo.toml b/bindings/javascript/Cargo.toml index 1b5001839..dcd2ba441 100644 --- a/bindings/javascript/Cargo.toml +++ b/bindings/javascript/Cargo.toml @@ -16,6 +16,7 @@ napi = { version = "3.1.3", default-features = false, features = ["napi6"] } napi-derive = { version = "3.1.1", default-features = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } tracing.workspace = true +chrono = { workspace = true, default-features = false, features = ["clock"] } [features] encryption = ["turso_core/encryption"] diff --git a/bindings/javascript/src/browser.rs b/bindings/javascript/src/browser.rs index c59d86e7f..4ebae0a59 100644 --- a/bindings/javascript/src/browser.rs +++ b/bindings/javascript/src/browser.rs @@ -140,7 +140,11 @@ impl Opfs { impl Clock for Opfs { fn now(&self) -> Instant { - Instant { secs: 0, micros: 0 } // TODO + let now = chrono::Local::now(); + Instant { + secs: now.timestamp(), + micros: now.timestamp_subsec_micros(), + } } } diff --git a/bindings/javascript/src/lib.rs b/bindings/javascript/src/lib.rs index ff910b7f2..df4724e6e 100644 --- a/bindings/javascript/src/lib.rs +++ b/bindings/javascript/src/lib.rs @@ -12,8 +12,6 @@ #[cfg(feature = "browser")] pub mod browser; -#[cfg(feature = "browser")] -use crate::browser::opfs; use napi::bindgen_prelude::*; use napi::{Env, Task}; diff --git a/bindings/javascript/sync/Cargo.toml b/bindings/javascript/sync/Cargo.toml index 00749c5d3..1057c4e8f 100644 --- a/bindings/javascript/sync/Cargo.toml +++ b/bindings/javascript/sync/Cargo.toml @@ -10,7 +10,6 @@ repository.workspace = true crate-type = ["cdylib"] [dependencies] -http = "1.3.1" napi = { version = "3.1.3", default-features = false, features = ["napi6"] } napi-derive = { version = "3.1.1", default-features = true } turso_sync_engine = { workspace = true }