| 1 | [package] |
| 2 | name = "notebook" |
| 3 | version = "0.1.0" |
| 4 | edition = "2024" |
| 5 | publish = false |
| 6 | |
| 7 | [features] |
| 8 | smb = ["dep:smb2", "dep:tokio"] |
| 9 | # Live presence: peers found on the network or met through a relay, through a shared secret, |
| 10 | # over an encrypted stream (resources/live-share.md). |
| 11 | live = ["dep:mdns-sd", "dep:minicbor", "dep:spake2", "dep:relay", "dep:rustls", "dep:rustls-native-certs", "dep:webpki-root-certs"] |
| 12 | |
| 13 | [dependencies] |
| 14 | onestore = { path = "../onestore" } |
| 15 | rusqlite = { version = "=0.40.2", features = ["bundled", "backup"] } |
| 16 | thiserror = "2" |
| 17 | serde = { version = "1", features = ["derive"] } |
| 18 | serde_json = "1" |
| 19 | tempfile = "3" |
| 20 | sha2 = "0.11" |
| 21 | smb2 = { version = "=0.21.0", optional = true } |
| 22 | tokio = { version = "1", features = ["rt-multi-thread", "time"], optional = true } |
| 23 | zeroize = "1.9.0" |
| 24 | # Queued edits of a password-protected section are sealed under a key derived from its own. |
| 25 | aes-gcm = "0.11.1" |
| 26 | base64 = { version = "0.23.1", default-features = false, features = ["std"] } |
| 27 | getrandom = "0.4.3" |
| 28 | hmac = "0.13.0" |
| 29 | minicbor = { version = "2.3.0", features = ["derive", "alloc"], optional = true } |
| 30 | spake2 = { version = "=0.5.0-pre.0", features = ["getrandom"], optional = true } |
| 31 | relay = { path = "../relay", optional = true } |
| 32 | # OneNote packages (.onepkg) are cabinet files. |
| 33 | cab = "0.6" |
| 34 | # std's clock where there is one; the browser's on wasm32-unknown-unknown, whose std has none. |
| 35 | web-time = "1.1" |
| 36 | |
| 37 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] |
| 38 | mdns-sd = { version = "0.21.4", default-features = false, optional = true } |
| 39 | # A relay's TLS, trusting the system's authorities, then Mozilla's. |
| 40 | rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"], optional = true } |
| 41 | rustls-native-certs = { version = "0.8", optional = true } |
| 42 | webpki-root-certs = { version = "1.0", optional = true } |
| 43 | |
| 44 | # The browser: its randomness, clock, timers and event loop, and SQLite's files kept with |
| 45 | # the notebooks' (`fs`). |
| 46 | [target.'cfg(target_arch = "wasm32")'.dependencies] |
| 47 | getrandom = { version = "0.4.3", features = ["wasm_js"] } |
| 48 | js-sys = "0.3" |
| 49 | wasm-bindgen = "0.2" |
| 50 | wasm-bindgen-futures = "0.4" |
| 51 | rsqlite-vfs = "0.1.1" |
| 52 | |
| 53 | [target.'cfg(target_vendor = "apple")'.dependencies] |
| 54 | nix = { version = "0.31", default-features = false, features = ["fs"] } |
| 55 | |
| 56 | [target.'cfg(windows)'.dependencies] |
| 57 | windows-sys = { version = "0.61", features = ["Win32_Storage_FileSystem", "Win32_System_Registry"] } |
| 58 | |
| 59 | [dev-dependencies] |
| 60 | libc = "0.2" |
| 61 | serde_json = "1" |
| 62 | tempfile = "3" |
| 63 | |
| 64 | [[example]] |
| 65 | name = "live_latency" |
| 66 | required-features = ["live"] |
| 67 | |
| 68 | [[example]] |
| 69 | name = "live_crowd" |
| 70 | required-features = ["live"] |
| 71 | |
| 72 | [[example]] |
| 73 | name = "smb_offline_client" |
| 74 | required-features = ["smb"] |
| 75 | |
| 76 | [[example]] |
| 77 | name = "smb_reconnect_client" |
| 78 | required-features = ["smb"] |
| 79 | |
| 80 | [[example]] |
| 81 | name = "smb_concurrent_client" |
| 82 | required-features = ["smb"] |
| 83 | |
| 84 | [[example]] |
| 85 | name = "smb_publish_probe" |
| 86 | required-features = ["smb"] |