π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline WASM logging into the shared binding library
Manav Rathi3b535fe161ec
diff --git a/rust/Cargo.lock b/rust/Cargo.lockindex 2c53fd76f7..40836b1c7d 100644--- a/rust/Cargo.lock+++ b/rust/Cargo.lock@@ -2421,7 +2421,7 @@ version = "0.0.0"dependencies = ["ente-cast","ente-core",- "ente-wasm-log",+ "ente-wasm-lib","js-sys","thiserror 2.0.18","wasm-bindgen",@@ -2535,7 +2535,7 @@ version = "0.0.0"dependencies = ["ente-core","ente-ensu-crypto",- "ente-wasm-log",+ "ente-wasm-lib","js-sys","thiserror 2.0.18","wasm-bindgen",@@ -2594,7 +2594,6 @@ dependencies = ["ente-core","ente-legacy","ente-wasm-lib",- "ente-wasm-log","js-sys","serde","serde-wasm-bindgen",@@ -2645,7 +2644,6 @@ name = "ente-locker-wasm"version = "0.0.0"dependencies = ["ente-wasm-lib",- "ente-wasm-log",][[package]]@@ -2698,7 +2696,7 @@ version = "0.0.0"dependencies = ["ente-core","ente-paste",- "ente-wasm-log",+ "ente-wasm-lib","js-sys","thiserror 2.0.18","wasm-bindgen",@@ -2749,7 +2747,6 @@ name = "ente-photos-wasm"version = "0.0.0"dependencies = ["ente-wasm-lib",- "ente-wasm-log",][[package]]@@ -2757,7 +2754,6 @@ name = "ente-prelogin-wasm"version = "0.0.0"dependencies = ["ente-wasm-lib",- "ente-wasm-log",][[package]]@@ -2819,7 +2815,7 @@ version = "0.0.0"dependencies = ["ente-core","ente-space",- "ente-wasm-log",+ "ente-wasm-lib","js-sys","log","serde",@@ -2855,6 +2851,7 @@ dependencies = ["ente-contacts","ente-core","js-sys",+ "log","md-5 0.11.0","serde","serde-wasm-bindgen",@@ -2862,15 +2859,6 @@ dependencies = ["tsify","wasm-bindgen","wasm-bindgen-futures",-]--[[package]]-name = "ente-wasm-log"-version = "0.0.0"-dependencies = [- "js-sys",- "log",- "wasm-bindgen","web-sys",]diff --git a/rust/Cargo.toml b/rust/Cargo.tomlindex 0a3c11d8f9..7a9d5d6ae9 100644--- a/rust/Cargo.toml+++ b/rust/Cargo.toml@@ -17,7 +17,6 @@ members = ["bindings/wasm/legacy","bindings/wasm/lib","bindings/wasm/locker",- "bindings/wasm/log","bindings/wasm/paste","bindings/wasm/photos","bindings/wasm/prelogin",@@ -61,7 +60,6 @@ ente-space = { path = "crates/space" }ente-test-support = { path = "crates/test-support" }ente-uniffi-log = { path = "bindings/uniffi/log" }ente-wasm-lib = { path = "bindings/wasm/lib" }-ente-wasm-log = { path = "bindings/wasm/log" }fast_image_resize = { version = "5.5.0", features = ["image"] }flate2 = "1.1.9"flutter_rust_bridge = "=2.12.0"diff --git a/rust/bindings/wasm/cast/Cargo.toml b/rust/bindings/wasm/cast/Cargo.tomlindex 28fffb4e33..2fab2fb806 100644--- a/rust/bindings/wasm/cast/Cargo.toml+++ b/rust/bindings/wasm/cast/Cargo.toml@@ -8,7 +8,7 @@ crate-type = ["cdylib"][dependencies]ente-cast.workspace = trueente-core.workspace = true-ente-wasm-log.workspace = true+ente-wasm-lib.workspace = truejs-sys.workspace = truethiserror.workspace = truewasm-bindgen.workspace = truediff --git a/rust/bindings/wasm/cast/src/lib.rs b/rust/bindings/wasm/cast/src/lib.rsindex ba05541c6d..ffd8e6ff79 100644--- a/rust/bindings/wasm/cast/src/lib.rs+++ b/rust/bindings/wasm/cast/src/lib.rs@@ -1,8 +1,7 @@use ente_cast::ReceiverCredentials;+use ente_wasm_lib as _;use wasm_bindgen::prelude::*;-use ente_wasm_log as _;-#[derive(Debug, thiserror::Error)]pub enum Error {#[error(transparent)]diff --git a/rust/bindings/wasm/ensu/Cargo.toml b/rust/bindings/wasm/ensu/Cargo.tomlindex d5fbbb14c7..52d9790ec0 100644--- a/rust/bindings/wasm/ensu/Cargo.toml+++ b/rust/bindings/wasm/ensu/Cargo.toml@@ -8,7 +8,7 @@ crate-type = ["cdylib"][dependencies]ente-core.workspace = trueente-ensu-crypto.workspace = true-ente-wasm-log.workspace = true+ente-wasm-lib.workspace = truejs-sys.workspace = truethiserror.workspace = truewasm-bindgen.workspace = truediff --git a/rust/bindings/wasm/ensu/src/lib.rs b/rust/bindings/wasm/ensu/src/lib.rsindex 3bace3d364..0c2087f98d 100644--- a/rust/bindings/wasm/ensu/src/lib.rs+++ b/rust/bindings/wasm/ensu/src/lib.rs@@ -1,4 +1,4 @@-use ente_wasm_log as _;+use ente_wasm_lib as _;use wasm_bindgen::prelude::*;#[derive(Debug, thiserror::Error)]diff --git a/rust/bindings/wasm/legacy/Cargo.toml b/rust/bindings/wasm/legacy/Cargo.tomlindex 208d1dcabd..841d46fdb4 100644--- a/rust/bindings/wasm/legacy/Cargo.toml+++ b/rust/bindings/wasm/legacy/Cargo.toml@@ -10,7 +10,6 @@ ente-accounts.workspace = trueente-core.workspace = trueente-legacy.workspace = trueente-wasm-lib = { workspace = true, features = ["session"] }-ente-wasm-log.workspace = truejs-sys.workspace = trueserde.workspace = trueserde-wasm-bindgen.workspace = truediff --git a/rust/bindings/wasm/legacy/src/lib.rs b/rust/bindings/wasm/legacy/src/lib.rsindex 8a76daef12..2a4fa2180d 100644--- a/rust/bindings/wasm/legacy/src/lib.rs+++ b/rust/bindings/wasm/legacy/src/lib.rs@@ -10,8 +10,6 @@ use types::{};use wasm_bindgen::prelude::*;-use ente_wasm_log as _;-#[derive(Debug, thiserror::Error)]pub enum Error {#[error(transparent)]diff --git a/rust/bindings/wasm/lib/Cargo.toml b/rust/bindings/wasm/lib/Cargo.tomlindex 64e65397fb..44ae6bbb5d 100644--- a/rust/bindings/wasm/lib/Cargo.toml+++ b/rust/bindings/wasm/lib/Cargo.toml@@ -23,6 +23,7 @@ ente-accounts = { workspace = true, optional = true }ente-contacts = { workspace = true, optional = true }ente-core.workspace = truejs-sys.workspace = true+log.workspace = truemd-5 = { workspace = true, optional = true }serde = { workspace = true, optional = true }serde-wasm-bindgen = { workspace = true, optional = true }@@ -30,3 +31,4 @@ thiserror.workspace = truetsify = { workspace = true, optional = true }wasm-bindgen.workspace = truewasm-bindgen-futures = { workspace = true, optional = true }+web-sys = { version = "0.3.102", features = ["console"] }diff --git a/rust/bindings/wasm/lib/src/lib.rs b/rust/bindings/wasm/lib/src/lib.rsindex b54819f22c..75bd89a766 100644--- a/rust/bindings/wasm/lib/src/lib.rs+++ b/rust/bindings/wasm/lib/src/lib.rs@@ -4,6 +4,7 @@ pub mod accounts;pub mod contacts;#[cfg(feature = "crypto")]pub mod crypto;+mod logging;#[cfg(feature = "prelogin")]mod prelogin;#[cfg(feature = "session")]diff --git a/rust/bindings/wasm/log/src/lib.rs b/rust/bindings/wasm/lib/src/logging.rssimilarity index 100%rename from rust/bindings/wasm/log/src/lib.rsrename to rust/bindings/wasm/lib/src/logging.rsdiff --git a/rust/bindings/wasm/locker/Cargo.toml b/rust/bindings/wasm/locker/Cargo.tomlindex 2abcbea0f5..af79556856 100644--- a/rust/bindings/wasm/locker/Cargo.toml+++ b/rust/bindings/wasm/locker/Cargo.toml@@ -7,4 +7,3 @@ crate-type = ["cdylib"][dependencies]ente-wasm-lib = { workspace = true, features = ["accounts", "contacts", "crypto-file", "crypto-seal"] }-ente-wasm-log.workspace = truediff --git a/rust/bindings/wasm/locker/src/lib.rs b/rust/bindings/wasm/locker/src/lib.rsindex 49bcbd3c6c..786e389426 100644--- a/rust/bindings/wasm/locker/src/lib.rs+++ b/rust/bindings/wasm/locker/src/lib.rs@@ -1,2 +1 @@use ente_wasm_lib as _;-use ente_wasm_log as _;diff --git a/rust/bindings/wasm/log/Cargo.toml b/rust/bindings/wasm/log/Cargo.tomldeleted file mode 100644index 2581e5374e..0000000000--- a/rust/bindings/wasm/log/Cargo.toml+++ /dev/null@@ -1,9 +0,0 @@-[package]-name = "ente-wasm-log"-edition = "2024"--[dependencies]-js-sys.workspace = true-log.workspace = true-wasm-bindgen.workspace = true-web-sys = { version = "0.3.102", features = ["console"] }diff --git a/rust/bindings/wasm/paste/Cargo.toml b/rust/bindings/wasm/paste/Cargo.tomlindex f1e9d455c8..4981866987 100644--- a/rust/bindings/wasm/paste/Cargo.toml+++ b/rust/bindings/wasm/paste/Cargo.toml@@ -7,8 +7,8 @@ crate-type = ["cdylib"][dependencies]ente-core.workspace = true-ente-wasm-log.workspace = trueente-paste.workspace = true+ente-wasm-lib.workspace = truejs-sys.workspace = truethiserror.workspace = truewasm-bindgen.workspace = truediff --git a/rust/bindings/wasm/paste/src/lib.rs b/rust/bindings/wasm/paste/src/lib.rsindex 7f4444d256..5ceed52eac 100644--- a/rust/bindings/wasm/paste/src/lib.rs+++ b/rust/bindings/wasm/paste/src/lib.rs@@ -1,5 +1,5 @@use ente_paste::{Client, OpenPaste, PasteSession};-use ente_wasm_log as _;+use ente_wasm_lib as _;use wasm_bindgen::prelude::*;#[derive(Debug, thiserror::Error)]diff --git a/rust/bindings/wasm/photos/Cargo.toml b/rust/bindings/wasm/photos/Cargo.tomlindex 599de55625..e748bf9518 100644--- a/rust/bindings/wasm/photos/Cargo.toml+++ b/rust/bindings/wasm/photos/Cargo.toml@@ -7,4 +7,3 @@ crate-type = ["cdylib"][dependencies]ente-wasm-lib = { workspace = true, features = ["contacts"] }-ente-wasm-log.workspace = truediff --git a/rust/bindings/wasm/photos/src/lib.rs b/rust/bindings/wasm/photos/src/lib.rsindex 49bcbd3c6c..786e389426 100644--- a/rust/bindings/wasm/photos/src/lib.rs+++ b/rust/bindings/wasm/photos/src/lib.rs@@ -1,2 +1 @@use ente_wasm_lib as _;-use ente_wasm_log as _;diff --git a/rust/bindings/wasm/prelogin/Cargo.toml b/rust/bindings/wasm/prelogin/Cargo.tomlindex 1f03dd8009..d67128e54c 100644--- a/rust/bindings/wasm/prelogin/Cargo.toml+++ b/rust/bindings/wasm/prelogin/Cargo.toml@@ -7,4 +7,3 @@ crate-type = ["cdylib"][dependencies]ente-wasm-lib = { workspace = true, features = ["prelogin"] }-ente-wasm-log.workspace = truediff --git a/rust/bindings/wasm/prelogin/src/lib.rs b/rust/bindings/wasm/prelogin/src/lib.rsindex 49bcbd3c6c..786e389426 100644--- a/rust/bindings/wasm/prelogin/src/lib.rs+++ b/rust/bindings/wasm/prelogin/src/lib.rs@@ -1,2 +1 @@use ente_wasm_lib as _;-use ente_wasm_log as _;diff --git a/rust/bindings/wasm/space/Cargo.toml b/rust/bindings/wasm/space/Cargo.tomlindex 19384d1833..924fe5e38d 100644--- a/rust/bindings/wasm/space/Cargo.toml+++ b/rust/bindings/wasm/space/Cargo.toml@@ -8,7 +8,7 @@ crate-type = ["cdylib"][dependencies]ente-core.workspace = trueente-space.workspace = true-ente-wasm-log.workspace = true+ente-wasm-lib.workspace = truejs-sys.workspace = truelog.workspace = trueserde.workspace = truediff --git a/rust/bindings/wasm/space/src/lib.rs b/rust/bindings/wasm/space/src/lib.rsindex 0bf401d55d..307f0ff6b5 100644--- a/rust/bindings/wasm/space/src/lib.rs+++ b/rust/bindings/wasm/space/src/lib.rs@@ -1,3 +1,3 @@-use ente_wasm_log as _;+use ente_wasm_lib as _;mod space;