diff --git a/.editorconfig b/.editorconfig index e80002aa8..34150bb03 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,13 +14,6 @@ indent_style = tab insert_final_newline = true trim_trailing_whitespace = true -# BATS: https://github.com/bats-core/bats-core -# https://github.com/bats-core/bats-core/master/.editorconfig -[*.bats] -insert_final_newline = true -max_line_length = 80 -trim_trailing_whitespace = true - # CSS # https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules # http://cssguidelin.es/#syntax-and-formatting @@ -32,6 +25,12 @@ trim_trailing_whitespace = true [*.{htm,html}] trim_trailing_whitespace = true +# Just +# https://github.com/casey/just/master/justfile +[{justfile,Justfile}] +insert_final_newline = true +indent_style = space + # JavaScript, JSON, JSX, JavaScript Modules, TypeScript # https://github.com/feross/standard # https://prettier.io @@ -39,14 +38,20 @@ trim_trailing_whitespace = true indent_size = 4 # Kotlin -# https://android.github.io/kotlin-guides/style.html#indentation +# https://kotlinlang.org/docs/coding-conventions.html#indentation [*.{kt,kts}] indent_size = 4 -# Python -# https://www.python.org/dev/peps/pep-0008/#code-lay-out -[*.py] +# PowerShell +# https://poshcode.gitbook.io/powershell-practice-and-style/style-guide/code-layout-and-formatting +[*.{ps1,psd1,psm1}] indent_size = 4 +indent_style = space + +# Prisma +# https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema/data-model#formatting +[*.prisma] +indent_style = space # Rust # https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md @@ -55,31 +60,14 @@ indent_size = 4 insert_final_newline = false trim_trailing_whitespace = true -# SQL -# https://www.sqlstyle.guide/ -[*.sql] -indent_size = 4 -indent_style = space - -# Prisma -# https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema/data-model#formatting -[*.prisma] -indent_size = 2 -indent_style = space - -# YAML -# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668 -[*.{yaml,yml}] -indent_style = space - # Shell # https://google.github.io/styleguide/shell.xml#Indentation [*.{bash,sh,zsh}] indent_style = space -# PowerShell -# https://poshcode.gitbook.io/powershell-practice-and-style/style-guide/code-layout-and-formatting -[*.{ps1,psd1,psm1}] +# SQL +# https://www.sqlstyle.guide/ +[*.sql] indent_size = 4 indent_style = space @@ -88,3 +76,9 @@ indent_style = space [*.swift] indent_size = 4 indent_style = space + +# YAML +# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668 +[*.{yaml,yml}] +indent_style = space + diff --git a/.npmrc b/.npmrc index b40bf051f..ee8b1dcae 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,6 @@ ; make all engine requirements (e.g. node version) strictly kept engine-strict=true +dedupe-peer-dependents=true ; necessary for metro + mobile strict-peer-dependencies=false node-linker=hoisted diff --git a/.prettierrc.js b/.prettierrc.js index dc5d108ad..209a288f7 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -22,7 +22,7 @@ module.exports = { '^[../]', '^[./]' ], - importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'], + importOrderParserPlugins: ['typescript', 'jsx', 'decorators'], importOrderTypeScriptVersion: '4.4.0', tailwindConfig: './packages/ui/tailwind.config.js', plugins: ['@ianvs/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'] diff --git a/.rustfmt.toml b/.rustfmt.toml index 9c4c7300b..cd5cd84cc 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,12 +1,12 @@ -max_width = 100 -hard_tabs = true -newline_style = "Unix" -use_small_heuristics = "Default" -reorder_imports = true -reorder_modules = true -remove_nested_parens = true -edition = "2021" -merge_derives = true -use_try_shorthand = false +edition = "2021" +force_explicit_abi = true +hard_tabs = true +max_width = 100 +merge_derives = true +newline_style = "Unix" +remove_nested_parens = true +reorder_imports = true +reorder_modules = true use_field_init_shorthand = false -force_explicit_abi = true \ No newline at end of file +use_small_heuristics = "Default" +use_try_shorthand = false diff --git a/.taplo.toml b/.taplo.toml new file mode 100644 index 000000000..59a0f5b66 --- /dev/null +++ b/.taplo.toml @@ -0,0 +1,11 @@ +[formatting] +align_comments = true +align_entries = true +array_auto_collapse = true +array_trailing_comma = false +column_width = 100 +crlf = false +indent_string = ' ' +reorder_arrays = true +reorder_keys = true +trailing_newline = true diff --git a/.vscode/settings.json b/.vscode/settings.json index de45015ec..625b44315 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -36,6 +36,9 @@ "[rust]": { "editor.defaultFormatter": "rust-lang.rust-analyzer" }, + "[toml]": { + "editor.defaultFormatter": "tamasfe.even-better-toml" + }, "rust-analyzer.procMacro.enable": true, "rust-analyzer.diagnostics.experimental.enable": false, "tailwindCSS.experimental.classRegex": [ @@ -102,5 +105,8 @@ "i18n-ally.enabledFrameworks": ["react"], "i18n-ally.keystyle": "flat", // You need to add this to your locale settings file "i18n-ally.translate.google.apiKey": "xxx" - "i18n-ally.translate.engines": ["google"] + "i18n-ally.translate.engines": ["google"], + "prettier.configPath": ".prettierrc.js", + "prettier.prettierPath": "./node_modules/prettier", + "evenBetterToml.taplo.configFile.path": ".taplo.toml" } diff --git a/Cargo.lock b/Cargo.lock index d4088ccad..89f652b3b 100644 Binary files a/Cargo.lock and b/Cargo.lock differ diff --git a/Cargo.toml b/Cargo.toml index 1cc1388c7..a39b268bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,127 +1,140 @@ [workspace] -resolver = "2" +exclude = ["crates/crypto"] members = [ - "core", - "core/crates/*", - "crates/*", "apps/deps-generator", - "apps/desktop/src-tauri", "apps/desktop/crates/*", - "apps/mobile/modules/sd-core/core", + "apps/desktop/src-tauri", "apps/mobile/modules/sd-core/android/crate", + "apps/mobile/modules/sd-core/core", "apps/mobile/modules/sd-core/ios/crate", "apps/server", + "core", + "core/crates/*", + "crates/*" ] -exclude = ["crates/crypto"] +resolver = "2" [workspace.package] -license = "AGPL-3.0-only" -edition = "2021" +edition = "2021" +license = "AGPL-3.0-only" repository = "https://github.com/spacedriveapp/spacedrive" [workspace.dependencies] # Third party dependencies used by one or more of our crates -async-channel = "2.3" -async-trait = "0.1.80" -axum = "0.6.20" # Update blocked by hyper -base64 = "0.22.1" -base91 = "0.1.0" -blake3 = "1.5.0" # Update blocked by custom patch below -chrono = "0.4.38" -directories = "5.0" -ed25519-dalek = "2.1.1" -futures = "0.3.30" +async-channel = "2.3" +async-trait = "0.1.80" +axum = "0.6.20" # Update blocked by hyper +base64 = "0.22.1" +base91 = "0.1.0" +blake3 = "1.5.0" # Update blocked by custom patch below +chrono = "0.4.38" +directories = "5.0" +ed25519-dalek = "2.1.1" +futures = "0.3.30" futures-concurrency = "7.6" -gix-ignore = "0.11.2" -globset = "0.4.14" -http = "0.2" # Update blocked by axum -hyper = "0.14" # Update blocked due to API breaking changes -image = "0.24.9" # Update blocked due to https://github.com/image-rs/image/issues/2230 -itertools = "0.13.0" -lending-stream = "1.0" -libc = "0.2" -normpath = "1.2" -once_cell = "1.19" -pin-project-lite = "0.2.14" -rand = "0.8.5" -regex = "1.10" -reqwest = "0.11" # Update blocked by hyper -rmp = "0.8.14" -rmp-serde = "1.3.0" -rmpv = { version = "1.3", features = ["with-serde"] } -rspc = "0.1.4" -serde = "1.0" -serde_json = "1.0" -specta = "=2.0.0-rc.11" -static_assertions = "1.1" -strum = "0.26" -strum_macros = "0.26" -tempfile = "3.10" -thiserror = "1.0" -tokio = "1.38" -tokio-stream = "0.1.15" -tokio-util = "0.7.11" -tracing = "0.1.40" -tracing-subscriber = "0.3.18" -tracing-test = "0.2.5" -uhlc = "0.6.0" # Must follow version used by specta -uuid = "1.8" -webp = "0.2.6" # Update blocked by image +gix-ignore = "0.11.2" +globset = "0.4.14" +http = "0.2" # Update blocked by axum +hyper = "0.14" # Update blocked due to API breaking changes +image = "0.24.9" # Update blocked due to https://github.com/image-rs/image/issues/2230 +itertools = "0.13.0" +lending-stream = "1.0" +libc = "0.2" +normpath = "1.2" +once_cell = "1.19" +pin-project-lite = "0.2.14" +rand = "0.8.5" +regex = "1.10" +reqwest = "0.11" # Update blocked by hyper +rmp = "0.8.14" +rmp-serde = "1.3.0" +rmpv = { version = "1.3", features = ["with-serde"] } +rspc = "0.1.4" # Update blocked by custom patch below +serde = "1.0" +serde_json = "1.0" +specta = "=2.0.0-rc.20" +specta-typescript = "=0.0.7" +static_assertions = "1.1" +strum = "0.26" +strum_macros = "0.26" +tempfile = "3.10" +thiserror = "1.0" +tokio = "1.38" +tokio-stream = "0.1.15" +tokio-util = "0.7.11" +tracing = "0.1.40" +tracing-subscriber = "0.3.18" +tracing-test = "0.2.5" +uhlc = "0.8.0" # Must follow version used by specta +uuid = "1.10" # Must follow version used by specta +webp = "0.2.6" # Update blocked by image [workspace.dependencies.prisma-client-rust] -git = "https://github.com/brendonovich/prisma-client-rust" -rev = "4f9ef9d38ca732162accff72b2eb684d2f120bab" -features = ["migrations", "specta", "sqlite", "sqlite-create-many"] default-features = false +features = ["migrations", "specta", "sqlite", "sqlite-create-many"] +git = "https://github.com/brendonovich/prisma-client-rust" +rev = "4f9ef9d38c" [workspace.dependencies.prisma-client-rust-cli] -git = "https://github.com/brendonovich/prisma-client-rust" -rev = "4f9ef9d38ca732162accff72b2eb684d2f120bab" -features = ["migrations", "specta", "sqlite", "sqlite-create-many"] default-features = false +features = ["migrations", "specta", "sqlite", "sqlite-create-many"] +git = "https://github.com/brendonovich/prisma-client-rust" +rev = "4f9ef9d38c" [workspace.dependencies.prisma-client-rust-sdk] -git = "https://github.com/brendonovich/prisma-client-rust" -rev = "4f9ef9d38ca732162accff72b2eb684d2f120bab" -features = ["sqlite"] default-features = false +features = ["sqlite"] +git = "https://github.com/brendonovich/prisma-client-rust" +rev = "4f9ef9d38c" -[patch.crates-io] # Proper IOS Support -if-watch = { git = "https://github.com/spacedriveapp/if-watch.git", rev = "a92c17d3f85c1c6fb0afeeaf6c2b24d0b147e8c3" } +[patch.crates-io.if-watch] +git = "https://github.com/spacedriveapp/if-watch.git" +rev = "a92c17d3f8" # We hack it to the high heavens -rspc = { git = "https://github.com/spacedriveapp/rspc.git", rev = "ab12964b140991e0730c3423693533fba71efb03" } +[patch.crates-io.rspc] +git = "https://github.com/spacedriveapp/rspc.git" +rev = "0018e80231" # Add `Control::open_stream_with_addrs` -libp2p = { git = "https://github.com/spacedriveapp/rust-libp2p.git", rev = "a005656df7e82059a0eb2e333ebada4731d23f8c" } -libp2p-core = { git = "https://github.com/spacedriveapp/rust-libp2p.git", rev = "a005656df7e82059a0eb2e333ebada4731d23f8c" } -libp2p-swarm = { git = "https://github.com/spacedriveapp/rust-libp2p.git", rev = "a005656df7e82059a0eb2e333ebada4731d23f8c" } -libp2p-stream = { git = "https://github.com/spacedriveapp/rust-libp2p.git", rev = "a005656df7e82059a0eb2e333ebada4731d23f8c" } - -blake3 = { git = "https://github.com/spacedriveapp/blake3.git", rev = "d3aab416c12a75c2bfabce33bcd594e428a79069" } +[patch.crates-io.libp2p] +git = "https://github.com/spacedriveapp/rust-libp2p.git" +rev = "a005656df7" +[patch.crates-io.libp2p-core] +git = "https://github.com/spacedriveapp/rust-libp2p.git" +rev = "a005656df7" +[patch.crates-io.libp2p-swarm] +git = "https://github.com/spacedriveapp/rust-libp2p.git" +rev = "a005656df7" +[patch.crates-io.libp2p-stream] +git = "https://github.com/spacedriveapp/rust-libp2p.git" +rev = "a005656df7" +[patch.crates-io.blake3] +git = "https://github.com/spacedriveapp/blake3.git" +rev = "d3aab416c1" [profile.dev] # Make compilation faster on macOS +codegen-units = 256 +debug = 0 +incremental = true +lto = false +opt-level = 0 split-debuginfo = "unpacked" -opt-level = 0 -debug = 0 -strip = "none" -lto = false -codegen-units = 256 -incremental = true +strip = "none" [profile.dev-debug] inherits = "dev" # Enables debugger +codegen-units = 256 +debug = "full" +incremental = true +lto = "off" +opt-level = 0 split-debuginfo = "none" -opt-level = 0 -debug = "full" -strip = "none" -lto = "off" -codegen-units = 256 -incremental = true +strip = "none" # Set the settings for build scripts and proc-macros. [profile.dev.build-override] @@ -129,20 +142,20 @@ opt-level = 3 # Set the default for dependencies, except workspace members. [profile.dev.package."*"] -opt-level = 3 incremental = false +opt-level = 3 # Set the default for dependencies, except workspace members. [profile.dev-debug.package."*"] -inherits = "dev" -opt-level = 3 -debug = "full" +debug = "full" incremental = false +inherits = "dev" +opt-level = 3 # Optimize release builds [profile.release] -panic = "unwind" # Sadly we need unwind to avoid unexpected crashes on third party crates -codegen-units = 1 # Compile crates one after another so the compiler can optimize better -lto = true # Enables link to optimizations -opt-level = "s" # Optimize for binary size -strip = true # Remove debug symbols +codegen-units = 1 # Compile crates one after another so the compiler can optimize better +lto = true # Enables link to optimizations +opt-level = "s" # Optimize for binary size +panic = "unwind" # Sadly we need unwind to avoid unexpected crashes on third party crates +strip = true # Remove debug symbols diff --git a/apps/deps-generator/Cargo.toml b/apps/deps-generator/Cargo.toml index 03d4b0938..e775b7913 100644 --- a/apps/deps-generator/Cargo.toml +++ b/apps/deps-generator/Cargo.toml @@ -1,19 +1,20 @@ [package] -name = "sd-deps-generator" +name = "sd-deps-generator" version = "0.0.0" -authors = ["Jake Robinson "] -description = "A tool to compile all Spacedrive dependencies and their respective licenses" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Jake Robinson "] +description = "A tool to compile all Spacedrive dependencies and their respective licenses" +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] # Workspace dependencies -reqwest = { workspace = true, features = ["blocking", "native-tls-vendored"] } -serde = { workspace = true, features = ["derive"] } +reqwest = { workspace = true, features = ["blocking", "native-tls-vendored"] } +serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } # Specific Deps Generator dependencies -anyhow = "1.0" -clap = { version = "4.5", features = ["derive"] } +anyhow = "1.0" cargo_metadata = "0.18.1" +clap = { version = "4.5", features = ["derive"] } diff --git a/apps/desktop/crates/linux/Cargo.toml b/apps/desktop/crates/linux/Cargo.toml index c7761d633..9c4755b73 100644 --- a/apps/desktop/crates/linux/Cargo.toml +++ b/apps/desktop/crates/linux/Cargo.toml @@ -1,16 +1,17 @@ [package] -name = "sd-desktop-linux" +name = "sd-desktop-linux" version = "0.1.0" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -libc = { workspace = true } +libc = { workspace = true } tokio = { workspace = true, features = ["fs"] } [target.'cfg(target_os = "linux")'.dependencies] -wgpu = { version = "0.20.0", default-features = false } +wgpu = { version = "22.1", default-features = false } # WARNING: gtk should follow the same version used by tauri -# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-beta.17/core/tauri/Cargo.toml#L85C1-L85C51 +# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-rc.2/core/tauri/Cargo.toml gtk = { version = "0.18", features = ["v3_24"] } diff --git a/apps/desktop/crates/macos/Cargo.toml b/apps/desktop/crates/macos/Cargo.toml index 72faca5e4..cc5b156fe 100644 --- a/apps/desktop/crates/macos/Cargo.toml +++ b/apps/desktop/crates/macos/Cargo.toml @@ -1,9 +1,10 @@ [package] -name = "sd-desktop-macos" +name = "sd-desktop-macos" version = "0.1.0" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true [target.'cfg(target_os = "macos")'.dependencies] swift-rs = { version = "1.0.6", features = ["serde"] } diff --git a/apps/desktop/crates/windows/Cargo.toml b/apps/desktop/crates/windows/Cargo.toml index a41ca4bff..7f3fe0bdf 100644 --- a/apps/desktop/crates/windows/Cargo.toml +++ b/apps/desktop/crates/windows/Cargo.toml @@ -1,15 +1,16 @@ [package] -name = "sd-desktop-windows" +name = "sd-desktop-windows" version = "0.1.0" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -libc = { workspace = true } -normpath = { workspace = true } +libc = { workspace = true } +normpath = { workspace = true } thiserror = { workspace = true } [target.'cfg(target_os = "windows")'.dependencies.windows] -version = "0.57" -features = ["Win32_UI_Shell", "Win32_Foundation", "Win32_System_Com"] +features = ["Win32_Foundation", "Win32_System_Com", "Win32_UI_Shell"] +version = "0.58" diff --git a/apps/desktop/package.json b/apps/desktop/package.json index d18a4b1a5..1ec124294 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -20,10 +20,10 @@ "@sd/ui": "workspace:*", "@t3-oss/env-core": "^0.7.1", "@tanstack/react-query": "^4.36.1", - "@tauri-apps/api": "next", - "@tauri-apps/plugin-dialog": "2.0.0-beta.3", - "@tauri-apps/plugin-os": "2.0.0-beta.3", - "@tauri-apps/plugin-shell": "2.0.0-beta.3", + "@tauri-apps/api": "=2.0.0-rc.0", + "@tauri-apps/plugin-dialog": "=2.0.0-rc.0", + "@tauri-apps/plugin-os": "=2.0.0-rc.0", + "@tauri-apps/plugin-shell": "=2.0.0-rc.0", "consistent-hash": "^1.2.2", "immer": "^10.0.3", "react": "^18.2.0", @@ -34,7 +34,7 @@ "devDependencies": { "@sd/config": "workspace:*", "@sentry/vite-plugin": "^2.16.0", - "@tauri-apps/cli": "2.0.0-beta.20", + "@tauri-apps/cli": "=2.0.0-rc.3", "@types/react": "^18.2.67", "@types/react-dom": "^18.2.22", "sass": "^1.72.0", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 1ab1056f6..993b13832 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,52 +1,54 @@ [package] -name = "sd-desktop" +name = "sd-desktop" version = "0.4.1" -description = "The universal file manager." -authors = ["Spacedrive Technology Inc "] -default-run = "sd-desktop" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Spacedrive Technology Inc "] +default-run = "sd-desktop" +description = "The universal file manager." +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] # Spacedrive Sub-crates -sd-core = { path = "../../../core", features = ["ffmpeg", "heif"] } -sd-fda = { path = "../../../crates/fda" } +sd-core = { path = "../../../core", features = ["ffmpeg", "heif"] } +sd-fda = { path = "../../../crates/fda" } sd-prisma = { path = "../../../crates/prisma" } # Workspace dependencies -axum = { workspace = true, features = ["headers", "query"] } -directories = { workspace = true } -futures = { workspace = true } -hyper = { workspace = true } -http = { workspace = true } +axum = { workspace = true, features = ["headers", "query"] } +directories = { workspace = true } +futures = { workspace = true } +http = { workspace = true } +hyper = { workspace = true } prisma-client-rust = { workspace = true } -rand = { workspace = true } -rspc = { workspace = true, features = ["tauri", "tracing"] } -serde = { workspace = true } -serde_json = { workspace = true } -specta = { workspace = true } -strum = { workspace = true, features = ["derive"] } -tokio = { workspace = true, features = ["sync"] } -tracing = { workspace = true } -thiserror = { workspace = true } -uuid = { workspace = true, features = ["serde"] } +rand = { workspace = true } +rspc = { workspace = true, features = ["tauri", "tracing"] } +serde = { workspace = true } +serde_json = { workspace = true } +specta = { workspace = true } +specta-typescript = { workspace = true } +strum = { workspace = true, features = ["derive"] } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["sync"] } +tracing = { workspace = true } +uuid = { workspace = true, features = ["serde"] } # Specific Desktop dependencies # WARNING: Do NOT enable default features, as that vendors dbus (see below) -opener = { version = "0.7.1", features = ["reveal"], default-features = false } -tauri = { version = "=2.0.0-beta.17", features = [ - "macos-private-api", - "unstable", - "linux-libxdo", -] } # Update blocked by rspc -tauri-plugin-updater = "2.0.0-beta" -tauri-plugin-dialog = "2.0.0-beta" -tauri-plugin-os = "2.0.0-beta" -tauri-plugin-shell = "2.0.0-beta" -tauri-runtime = { version = "=2.0.0-beta.15" } # Update blocked by tauri -tauri-specta = { version = "=2.0.0-rc.8", features = ["typescript"] } -tauri-utils = { version = "=2.0.0-beta.16" } # Update blocked by tauri +opener = { version = "0.7.1", features = ["reveal"], default-features = false } +tauri = { version = "=2.0.0-rc.2", features = ["linux-libxdo", "macos-private-api", "unstable"] } +tauri-plugin-dialog = "=2.0.0-rc.0" +tauri-plugin-os = "=2.0.0-rc.0" +tauri-plugin-shell = "=2.0.0-rc.0" +tauri-plugin-updater = "=2.0.0-rc.0" +tauri-runtime = { version = "=2.0.0-rc.2" } +tauri-utils = { version = "=2.0.0-rc.2" } + +[dependencies.tauri-specta] +features = ["derive", "typescript"] +git = "https://github.com/spacedriveapp/tauri-specta" +rev = "6069a05029" [target.'cfg(target_os = "linux")'.dependencies] # Spacedrive Sub-crates @@ -55,7 +57,7 @@ sd-desktop-linux = { path = "../crates/linux" } # Specific Desktop dependencies # WARNING: dbus must NOT be vendored, as that breaks the app on Linux,X11,Nvidia dbus = { version = "0.9.7", features = ["stdfd"] } -# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-beta.17/core/tauri/Cargo.toml#L86 +# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-rc.2/core/tauri/Cargo.toml webkit2gtk = { version = "=2.0.1", features = ["v2_38"] } [target.'cfg(target_os = "macos")'.dependencies] @@ -68,10 +70,10 @@ sd-desktop-windows = { path = "../crates/windows" } [build-dependencies] # Specific Desktop dependencies -tauri-build = "2.0.0-beta" +tauri-build = "=2.0.0-rc.2" [features] -default = ["custom-protocol"] -devtools = ["tauri/devtools"] -ai-models = ["sd-core/ai"] +ai-models = ["sd-core/ai"] custom-protocol = ["tauri/custom-protocol"] +default = ["custom-protocol"] +devtools = ["tauri/devtools"] diff --git a/apps/desktop/src-tauri/capabilities/default.json b/apps/desktop/src-tauri/capabilities/default.json index 90cc19ebd..cc710d277 100644 --- a/apps/desktop/src-tauri/capabilities/default.json +++ b/apps/desktop/src-tauri/capabilities/default.json @@ -4,27 +4,26 @@ "description": "Capability for the main window", "windows": ["main"], "permissions": [ - "app:default", - "event:default", - "image:default", - "menu:default", - "path:default", - "resources:default", - "window:default", - "tray:default", - "webview:default", - "window:default", + "core:app:default", + "core:event:default", + "core:image:default", + "core:menu:default", + "core:path:default", + "core:resources:default", + "core:window:default", + "core:tray:default", + "core:webview:default", "shell:allow-open", "dialog:allow-open", "dialog:allow-save", "dialog:allow-confirm", "os:allow-os-type", - "window:allow-close", - "window:allow-create", - "window:allow-maximize", - "window:allow-minimize", - "window:allow-toggle-maximize", - "window:allow-start-dragging", - "webview:allow-internal-toggle-devtools" + "core:window:allow-close", + "core:window:allow-create", + "core:window:allow-maximize", + "core:window:allow-minimize", + "core:window:allow-toggle-maximize", + "core:window:allow-start-dragging", + "core:webview:allow-internal-toggle-devtools" ] } diff --git a/apps/desktop/src-tauri/rustfmt.toml b/apps/desktop/src-tauri/rustfmt.toml index 054510e14..385c9ea02 100644 --- a/apps/desktop/src-tauri/rustfmt.toml +++ b/apps/desktop/src-tauri/rustfmt.toml @@ -1,12 +1,12 @@ -max_width = 100 -hard_tabs = true -newline_style = "Auto" -use_small_heuristics = "Default" -reorder_imports = true -reorder_modules = true -remove_nested_parens = true -edition = "2018" -merge_derives = true -use_try_shorthand = false +edition = "2018" +force_explicit_abi = true +hard_tabs = true +max_width = 100 +merge_derives = true +newline_style = "Auto" +remove_nested_parens = true +reorder_imports = true +reorder_modules = true use_field_init_shorthand = false -force_explicit_abi = true +use_small_heuristics = "Default" +use_try_shorthand = false diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs index 3b8d617ae..7442bf8f6 100644 --- a/apps/desktop/src-tauri/src/main.rs +++ b/apps/desktop/src-tauri/src/main.rs @@ -10,9 +10,11 @@ use sd_core::{Node, NodeError}; use sd_fda::DiskAccess; use serde::{Deserialize, Serialize}; +use specta_typescript::Typescript; +use tauri::Emitter; use tauri::{async_runtime::block_on, webview::PlatformWebview, AppHandle, Manager, WindowEvent}; use tauri_plugins::{sd_error_plugin, sd_server_plugin}; -use tauri_specta::{collect_events, ts}; +use tauri_specta::{collect_events, Builder}; use tokio::task::block_in_place; use tokio::time::sleep; use tracing::error; @@ -181,45 +183,46 @@ async fn main() -> tauri::Result<()> { #[cfg(target_os = "linux")] sd_desktop_linux::normalize_environment(); - let (invoke_handler, register_events) = { - let builder = ts::builder() - .events(collect_events![DragAndDropEvent]) - .commands(tauri_specta::collect_commands![ - app_ready, - reset_spacedrive, - open_logs_dir, - refresh_menu_bar, - reload_webview, - set_menu_bar_item_state, - request_fda_macos, - open_trash_in_os_explorer, - file::open_file_paths, - file::open_ephemeral_files, - file::get_file_path_open_with_apps, - file::get_ephemeral_files_open_with_apps, - file::open_file_path_with, - file::open_ephemeral_file_with, - file::reveal_items, - theme::lock_app_theme, - updater::check_for_update, - updater::install_update - ]) - .config(specta::ts::ExportConfig::default().formatter(specta::ts::formatter::prettier)); + let builder = Builder::new() + .commands(tauri_specta::collect_commands![ + app_ready, + reset_spacedrive, + open_logs_dir, + refresh_menu_bar, + reload_webview, + set_menu_bar_item_state, + request_fda_macos, + open_trash_in_os_explorer, + file::open_file_paths, + file::open_ephemeral_files, + file::get_file_path_open_with_apps, + file::get_ephemeral_files_open_with_apps, + file::open_file_path_with, + file::open_ephemeral_file_with, + file::reveal_items, + theme::lock_app_theme, + updater::check_for_update, + updater::install_update + ]) + .events(collect_events![DragAndDropEvent]); - #[cfg(debug_assertions)] - let builder = builder.path("../src/commands.ts"); - - builder.build().unwrap() - }; + builder + .export( + Typescript::default() + .formatter(specta_typescript::formatter::prettier) + .header("/* eslint-disable */"), + "../src/commands.ts", + ) + .expect("Failed to export typescript bindings"); tauri::Builder::default() - .invoke_handler(invoke_handler) + .invoke_handler(builder.invoke_handler()) .setup(move |app| { // We need a the app handle to determine the data directory now. // This means all the setup code has to be within `setup`, however it doesn't support async so we `block_on`. block_in_place(|| { block_on(async move { - register_events(app); + builder.mount_events(app); let data_dir = app .path() diff --git a/apps/desktop/src-tauri/src/menu.rs b/apps/desktop/src-tauri/src/menu.rs index 4a379534d..1073031f1 100644 --- a/apps/desktop/src-tauri/src/menu.rs +++ b/apps/desktop/src-tauri/src/menu.rs @@ -4,7 +4,7 @@ use serde::Deserialize; use specta::Type; use tauri::{ menu::{Menu, MenuItemKind}, - AppHandle, Manager, Wry, + AppHandle, Emitter, Manager, Wry, }; use tracing::error; diff --git a/apps/desktop/src-tauri/src/updater.rs b/apps/desktop/src-tauri/src/updater.rs index c595b158f..327cc0d0d 100644 --- a/apps/desktop/src-tauri/src/updater.rs +++ b/apps/desktop/src-tauri/src/updater.rs @@ -1,4 +1,4 @@ -use tauri::{plugin::TauriPlugin, Manager, Runtime}; +use tauri::{plugin::TauriPlugin, Emitter, Runtime}; use tauri_plugin_updater::{Update as TauriPluginUpdate, UpdaterExt}; use tokio::sync::Mutex; diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index f6334dc17..c873befb1 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/tauri-apps/tauri/raw/tauri-v2.0.0-beta.17/core/tauri-config-schema/schema.json", + "$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/tauri-v2.0.0-rc.2/core/tauri-config-schema/schema.json", "productName": "Spacedrive", "identifier": "com.spacedrive.desktop", "build": { @@ -41,7 +41,7 @@ }, "bundle": { "active": true, - "targets": ["deb", "msi", "dmg", "updater"], + "targets": ["deb", "msi", "dmg"], "publisher": "Spacedrive Technology Inc.", "copyright": "Spacedrive Technology Inc.", "category": "Productivity", @@ -62,7 +62,6 @@ "depends": ["libc6", "libxdo3", "dbus"] } }, - "macOS": { "minimumSystemVersion": "10.15", "exceptionDomain": null, @@ -71,7 +70,10 @@ }, "windows": { "certificateThumbprint": null, - "webviewInstallMode": { "type": "embedBootstrapper", "silent": true }, + "webviewInstallMode": { + "type": "embedBootstrapper", + "silent": true + }, "digestAlgorithm": "sha256", "timestampUrl": "", "wix": { diff --git a/apps/desktop/src/commands.ts b/apps/desktop/src/commands.ts index e091d5aa0..bde568c77 100644 --- a/apps/desktop/src/commands.ts +++ b/apps/desktop/src/commands.ts @@ -1,11 +1,14 @@ /** tauri-specta globals **/ -import { invoke as TAURI_INVOKE } from '@tauri-apps/api/core'; +import { Channel as TAURI_CHANNEL, invoke as TAURI_INVOKE } from '@tauri-apps/api/core'; import * as TAURI_API_EVENT from '@tauri-apps/api/event'; import { type WebviewWindow as __WebviewWindow__ } from '@tauri-apps/api/webviewWindow'; +/* eslint-disable */ // This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually. +/** user-defined commands **/ + export const commands = { async appReady(): Promise { await TAURI_INVOKE('app_ready'); @@ -146,12 +149,16 @@ export const commands = { } }; +/** user-defined events **/ + export const events = __makeEvents__<{ dragAndDropEvent: DragAndDropEvent; }>({ dragAndDropEvent: 'drag-and-drop-event' }); +/** user-defined constants **/ + /** user-defined types **/ export type AppThemeType = 'Auto' | 'Light' | 'Dark'; diff --git a/apps/mobile/modules/sd-core/android/crate/Cargo.toml b/apps/mobile/modules/sd-core/android/crate/Cargo.toml index afdf90d3f..f727988d2 100644 --- a/apps/mobile/modules/sd-core/android/crate/Cargo.toml +++ b/apps/mobile/modules/sd-core/android/crate/Cargo.toml @@ -1,10 +1,11 @@ [package] -name = "sd-mobile-android" +name = "sd-mobile-android" version = "0.1.0" -rust-version = "1.64" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true +rust-version = "1.64" [lib] # Android can use dynamic linking since all FFI is done via JNI diff --git a/apps/mobile/modules/sd-core/core/Cargo.toml b/apps/mobile/modules/sd-core/core/Cargo.toml index d4f011dee..de8c14503 100644 --- a/apps/mobile/modules/sd-core/core/Cargo.toml +++ b/apps/mobile/modules/sd-core/core/Cargo.toml @@ -1,25 +1,24 @@ [package] -name = "sd-mobile-core" +name = "sd-mobile-core" version = "0.1.0" -rust-version = "1.64" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true +rust-version = "1.64" [dependencies] # Spacedrive Sub-crates -sd-core = { path = "../../../../../core", features = [ - "mobile", -], default-features = false } +sd-core = { path = "../../../../../core", features = ["mobile"], default-features = false } # Workspace dependencies -futures = { workspace = true } -once_cell = { workspace = true } -rspc = { workspace = true } +futures = { workspace = true } +once_cell = { workspace = true } +rspc = { workspace = true } serde_json = { workspace = true } -tokio = { workspace = true } -tracing = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } # Specific Mobile Core dependencies futures-channel = "0.3.30" -futures-locks = "0.7.1" +futures-locks = "0.7.1" diff --git a/apps/mobile/modules/sd-core/ios/crate/Cargo.toml b/apps/mobile/modules/sd-core/ios/crate/Cargo.toml index 693263f3d..db5a25fdb 100644 --- a/apps/mobile/modules/sd-core/ios/crate/Cargo.toml +++ b/apps/mobile/modules/sd-core/ios/crate/Cargo.toml @@ -1,10 +1,11 @@ [package] -name = "sd-mobile-ios" +name = "sd-mobile-ios" version = "0.1.0" -rust-version = "1.64" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true +rust-version = "1.64" [lib] # iOS requires static linking diff --git a/apps/p2p-relay/Cargo.toml b/apps/p2p-relay/Cargo.toml index 9585b7bb7..e85208e69 100644 --- a/apps/p2p-relay/Cargo.toml +++ b/apps/p2p-relay/Cargo.toml @@ -1,20 +1,21 @@ [package] -name = "sd-p2p-relay" +name = "sd-p2p-relay" version = "0.0.1" -publish = false -license.workspace = true -edition.workspace = true + +edition.workspace = true +license.workspace = true +publish = false repository.workspace = true [dependencies] # Workspace dependencies libp2p = { version = "0.53.2", features = [ - "tokio", - "quic", - "relay", "autonat", "macros", -] } + "quic", + "relay", + "tokio" +] } # Update blocked due to custom patch reqwest = { workspace = true, features = ["json", "native-tls-vendored"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } diff --git a/apps/server/Cargo.toml b/apps/server/Cargo.toml index 9c98729fe..841928131 100644 --- a/apps/server/Cargo.toml +++ b/apps/server/Cargo.toml @@ -1,29 +1,30 @@ [package] -name = "sd-server" +name = "sd-server" version = "0.1.0" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true [features] -default = [] -assets = [] ai-models = ["sd-core/ai"] +assets = [] +default = [] [dependencies] # Spacedrive Sub-crates sd-core = { path = "../../core", features = ["ffmpeg", "heif"] } # Workspace dependencies -axum = { workspace = true, features = ["headers"] } -base64 = { workspace = true } -http = { workspace = true } -rspc = { workspace = true, features = ["axum"] } +axum = { workspace = true, features = ["headers"] } +base64 = { workspace = true } +http = { workspace = true } +rspc = { workspace = true, features = ["axum"] } tempfile = { workspace = true } -tokio = { workspace = true, features = ["sync", "rt-multi-thread", "signal"] } -tracing = { workspace = true } +tokio = { workspace = true, features = ["rt-multi-thread", "signal", "sync"] } +tracing = { workspace = true } # Specific Desktop dependencies include_dir = "0.7.3" -mime_guess = "2.0" -secstr = "0.5.1" +mime_guess = "2.0" +secstr = "0.5.1" diff --git a/core/Cargo.toml b/core/Cargo.toml index 27cbeda9f..4f6f4d9d0 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,54 +1,47 @@ [package] -name = "sd-core" +name = "sd-core" version = "0.4.1" -description = "Virtual distributed filesystem engine that powers Spacedrive." -authors = ["Spacedrive Technology Inc "] -rust-version = "1.78" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Spacedrive Technology Inc "] +description = "Virtual distributed filesystem engine that powers Spacedrive." +edition.workspace = true +license.workspace = true +repository.workspace = true +rust-version = "1.78" [features] default = [] # This feature allows features to be disabled when the Core is running on mobile. mobile = [] # This feature controls whether the Spacedrive Core contains functionality which requires FFmpeg. -ffmpeg = [ - "dep:sd-ffmpeg", - "sd-core-heavy-lifting/ffmpeg", - "sd-media-metadata/ffmpeg", -] -heif = ["sd-images/heif"] -ai = ["dep:sd-ai"] +ai = ["dep:sd-ai"] +ffmpeg = ["dep:sd-ffmpeg", "sd-core-heavy-lifting/ffmpeg", "sd-media-metadata/ffmpeg"] +heif = ["sd-images/heif"] [dependencies] # Inner Core Sub-crates sd-core-file-path-helper = { path = "./crates/file-path-helper" } -sd-core-heavy-lifting = { path = "./crates/heavy-lifting" } -sd-core-indexer-rules = { path = "./crates/indexer-rules" } -sd-core-prisma-helpers = { path = "./crates/prisma-helpers" } -sd-core-sync = { path = "./crates/sync" } +sd-core-heavy-lifting = { path = "./crates/heavy-lifting" } +sd-core-indexer-rules = { path = "./crates/indexer-rules" } +sd-core-prisma-helpers = { path = "./crates/prisma-helpers" } +sd-core-sync = { path = "./crates/sync" } # Spacedrive Sub-crates -sd-actors = { path = "../crates/actors" } -sd-ai = { path = "../crates/ai", optional = true } -sd-cloud-api = { path = "../crates/cloud-api" } -sd-ffmpeg = { path = "../crates/ffmpeg", optional = true } -sd-file-ext = { path = "../crates/file-ext" } -sd-images = { path = "../crates/images", features = [ - "rspc", - "serde", - "specta", -] } +sd-actors = { path = "../crates/actors" } +sd-ai = { path = "../crates/ai", optional = true } +sd-cloud-api = { path = "../crates/cloud-api" } +sd-ffmpeg = { path = "../crates/ffmpeg", optional = true } +sd-file-ext = { path = "../crates/file-ext" } +sd-images = { path = "../crates/images", features = ["rspc", "serde", "specta"] } sd-media-metadata = { path = "../crates/media-metadata" } -sd-p2p = { path = "../crates/p2p", features = ["specta"] } -sd-p2p-block = { path = "../crates/p2p/crates/block" } -sd-p2p-proto = { path = "../crates/p2p/crates/proto" } -sd-p2p-tunnel = { path = "../crates/p2p/crates/tunnel" } -sd-prisma = { path = "../crates/prisma" } -sd-sync = { path = "../crates/sync" } -sd-task-system = { path = "../crates/task-system" } -sd-utils = { path = "../crates/utils" } +sd-p2p = { path = "../crates/p2p", features = ["specta"] } +sd-p2p-block = { path = "../crates/p2p/crates/block" } +sd-p2p-proto = { path = "../crates/p2p/crates/proto" } +sd-p2p-tunnel = { path = "../crates/p2p/crates/tunnel" } +sd-prisma = { path = "../crates/prisma" } +sd-sync = { path = "../crates/sync" } +sd-task-system = { path = "../crates/task-system" } +sd-utils = { path = "../crates/utils" } # Workspace dependencies async-channel = { workspace = true } @@ -62,7 +55,7 @@ directories = { workspace = true } futures = { workspace = true } futures-concurrency = { workspace = true } gix-ignore = { workspace = true } -hyper = { workspace = true, features = ["http1", "server", "client"] } +hyper = { workspace = true, features = ["client", "http1", "server"] } image = { workspace = true } itertools = { workspace = true } libc = { workspace = true } @@ -75,14 +68,7 @@ reqwest = { workspace = true, features = ["json", "native-tls-vendored"] } rmp = { workspace = true } rmp-serde = { workspace = true } rmpv = { workspace = true } -rspc = { workspace = true, features = [ - "axum", - "uuid", - "chrono", - "tracing", - "alpha", - "unstable", -] } +rspc = { workspace = true, features = ["alpha", "axum", "chrono", "tracing", "unstable", "uuid"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } specta = { workspace = true } @@ -92,26 +78,26 @@ strum_macros = { workspace = true } tempfile = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = [ - "sync", - "rt-multi-thread", "io-util", "macros", - "time", "process", + "rt-multi-thread", + "sync", + "time" ] } tokio-stream = { workspace = true, features = ["fs"] } tokio-util = { workspace = true, features = ["io"] } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } -uuid = { workspace = true, features = ["v4", "serde"] } +uuid = { workspace = true, features = ["serde", "v4"] } webp = { workspace = true } # Specific Core dependencies async-recursion = "1.1" async-stream = "0.3.5" -aws-sdk-s3 = { version = "1.34", features = ["behavior-version-latest"] } aws-config = "1.5" aws-credential-types = "1.2" +aws-sdk-s3 = { version = "1.34", features = ["behavior-version-latest"] } bytes = "1.6" ctor = "0.2.8" flate2 = "1.0" @@ -120,8 +106,8 @@ http-body = "0.4.6" # Update blocked by http http-range = "0.1.5" int-enum = "0.5" # Update blocked due to API breaking changes mini-moka = "0.10.3" -notify = { git = "https://github.com/notify-rs/notify.git", rev = "c3929ed114fbb0bc7457a9a498260461596b00ca", default-features = false, features = [ - "macos_fsevent", +notify = { git = "https://github.com/notify-rs/notify.git", rev = "c3929ed114", default-features = false, features = [ + "macos_fsevent" ] } serde-hashkey = "0.4.5" serde_repr = "0.1.19" @@ -134,11 +120,11 @@ tracing-appender = "0.2.3" # Override features of transitive dependencies [dependencies.openssl] -version = "=0.10.64" features = ["vendored"] +version = "0.10.66" [dependencies.openssl-sys] -version = "=0.9.102" features = ["vendored"] +version = "0.9.103" # Platform-specific dependencies [target.'cfg(target_os = "macos")'.dependencies] @@ -155,8 +141,8 @@ trash = "4.1" icrate = { version = "0.1.2", features = [ "Foundation", "Foundation_NSFileManager", - "Foundation_NSString", "Foundation_NSNumber", + "Foundation_NSString" ] } [target.'cfg(target_os = "android")'.dependencies] @@ -164,7 +150,7 @@ tracing-android = "0.2.0" [dev-dependencies] # Workspace dependencies -globset = { workspace = true } +globset = { workspace = true } tracing-test = { workspace = true } # Specific Core dependencies diff --git a/core/crates/file-path-helper/Cargo.toml b/core/crates/file-path-helper/Cargo.toml index a769102ee..f3e408e43 100644 --- a/core/crates/file-path-helper/Cargo.toml +++ b/core/crates/file-path-helper/Cargo.toml @@ -1,30 +1,31 @@ [package] -name = "sd-core-file-path-helper" +name = "sd-core-file-path-helper" version = "0.1.0" -authors = ["Ericson Soares "] -readme = "README.md" -rust-version = "1.75" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Ericson Soares "] +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true +rust-version = "1.75" [dependencies] # Inner Core Sub-crates sd-core-prisma-helpers = { path = "../prisma-helpers" } -sd-core-sync = { path = "../sync" } +sd-core-sync = { path = "../sync" } # Spacedrive Sub-crates sd-prisma = { path = "../../../crates/prisma" } -sd-utils = { path = "../../../crates/utils" } +sd-utils = { path = "../../../crates/utils" } # Workspace dependencies -chrono = { workspace = true, features = ["serde"] } +chrono = { workspace = true, features = ["serde"] } prisma-client-rust = { workspace = true } -regex = { workspace = true } -serde = { workspace = true, features = ["derive"] } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["fs"] } -tracing = { workspace = true } +regex = { workspace = true } +serde = { workspace = true, features = ["derive"] } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["fs"] } +tracing = { workspace = true } [target.'cfg(windows)'.dependencies] winapi-util = "0.1.8" diff --git a/core/crates/heavy-lifting/Cargo.toml b/core/crates/heavy-lifting/Cargo.toml index 6729096d9..1dcc11bb5 100644 --- a/core/crates/heavy-lifting/Cargo.toml +++ b/core/crates/heavy-lifting/Cargo.toml @@ -1,10 +1,11 @@ [package] -name = "sd-core-heavy-lifting" +name = "sd-core-heavy-lifting" version = "0.1.0" -authors = ["Ericson Soares "] -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Ericson Soares "] +edition.workspace = true +license.workspace = true +repository.workspace = true [features] default = [] @@ -14,48 +15,48 @@ ffmpeg = ["dep:sd-ffmpeg"] [dependencies] # Inner Core Sub-crates sd-core-file-path-helper = { path = "../file-path-helper" } -sd-core-indexer-rules = { path = "../indexer-rules" } -sd-core-prisma-helpers = { path = "../prisma-helpers" } -sd-core-sync = { path = "../sync" } +sd-core-indexer-rules = { path = "../indexer-rules" } +sd-core-prisma-helpers = { path = "../prisma-helpers" } +sd-core-sync = { path = "../sync" } # Spacedrive Sub-crates -sd-ffmpeg = { path = "../../../crates/ffmpeg", optional = true } -sd-file-ext = { path = "../../../crates/file-ext" } -sd-images = { path = "../../../crates/images" } +sd-ffmpeg = { path = "../../../crates/ffmpeg", optional = true } +sd-file-ext = { path = "../../../crates/file-ext" } +sd-images = { path = "../../../crates/images" } sd-media-metadata = { path = "../../../crates/media-metadata" } -sd-prisma = { path = "../../../crates/prisma" } -sd-sync = { path = "../../../crates/sync" } -sd-task-system = { path = "../../../crates/task-system" } -sd-utils = { path = "../../../crates/utils" } +sd-prisma = { path = "../../../crates/prisma" } +sd-sync = { path = "../../../crates/sync" } +sd-task-system = { path = "../../../crates/task-system" } +sd-utils = { path = "../../../crates/utils" } # Workspace dependencies -async-channel = { workspace = true } -async-trait = { workspace = true } -blake3 = { workspace = true } -chrono = { workspace = true, features = ["serde"] } -futures = { workspace = true } +async-channel = { workspace = true } +async-trait = { workspace = true } +blake3 = { workspace = true } +chrono = { workspace = true, features = ["serde"] } +futures = { workspace = true } futures-concurrency = { workspace = true } -globset = { workspace = true } -image = { workspace = true } -itertools = { workspace = true } -lending-stream = { workspace = true } -once_cell = { workspace = true } -prisma-client-rust = { workspace = true } -rmpv = { workspace = true } -rmp-serde = { workspace = true } -rspc = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -specta = { workspace = true } -static_assertions = { workspace = true } -strum = { workspace = true, features = ["derive", "phf"] } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["fs", "sync", "parking_lot"] } -tokio-stream = { workspace = true, features = ["fs"] } -tracing = { workspace = true } -uuid = { workspace = true, features = ["v4", "serde"] } -webp = { workspace = true } +globset = { workspace = true } +image = { workspace = true } +itertools = { workspace = true } +lending-stream = { workspace = true } +once_cell = { workspace = true } +prisma-client-rust = { workspace = true } +rmp-serde = { workspace = true } +rmpv = { workspace = true } +rspc = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +specta = { workspace = true } +static_assertions = { workspace = true } +strum = { workspace = true, features = ["derive", "phf"] } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["fs", "parking_lot", "sync"] } +tokio-stream = { workspace = true, features = ["fs"] } +tracing = { workspace = true } +uuid = { workspace = true, features = ["serde", "v4"] } +webp = { workspace = true } [dev-dependencies] -tempfile = { workspace = true } +tempfile = { workspace = true } tracing-test = { workspace = true } diff --git a/core/crates/indexer-rules/Cargo.toml b/core/crates/indexer-rules/Cargo.toml index 10f5f476b..db7a6dcb3 100644 --- a/core/crates/indexer-rules/Cargo.toml +++ b/core/crates/indexer-rules/Cargo.toml @@ -1,34 +1,32 @@ [package] -name = "sd-core-indexer-rules" +name = "sd-core-indexer-rules" version = "0.1.0" -authors = [ - "Ericson Soares ", - "Vítor Vasconcellos ", -] -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Ericson Soares ", "Vítor Vasconcellos "] +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] # Spacedrive Sub-crates sd-prisma = { path = "../../../crates/prisma" } -sd-utils = { path = "../../../crates/utils" } +sd-utils = { path = "../../../crates/utils" } # Workspace dependencies -chrono = { workspace = true } +chrono = { workspace = true } futures-concurrency = { workspace = true } -gix-ignore = { workspace = true, features = ["serde"] } -globset = { workspace = true, features = ["serde1"] } -once_cell = { workspace = true } -prisma-client-rust = { workspace = true } -rmp-serde = { workspace = true } -rspc = { workspace = true } -serde = { workspace = true, features = ["derive"] } -specta = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["fs"] } -tracing = { workspace = true } -uuid = { workspace = true, features = ["v4", "serde"] } +gix-ignore = { workspace = true, features = ["serde"] } +globset = { workspace = true, features = ["serde1"] } +once_cell = { workspace = true } +prisma-client-rust = { workspace = true } +rmp-serde = { workspace = true } +rspc = { workspace = true } +serde = { workspace = true, features = ["derive"] } +specta = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["fs"] } +tracing = { workspace = true } +uuid = { workspace = true, features = ["serde", "v4"] } [dev-dependencies] tempfile = { workspace = true } diff --git a/core/crates/prisma-helpers/Cargo.toml b/core/crates/prisma-helpers/Cargo.toml index 66d1be763..6a3a47a4c 100644 --- a/core/crates/prisma-helpers/Cargo.toml +++ b/core/crates/prisma-helpers/Cargo.toml @@ -1,18 +1,19 @@ [package] -name = "sd-core-prisma-helpers" +name = "sd-core-prisma-helpers" version = "0.1.0" -authors = ["Ericson Soares "] -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Ericson Soares "] +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] # Spacedrive Sub-crates sd-prisma = { path = "../../../crates/prisma" } -sd-utils = { path = "../../../crates/utils" } +sd-utils = { path = "../../../crates/utils" } # Workspace dependencies prisma-client-rust = { workspace = true } -serde = { workspace = true, features = ["derive"] } -specta = { workspace = true } -uuid = { workspace = true, features = ["v4", "serde"] } +serde = { workspace = true, features = ["derive"] } +specta = { workspace = true } +uuid = { workspace = true, features = ["serde", "v4"] } diff --git a/core/crates/sync/Cargo.toml b/core/crates/sync/Cargo.toml index 85858de5c..84ca5c3d1 100644 --- a/core/crates/sync/Cargo.toml +++ b/core/crates/sync/Cargo.toml @@ -1,6 +1,7 @@ [package] -name = "sd-core-sync" +name = "sd-core-sync" version = "0.0.0" + edition = "2021" [features] @@ -8,27 +9,27 @@ default = [] [dependencies] # Spacedrive Sub-crates -sd-prisma = { path = "../../../crates/prisma" } -sd-sync = { path = "../../../crates/sync" } -sd-utils = { path = "../../../crates/utils" } sd-actors = { path = "../../../crates/actors" } +sd-prisma = { path = "../../../crates/prisma" } +sd-sync = { path = "../../../crates/sync" } +sd-utils = { path = "../../../crates/utils" } # Workspace dependencies -async-channel = { workspace = true } -futures = { workspace = true } +async-channel = { workspace = true } +futures = { workspace = true } futures-concurrency = { workspace = true } -prisma-client-rust = { workspace = true, features = ["rspc"] } -rmpv = { workspace = true } -rmp-serde = { workspace = true } -rspc = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -tokio = { workspace = true } -thiserror = { workspace = true } -tracing = { workspace = true } -uhlc = { workspace = true } -uuid = { workspace = true } +prisma-client-rust = { workspace = true, features = ["rspc"] } +rmp-serde = { workspace = true } +rmpv = { workspace = true } +rspc = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } +uhlc = { workspace = true } +uuid = { workspace = true } [dev-dependencies] -tracing-test = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } +tracing-test = { workspace = true } diff --git a/core/prisma/migrations/migration_lock.toml b/core/prisma/migrations/migration_lock.toml index e5e5c4705..6fcf33daf 100644 --- a/core/prisma/migrations/migration_lock.toml +++ b/core/prisma/migrations/migration_lock.toml @@ -1,3 +1,3 @@ # Please do not edit this file manually # It should be added in your version-control system (i.e. Git) -provider = "sqlite" \ No newline at end of file +provider = "sqlite" diff --git a/core/src/util/unsafe_streamed_query.rs b/core/src/util/unsafe_streamed_query.rs index 1e3954512..9a316373a 100644 --- a/core/src/util/unsafe_streamed_query.rs +++ b/core/src/util/unsafe_streamed_query.rs @@ -3,7 +3,7 @@ use std::pin::pin; use async_stream::stream; use futures::{Stream, StreamExt}; use serde::Serialize; -use specta::{reference::Reference, DataType, Generics, Type, TypeMap}; +use specta::{DataType, Generics, Type, TypeMap}; #[derive(Serialize)] #[serde(untagged)] @@ -16,10 +16,6 @@ impl Type for Output { fn inline(type_map: &mut TypeMap, generics: Generics) -> DataType { T::inline(type_map, generics) } - - fn reference(type_map: &mut TypeMap, generics: &[DataType]) -> Reference { - T::reference(type_map, generics) - } } // Marked as unsafe as the types are a lie and this should always be used with `useUnsafeStreamedQuery` diff --git a/crates/actors/Cargo.toml b/crates/actors/Cargo.toml index 29fb43a88..65d33cff7 100644 --- a/crates/actors/Cargo.toml +++ b/crates/actors/Cargo.toml @@ -1,13 +1,14 @@ [package] -name = "sd-actors" +name = "sd-actors" version = "0.1.0" -license.workspace = true -edition.workspace = true + +edition.workspace = true +license.workspace = true repository.workspace = true [dependencies] -async-channel = { workspace = true } -futures = { workspace = true } +async-channel = { workspace = true } +futures = { workspace = true } pin-project-lite = { workspace = true } -tokio = { workspace = true } -tracing = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } diff --git a/crates/ai/Cargo.toml b/crates/ai/Cargo.toml index a1cb437e6..73e188559 100644 --- a/crates/ai/Cargo.toml +++ b/crates/ai/Cargo.toml @@ -1,63 +1,64 @@ [package] -name = "sd-ai" +name = "sd-ai" version = "0.1.0" -authors = ["Ericson Soares "] -readme = "README.md" -description = "A simple library to generate video thumbnails using ffmpeg with the webp format" -rust-version = "1.75" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Ericson Soares "] +description = "A simple library to generate video thumbnails using ffmpeg with the webp format" +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true +rust-version = "1.75" [dependencies] # Inner Core Sub-crates sd-core-file-path-helper = { path = "../../core/crates/file-path-helper" } -sd-core-prisma-helpers = { path = "../../core/crates/prisma-helpers" } -sd-core-sync = { path = "../../core/crates/sync" } +sd-core-prisma-helpers = { path = "../../core/crates/prisma-helpers" } +sd-core-sync = { path = "../../core/crates/sync" } # Spacedrive Sub-crates sd-prisma = { path = "../prisma" } -sd-sync = { path = "../sync" } -sd-utils = { path = "../utils" } +sd-sync = { path = "../sync" } +sd-utils = { path = "../utils" } -async-channel = { workspace = true } -chrono = { workspace = true, features = ["serde"] } -futures = { workspace = true } +async-channel = { workspace = true } +chrono = { workspace = true, features = ["serde"] } +futures = { workspace = true } futures-concurrency = { workspace = true } -image = { workspace = true } -once_cell = { workspace = true } -prisma-client-rust = { workspace = true } -reqwest = { workspace = true, features = ["stream", "native-tls-vendored"] } -rmp-serde = { workspace = true } -rmpv = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["fs"] } -tokio-stream = { workspace = true } -tracing = { workspace = true } -uuid = { workspace = true, features = ["v4", "serde"] } +image = { workspace = true } +once_cell = { workspace = true } +prisma-client-rust = { workspace = true } +reqwest = { workspace = true, features = ["native-tls-vendored", "stream"] } +rmp-serde = { workspace = true } +rmpv = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["fs"] } +tokio-stream = { workspace = true } +tracing = { workspace = true } +uuid = { workspace = true, features = ["serde", "v4"] } # Note: half and ndarray version must be the same as used in ort -half = { version = "2.1", features = ['num-traits'] } +half = { version = "2.1", features = ['num-traits'] } ndarray = "0.15" -url = '2.5.0' +url = '2.5.0' # Microsoft does not provide a release for osx-gpu. See: https://github.com/microsoft/onnxruntime/releases # "gpu" means CUDA or TensorRT EP. Thus, the ort crate cannot download them at build time. # Ref: https://github.com/pykeio/ort/blob/d7defd1862969b4b44f7f3f4b9c72263690bd67b/build.rs#L148 [target.'cfg(target_os = "windows")'.dependencies] ort = { version = "=2.0.0-rc.0", default-features = false, features = [ - "ndarray", + "directml", "half", "load-dynamic", - "directml", + "ndarray" ] } [target.'cfg(target_os = "linux")'.dependencies] ort = { version = "=2.0.0-rc.0", default-features = false, features = [ - "ndarray", "half", - "xnnpack", + "ndarray", + "xnnpack" ] } # [target.'cfg(target_os = "android")'.dependencies] # ort = { version = "=2.0.0-rc.0", default-features = false, features = [ @@ -71,9 +72,9 @@ ort = { version = "=2.0.0-rc.0", default-features = false, features = [ # ] } [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] ort = { version = "=2.0.0-rc.0", features = [ - "ndarray", + "coreml", "half", "load-dynamic", - "coreml", - "xnnpack", + "ndarray", + "xnnpack" ] } diff --git a/crates/cloud-api/Cargo.toml b/crates/cloud-api/Cargo.toml index 792947700..49c78576a 100644 --- a/crates/cloud-api/Cargo.toml +++ b/crates/cloud-api/Cargo.toml @@ -1,8 +1,9 @@ [package] -name = "sd-cloud-api" +name = "sd-cloud-api" version = "0.1.0" -license.workspace = true -edition.workspace = true + +edition.workspace = true +license.workspace = true repository.workspace = true [dependencies] @@ -10,13 +11,13 @@ repository.workspace = true sd-p2p = { path = "../p2p" } # Workspace dependencies -base64 = { workspace = true } -reqwest = { workspace = true, features = ["native-tls-vendored"] } -rmpv = { workspace = true } -rspc = { workspace = true } -serde = { workspace = true } +base64 = { workspace = true } +reqwest = { workspace = true, features = ["native-tls-vendored"] } +rmpv = { workspace = true } +rspc = { workspace = true } +serde = { workspace = true } serde_json = { workspace = true } -specta = { workspace = true } -thiserror = { workspace = true } -tracing = { workspace = true } -uuid = { workspace = true } +specta = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } +uuid = { workspace = true } diff --git a/crates/crypto/Cargo.toml b/crates/crypto/Cargo.toml index 4b570d2e2..3e8810500 100644 --- a/crates/crypto/Cargo.toml +++ b/crates/crypto/Cargo.toml @@ -1,49 +1,42 @@ [package] -name = "sd-crypto" -rust-version = "1.72" +name = "sd-crypto" version = "0.0.0" + authors = ["Jake Robinson "] description = """ A cryptographic library that provides safe and high-level encryption, hashing, and encoding interfaces. """ -readme = "README.md" +edition.workspace = true keywords = ["crypto"] -edition = { workspace = true } -license = { workspace = true } -repository = { workspace = true } +license.workspace = true +readme = "README.md" +repository.workspace = true +rust-version = "1.72" + [features] -sys = [] -serde = [ - "dep:serde", - "dep:serde_json", - "dep:serde-big-array", - "dep:serdect", - "bincode/serde", -] +experimental = [] keyring = ["dep:linux-keyutils", "dep:security-framework"] secret-service = [ - "keyring", "dep:secret-service", "dep:zbus", + "keyring" ] # explicit enabling required as the secret service api requires `zbus` and is messy -experimental = [] +serde = ["bincode/serde", "dep:serde", "dep:serde-big-array", "dep:serde_json", "dep:serdect"] +sys = [] [dependencies] # rng -rand_core = "0.9.0-alpha.0" -rand = "0.9.0-alpha.0" +rand = "0.9.0-alpha.0" rand_chacha = "0.9.0-alpha.0" +rand_core = "0.9.0-alpha.0" # hashing -argon2 = { version = "0.6.0-pre.0", default_features = false, features = [ - "alloc", - "zeroize", -] } +argon2 = { version = "0.6.0-pre.0", default_features = false, features = ["alloc", "zeroize"] } balloon-hash = { version = "0.5.0-pre.0", default_features = false, features = [ "alloc", - "zeroize", + "zeroize" ] } blake3 = { version = "1.5.0", features = ["traits-preview", "zeroize"] } @@ -51,27 +44,27 @@ blake3 = { version = "1.5.0", features = ["traits-preview", "zeroize"] } cmov = "0.3.1" # aeads -aes-gcm-siv = "0.11.1" +aead = { version = "0.5.2", default-features = false, features = ["stream"] } +aes-gcm-siv = "0.11.1" +bincode = { version = "2.0.0-rc.3", features = ["alloc", "derive"] } chacha20poly1305 = "0.10.1" -thiserror = "1.0.57" -aead = { version = "0.5.2", default-features = false, features = ["stream"] } -bincode = { version = "2.0.0-rc.3", features = ["derive", "alloc"] } +thiserror = "1.0.57" -zeroize = { version = "1.7.0", features = ["derive", "aarch64"] } +zeroize = { version = "1.7.0", features = ["aarch64", "derive"] } -serde = { version = "1.0.197", features = ["derive"], optional = true } -serde_json = { version = "1.0.114", optional = true } +serde = { version = "1.0.197", features = ["derive"], optional = true } serde-big-array = { version = "0.5.1", optional = true } -serdect = { version = "0.3.0-pre.0", optional = true } +serde_json = { version = "1.0.114", optional = true } +serdect = { version = "0.3.0-pre.0", optional = true } specta = { workspace = true, optional = true } # for asynchronous crypto tokio = { workspace = true, features = [ "io-util", - "rt-multi-thread", "macros", - "sync", + "rt-multi-thread", + "sync" ], optional = true } redb = "1.5.0" @@ -91,14 +84,14 @@ uuid = { version = "1.7.0", features = ["v4"] } linux-keyutils = { version = "0.2.4", features = ["std"], optional = true } secret-service = { version = "3.0.1", features = [ "crypto-rust", - "rt-tokio-crypto-rust", + "rt-tokio-crypto-rust" ], optional = true } # this needs to remain at versions < 4, as they made some changes and i can't get it # to compile for the time being zbus = { version = "4.0", default_features = false, features = [ - "tokio", "blocking", + "tokio" ], optional = true } [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] @@ -106,44 +99,44 @@ security-framework = { version = "2.9.2", optional = true } [dev-dependencies] criterion = "0.5.1" -paste = "1.0.14" -tempfile = "3.10.1" +paste = "1.0.14" +tempfile = "3.10.1" [clippy] allow = ["unwrap_in_tests"] [[bench]] -path = "benches/crypto/aes-256-gcm-siv.rs" -name = "aes-256-gcm-siv" harness = false +name = "aes-256-gcm-siv" +path = "benches/crypto/aes-256-gcm-siv.rs" [[bench]] -path = "benches/crypto/xchacha20-poly1305.rs" -name = "xchacha20-poly1305" harness = false +name = "xchacha20-poly1305" +path = "benches/crypto/xchacha20-poly1305.rs" [[bench]] -path = "benches/hashing/argon2id.rs" -name = "argon2id" -bench = false +bench = false harness = false +name = "argon2id" +path = "benches/hashing/argon2id.rs" [[bench]] -path = "benches/hashing/blake3-balloon.rs" -name = "blake3-balloon" -bench = false +bench = false harness = false +name = "blake3-balloon" +path = "benches/hashing/blake3-balloon.rs" [[bench]] -path = "benches/hashing/blake3.rs" -name = "blake3" harness = false +name = "blake3" +path = "benches/hashing/blake3.rs" [[bench]] -path = "benches/hashing/blake3-kdf.rs" -name = "blake3-kdf" harness = false +name = "blake3-kdf" +path = "benches/hashing/blake3-kdf.rs" [[example]] -path = "examples/file_encryption.rs" name = "file_encryption" +path = "examples/file_encryption.rs" diff --git a/crates/fda/Cargo.toml b/crates/fda/Cargo.toml index 24f1a86e1..25c3e5507 100644 --- a/crates/fda/Cargo.toml +++ b/crates/fda/Cargo.toml @@ -1,10 +1,11 @@ [package] -name = "sd-fda" +name = "sd-fda" version = "0.1.0" -authors = ["Jake Robinson "] -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Jake Robinson "] +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] thiserror = { workspace = true } diff --git a/crates/ffmpeg/Cargo.toml b/crates/ffmpeg/Cargo.toml index 9f84182f2..ea6e3ff0c 100644 --- a/crates/ffmpeg/Cargo.toml +++ b/crates/ffmpeg/Cargo.toml @@ -1,33 +1,31 @@ [package] -name = "sd-ffmpeg" +name = "sd-ffmpeg" version = "0.1.0" -authors = [ - "Ericson Soares ", - "Vítor Vasconcellos ", -] -readme = "README.md" -description = "A simple library to generate video thumbnails using ffmpeg with the webp format" -rust-version = "1.78" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Ericson Soares ", "Vítor Vasconcellos "] +description = "A simple library to generate video thumbnails using ffmpeg with the webp format" +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true +rust-version = "1.78" [dependencies] # Spacedrive Sub-crates sd-utils = { path = "../utils" } # Workspace dependencies -chrono = { workspace = true, features = ["serde"] } -image = { workspace = true } -libc = { workspace = true } +chrono = { workspace = true, features = ["serde"] } +image = { workspace = true } +libc = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["fs", "rt"] } -tracing = { workspace = true } -webp = { workspace = true } +tokio = { workspace = true, features = ["fs", "rt"] } +tracing = { workspace = true } +webp = { workspace = true } # Specific FFmpeg dependencies ffmpeg-sys-next = "7.0" [dev-dependencies] tempfile = { workspace = true } -tokio = { workspace = true, features = ["fs", "rt", "macros"] } +tokio = { workspace = true, features = ["fs", "macros", "rt"] } diff --git a/crates/file-ext/Cargo.toml b/crates/file-ext/Cargo.toml index 0ba69efe6..a7b357854 100644 --- a/crates/file-ext/Cargo.toml +++ b/crates/file-ext/Cargo.toml @@ -1,21 +1,19 @@ [package] -name = "sd-file-ext" +name = "sd-file-ext" version = "0.0.0" -authors = [ - "Brendan Allen ", - "Jamie Pine ", -] -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Brendan Allen ", "Jamie Pine "] +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -specta = { workspace = true } -strum = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +specta = { workspace = true } +strum = { workspace = true, features = ["derive"] } strum_macros = { workspace = true } -tokio = { workspace = true, features = ["fs", "rt", "io-util"] } +tokio = { workspace = true, features = ["fs", "io-util", "rt"] } [dev-dependencies] -tokio = { workspace = true, features = ["fs", "rt", "macros"] } +tokio = { workspace = true, features = ["fs", "macros", "rt"] } diff --git a/crates/images/Cargo.toml b/crates/images/Cargo.toml index 73fc9fd77..b602584da 100644 --- a/crates/images/Cargo.toml +++ b/crates/images/Cargo.toml @@ -1,38 +1,29 @@ [package] -name = "sd-images" +name = "sd-images" version = "0.1.0" -authors = [ - "Jake Robinson ", - "Vítor Vasconcellos ", -] -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Jake Robinson ", "Vítor Vasconcellos "] +edition.workspace = true +license.workspace = true +repository.workspace = true [features] heif = ["dep:libheif-rs", "dep:libheif-sys"] [dependencies] # Workspace dependencies -image = { workspace = true } +image = { workspace = true } once_cell = { workspace = true } -rspc = { workspace = true, optional = true } # error conversion -specta = { workspace = true, optional = true } -serde = { workspace = true, optional = true, features = ["derive"] } +rspc = { workspace = true, optional = true } # error conversion +serde = { workspace = true, optional = true, features = ["derive"] } +specta = { workspace = true, optional = true } thiserror = { workspace = true } -tracing = { workspace = true } +tracing = { workspace = true } # Specific Images dependencies -bincode = { version = "=2.0.0-rc.3", features = [ - "derive", - "alloc", -], optional = true } +bincode = { version = "=2.0.0-rc.3", features = ["alloc", "derive"], optional = true } # Disable defaults for libheif* to avoid bindgen and use pre-compiled headers -libheif-rs = { version = "1.0", default-features = false, optional = true } -libheif-sys = { version = "2.1", default-features = false, optional = true } -pdfium-render = { version = "0.8.15", features = [ - "sync", - "image", - "thread_safe", -] } -resvg = "0.42.0" +libheif-rs = { version = "1.0", default-features = false, optional = true } +libheif-sys = { version = "2.1", default-features = false, optional = true } +pdfium-render = { version = "0.8.15", features = ["image", "sync", "thread_safe"] } +resvg = "0.43.0" diff --git a/crates/media-metadata/Cargo.toml b/crates/media-metadata/Cargo.toml index a0ed6c83f..672f4c160 100644 --- a/crates/media-metadata/Cargo.toml +++ b/crates/media-metadata/Cargo.toml @@ -1,10 +1,11 @@ [package] -name = "sd-media-metadata" +name = "sd-media-metadata" version = "0.1.0" + authors = [ - "Jake Robinson ", - "Vítor Vasconcellos ", "Ericson Soares ", + "Jake Robinson ", + "Vítor Vasconcellos " ] edition = "2021" @@ -14,17 +15,17 @@ ffmpeg = ["dep:sd-ffmpeg"] [dependencies] # Spacedrive Sub-crates sd-ffmpeg = { path = "../ffmpeg", optional = true } -sd-utils = { path = "../utils" } +sd-utils = { path = "../utils" } # Workspace dependencies -chrono = { workspace = true, features = ["serde"] } -image = { workspace = true } -rand = { workspace = true } -serde = { workspace = true, features = ["derive"] } +chrono = { workspace = true, features = ["serde"] } +image = { workspace = true } +rand = { workspace = true } +serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } -specta = { workspace = true, features = ["chrono"] } -thiserror = { workspace = true } -tokio = { workspace = true } +specta = { workspace = true, features = ["chrono"] } +thiserror = { workspace = true } +tokio = { workspace = true } # Specific Media Metadata dependencies kamadak-exif = "0.5.5" diff --git a/crates/p2p/Cargo.toml b/crates/p2p/Cargo.toml index c670181f8..ead36f24f 100644 --- a/crates/p2p/Cargo.toml +++ b/crates/p2p/Cargo.toml @@ -1,61 +1,54 @@ [package] -name = "sd-p2p" +name = "sd-p2p" version = "0.2.0" -description = "Rust Peer to Peer Networking Library" -authors = ["Oscar Beaumont "] -readme = "README.md" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +authors = ["Oscar Beaumont "] +description = "Rust Peer to Peer Networking Library" +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true # TODO: Remove features??? and dependencies [features] default = [] -specta = [] +specta = [] [dependencies] # Workspace dependencies -base64 = { workspace = true } -base91 = { workspace = true } -ed25519-dalek = { workspace = true } -futures = { workspace = true } +base64 = { workspace = true } +base91 = { workspace = true } +ed25519-dalek = { workspace = true } +futures = { workspace = true } pin-project-lite = { workspace = true } -reqwest = { workspace = true } -rmp-serde = { workspace = true } -serde = { workspace = true, features = ["derive"] } -specta = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = [ - "macros", - "sync", - "time", - "io-util", - "fs", -] } -tokio-stream = { workspace = true, features = ["sync"] } -tokio-util = { workspace = true, features = ["compat"] } -tracing = { workspace = true } -uuid = { workspace = true, features = ["serde"] } +reqwest = { workspace = true } +rmp-serde = { workspace = true } +serde = { workspace = true, features = ["derive"] } +specta = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["fs", "io-util", "macros", "sync", "time"] } +tokio-stream = { workspace = true, features = ["sync"] } +tokio-util = { workspace = true, features = ["compat"] } +tracing = { workspace = true } +uuid = { workspace = true, features = ["serde"] } # Specific P2P dependencies dns-lookup = "2.0" flume = "=0.11.0" # Must match version used by `mdns-sd` futures-core = "0.3.30" hash_map_diff = "0.2.0" -if-watch = { version = "=3.2.0", features = [ - "tokio", -] } # Override features used by libp2p-quic +if-watch = { version = "=3.2.0", features = ["tokio"] } # Override features used by libp2p-quic libp2p = { version = "=0.53.2", features = [ - "tokio", - "serde", - "macros", - "quic", "autonat", - "relay", - "yamux", - "noise", "dcutr", + "macros", + "noise", + "quic", + "relay", + "serde", + "tokio", + "yamux" ] } # Update blocked due to custom patch libp2p-stream = "=0.1.0-alpha" # Update blocked due to custom patch mdns-sd = "0.11.1" @@ -67,6 +60,6 @@ sync_wrapper = "1.0" zeroize = { version = "1.8", features = ["derive"] } [dev-dependencies] -tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } +tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } tracing-subscriber = { workspace = true } -uuid = { workspace = true, features = ["v4"] } +uuid = { workspace = true, features = ["v4"] } diff --git a/crates/p2p/crates/block/Cargo.toml b/crates/p2p/crates/block/Cargo.toml index 033345e04..77f115035 100644 --- a/crates/p2p/crates/block/Cargo.toml +++ b/crates/p2p/crates/block/Cargo.toml @@ -1,18 +1,19 @@ [package] -name = "sd-p2p-block" +name = "sd-p2p-block" version = "0.1.0" -authors = ["Oscar Beaumont "] -license.workspace = true -edition.workspace = true + +authors = ["Oscar Beaumont "] +edition.workspace = true +license.workspace = true repository.workspace = true [dependencies] # Spacedrive Sub-crates -sd-p2p = { path = "../../" } +sd-p2p = { path = "../../" } sd-p2p-proto = { path = "../proto" } # Workspace dependencies thiserror = { workspace = true } -tokio = { workspace = true } -tracing = { workspace = true } -uuid = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } +uuid = { workspace = true } diff --git a/crates/p2p/crates/proto/Cargo.toml b/crates/p2p/crates/proto/Cargo.toml index 51bd00b91..685aaf4ec 100644 --- a/crates/p2p/crates/proto/Cargo.toml +++ b/crates/p2p/crates/proto/Cargo.toml @@ -1,13 +1,14 @@ [package] -name = "sd-p2p-proto" +name = "sd-p2p-proto" version = "0.1.0" -authors = ["Oscar Beaumont "] -license.workspace = true -edition.workspace = true + +authors = ["Oscar Beaumont "] +edition.workspace = true +license.workspace = true repository.workspace = true [dependencies] ed25519-dalek = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["io-util"] } -uuid = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["io-util"] } +uuid = { workspace = true } diff --git a/crates/p2p/crates/tunnel/Cargo.toml b/crates/p2p/crates/tunnel/Cargo.toml index 816a5cef1..bbedd8b1d 100644 --- a/crates/p2p/crates/tunnel/Cargo.toml +++ b/crates/p2p/crates/tunnel/Cargo.toml @@ -1,17 +1,18 @@ [package] -name = "sd-p2p-tunnel" +name = "sd-p2p-tunnel" version = "0.1.0" -authors = ["Oscar Beaumont "] -license.workspace = true -edition.workspace = true + +authors = ["Oscar Beaumont "] +edition.workspace = true +license.workspace = true repository.workspace = true [dependencies] # Spacedrive Sub-crates -sd-p2p = { path = "../../" } +sd-p2p = { path = "../../" } sd-p2p-proto = { path = "../proto" } # Workspace dependencies -tokio = { workspace = true, features = ["io-util"] } thiserror = { workspace = true } -uuid = { workspace = true, features = ["v4"] } +tokio = { workspace = true, features = ["io-util"] } +uuid = { workspace = true, features = ["v4"] } diff --git a/crates/prisma-cli/Cargo.toml b/crates/prisma-cli/Cargo.toml index 69522f1af..b6594a407 100644 --- a/crates/prisma-cli/Cargo.toml +++ b/crates/prisma-cli/Cargo.toml @@ -1,9 +1,10 @@ [package] -name = "prisma-cli" +name = "prisma-cli" version = "0.1.0" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] # Spacedrive Sub-crates diff --git a/crates/prisma/Cargo.toml b/crates/prisma/Cargo.toml index d42d563c8..5910d57e2 100644 --- a/crates/prisma/Cargo.toml +++ b/crates/prisma/Cargo.toml @@ -1,6 +1,7 @@ [package] -name = "sd-prisma" +name = "sd-prisma" version = "0.1.0" + edition = "2021" [dependencies] @@ -9,8 +10,8 @@ sd-sync = { path = "../sync" } # Workspace dependencies prisma-client-rust = { workspace = true } -rmpv = { workspace = true } -rmp-serde = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -uuid = { workspace = true } +rmp-serde = { workspace = true } +rmpv = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +uuid = { workspace = true } diff --git a/crates/sync-generator/Cargo.toml b/crates/sync-generator/Cargo.toml index 8b07f7146..7ca3a9ae3 100644 --- a/crates/sync-generator/Cargo.toml +++ b/crates/sync-generator/Cargo.toml @@ -1,14 +1,15 @@ [package] -name = "sd-sync-generator" +name = "sd-sync-generator" version = "0.1.0" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] prisma-client-rust-sdk = { workspace = true } -serde = { workspace = true, features = ["derive"] } -thiserror = { workspace = true } +serde = { workspace = true, features = ["derive"] } +thiserror = { workspace = true } # Specific Sync Generator dependencies nom = "7.1.3" diff --git a/crates/sync/Cargo.toml b/crates/sync/Cargo.toml index 003217aaf..8b15355ca 100644 --- a/crates/sync/Cargo.toml +++ b/crates/sync/Cargo.toml @@ -1,17 +1,18 @@ [package] -name = "sd-sync" +name = "sd-sync" version = "0.1.0" -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] prisma-client-rust = { workspace = true } -rmp = { workspace = true } -rmp-serde = { workspace = true } -rmpv = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -specta = { workspace = true, features = ["uuid", "uhlc", "serde_json"] } -uhlc = { workspace = true } -uuid = { workspace = true, features = ["serde", "v4"] } +rmp = { workspace = true } +rmp-serde = { workspace = true } +rmpv = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +specta = { workspace = true, features = ["serde_json", "uhlc", "uuid"] } +uhlc = { workspace = true } +uuid = { workspace = true, features = ["serde", "v4"] } diff --git a/crates/sync/example/Cargo.toml b/crates/sync/example/Cargo.toml index 8bd3f690d..49521583a 100644 --- a/crates/sync/example/Cargo.toml +++ b/crates/sync/example/Cargo.toml @@ -1,26 +1,27 @@ [package] -name = "sd-sync-example" +name = "sd-sync-example" version = "0.1.0" -rust-version = "1.64" -publish = false -license = { workspace = true } -repository = { workspace = true } -edition = { workspace = true } + +edition.workspace = true +license.workspace = true +publish = false +repository.workspace = true +rust-version = "1.64" [dependencies] # Spacedrive Sub-crates sd-sync = { path = ".." } # Workspace dependencies -axum = { workspace = true } -http = { workspace = true } +axum = { workspace = true } +http = { workspace = true } prisma-client-rust = { workspace = true } -rspc = { workspace = true, features = ["axum"] } -serde_json = { workspace = true } -serde = { workspace = true, features = ["derive"] } -tokio = { workspace = true, features = ["full"] } -uuid = { workspace = true, features = ["v4"] } +rspc = { workspace = true, features = ["axum"] } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +tokio = { workspace = true, features = ["full"] } +uuid = { workspace = true, features = ["v4"] } # Specific Core dependencies -dotenv = "0.15.0" +dotenv = "0.15.0" tower-http = { version = "0.4.4", features = ["cors"] } # Update blocked by http diff --git a/crates/task-system/Cargo.toml b/crates/task-system/Cargo.toml index fcc5b1a23..03e31ba60 100644 --- a/crates/task-system/Cargo.toml +++ b/crates/task-system/Cargo.toml @@ -1,41 +1,37 @@ [package] -name = "sd-task-system" +name = "sd-task-system" version = "0.1.0" -authors = ["Ericson Soares "] -rust-version = "1.75" -license.workspace = true -edition.workspace = true + +authors = ["Ericson Soares "] +edition.workspace = true +license.workspace = true repository.workspace = true +rust-version = "1.75" [dependencies] # Workspace deps -async-channel = { workspace = true } -async-trait = { workspace = true } -futures = { workspace = true } +async-channel = { workspace = true } +async-trait = { workspace = true } +futures = { workspace = true } futures-concurrency = { workspace = true } -pin-project-lite = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = [ - "sync", - "parking_lot", - "rt-multi-thread", - "time", -] } -tokio-stream = { workspace = true } -tracing = { workspace = true } -uuid = { workspace = true, features = ["v4"] } +pin-project-lite = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["parking_lot", "rt-multi-thread", "sync", "time"] } +tokio-stream = { workspace = true } +tracing = { workspace = true } +uuid = { workspace = true, features = ["v4"] } # Specific Task System dependencies downcast-rs = "1.2" [dev-dependencies] -lending-stream = { workspace = true } -rand = { workspace = true } -rmp-serde = { workspace = true } -serde = { workspace = true, features = ["derive"] } -tempfile = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["macros", "test-util", "fs"] } -tracing-test = { workspace = true, features = ["no-env-filter"] } -uuid = { workspace = true, features = ["serde"] } +lending-stream = { workspace = true } +rand = { workspace = true } +rmp-serde = { workspace = true } +serde = { workspace = true, features = ["derive"] } +tempfile = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["fs", "macros", "test-util"] } tracing-subscriber = { workspace = true, features = ["env-filter"] } +tracing-test = { workspace = true, features = ["no-env-filter"] } +uuid = { workspace = true, features = ["serde"] } diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml index 1294af234..c535b0c0f 100644 --- a/crates/utils/Cargo.toml +++ b/crates/utils/Cargo.toml @@ -1,6 +1,7 @@ [package] -name = "sd-utils" +name = "sd-utils" version = "0.1.0" + edition = "2021" [dependencies] @@ -9,6 +10,6 @@ sd-prisma = { path = "../prisma" } # Workspace dependencies prisma-client-rust = { workspace = true } -rspc = { workspace = true, features = ["unstable"] } -thiserror = { workspace = true } -uuid = { workspace = true } +rspc = { workspace = true, features = ["unstable"] } +thiserror = { workspace = true } +uuid = { workspace = true } diff --git a/interface/app/$libraryId/TopBar/TopBarOptions.tsx b/interface/app/$libraryId/TopBar/TopBarOptions.tsx index 99750b435..85274a022 100644 --- a/interface/app/$libraryId/TopBar/TopBarOptions.tsx +++ b/interface/app/$libraryId/TopBar/TopBarOptions.tsx @@ -1,5 +1,5 @@ import { Cards, IconWeight, Minus, Square, X } from '@phosphor-icons/react'; -import { getCurrent, Window } from '@tauri-apps/api/window'; +import { Window } from '@tauri-apps/api/window'; import clsx from 'clsx'; import { useCallback, useEffect, useLayoutEffect, useState } from 'react'; import { ModifierKeys, Popover, Tooltip, usePopover } from '@sd/ui'; @@ -185,7 +185,7 @@ function ToolGroup({ export function WindowsControls({ windowSize }: { windowSize: number }) { const [maximized, setMaximized] = useState(false); const getWindowState = useCallback(async () => { - const isMaximized = await getCurrent().isMaximized(); + const isMaximized = await Window.getCurrent().isMaximized(); setMaximized(isMaximized); }, []); diff --git a/package.json b/package.json index 4b5454b2a..27431ca33 100644 --- a/package.json +++ b/package.json @@ -54,10 +54,11 @@ "@babel/plugin-syntax-import-assertions": "^7.24.1", "@cspell/dict-rust": "^4.0.2", "@cspell/dict-typescript": "^3.1.2", - "@ianvs/prettier-plugin-sort-imports": "^4.2.1", + "@ianvs/prettier-plugin-sort-imports": "^4.3.1", + "@taplo/cli": "^0.7.0", "cspell": "^8.6.0", - "prettier": "^3.2.5", - "prettier-plugin-tailwindcss": "^0.5.12", + "prettier": "^3.3.3", + "prettier-plugin-tailwindcss": "^0.6.6", "turbo": "^1.12.5", "turbo-ignore": "^1.12.5", "typescript": "^5.4.2", @@ -72,5 +73,5 @@ "eslintConfig": { "root": true }, - "packageManager": "pnpm@9.6.0" + "packageManager": "pnpm@9.7.0" } diff --git a/packages/client/src/core.ts b/packages/client/src/core.ts index 98019c02c..598cf8756 100644 --- a/packages/client/src/core.ts +++ b/packages/client/src/core.ts @@ -142,7 +142,7 @@ export type Procedures = { { key: "locations.quickRescan", input: LibraryArgs, result: null } | { key: "notifications.listen", input: never, result: Notification } | { key: "p2p.events", input: never, result: P2PEvent } | - { key: "search.ephemeralPaths", input: LibraryArgs, result: EphemeralPathsResultItem } | + { key: "search.ephemeralPaths", input: LibraryArgs, result: { entries: ExplorerItem[]; errors: Error[] } } | { key: "sync.active", input: LibraryArgs, result: SyncStatus } | { key: "sync.newMessage", input: LibraryArgs, result: null } }; @@ -246,8 +246,6 @@ export type EphemeralPathOrder = { field: "name"; value: SortOrder } | { field: export type EphemeralPathSearchArgs = { path: string; withHiddenFiles: boolean; order?: EphemeralPathOrder | null } -export type EphemeralPathsResultItem = { entries: ExplorerItem[]; errors: Error[] } - export type EphemeralRenameFileArgs = { kind: EphemeralRenameKind } export type EphemeralRenameKind = { One: EphemeralRenameOne } | { Many: EphemeralRenameMany } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c282f204c..62197e9cf 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ diff --git a/scripts/autoformat.sh b/scripts/autoformat.sh index d8aa0b87d..5a7b5270f 100755 --- a/scripts/autoformat.sh +++ b/scripts/autoformat.sh @@ -67,6 +67,9 @@ wait pnpm run format & wait +# Format toml files +git ls-tree -r HEAD --name-only | grep '.toml$' | xargs pnpm taplo format + if [ "${1:-}" != "only-frontend" ]; then # Run clippy and formatter for backend cargo clippy --fix --all --all-targets --all-features --allow-dirty --allow-staged diff --git a/turbo.json b/turbo.json index ea9c9edd6..6251e1a18 100644 --- a/turbo.json +++ b/turbo.json @@ -16,5 +16,14 @@ "cache": false } }, - "globalEnv": ["PORT", "NODE_ENV", "GENERATE_SOURCEMAP", "DEV"] + "globalEnv": [ + "PORT", + "NODE_ENV", + "GENERATE_SOURCEMAP", + "DEV", + "VITE_SDSERVER_ORIGIN", + "VITE_SD_DEMO_MODE", + "VITE_SDSERVER_ORIGIN", + "VITE_LANDING_ORIGIN" + ] }