Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.
Go to file
jake fb8af0832b
[ENG-1096] Image Conversions (#1364)
* derive `Type` on `*Extension`

* update `image`, `webp` and add `rspc::Error` support to the `sd-images` crate

* rename function for verbosity

* cleanup clippy allows and use scaling fn for svg conversions

* remove dead comment

* specify `generic` image extensions and add fn to enumerate all compatible extensions

* re-exports and inline hot provided method

* another inline on a provided method

* `formatter` -> `handler` and return an explicit error if the extension isn't supported, and add `convert_image()`

* `get_ext()` inlined helper fn

* add mutation for conversion and query for getting all supported extensions

* fix `svg` scaling and generation

* update bindings

* rm old const

* temporary test for all exts

* verbosity and no manual drop

* remove dbg test

* big enum and remove `cur` extension as `image` doesn't support it

* add huge extension enum

* hopefully get path from file path id and location id

* main merge fix

* chore: update toml and lockfile

* security: update webp

* comment entire crypto crate for build times

* add bincode, huge enum and custom ser/de

* Revert "comment entire crypto crate for build times"

This reverts commit 458addaad6.

* lockfile

* theoretically working ser/de

* add svg scaling

* fix pdf matching bug and use options

* move image scaling fn

* major consts overhaul with good ser/de

* disable heif checking for now due to new trait api

* make the generic handler truly generic

* fix pdf types

* fix pdf scaling so that it's 120dpi A4 paper size by default - height/aspect res are maintained

* heavy cleanup

* note to myself

* bindings & update core to use the scaling fn from the images crate (reducing code dupes)

* move vulnerable `aovec` to be a dev dep so it stays out of release builds (it's only used in tests)

* remoev exif crate from the core as it's handled in a sep. crate

* silence a clippy warning and update lockfile

* lower the maximum file size a slight amount

* bindings and minor dep bumps

* Some improvements

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 02:57:37 +00:00
.cargo [ENG-1054] libheif for Linux (plus fixes) + Webp update (#1405) 2023-10-03 17:31:33 +00:00
.cspell [ENG-779] Finalize UI (#986) 2023-06-22 06:34:45 +00:00
.github [ENG-1054] libheif for Linux (plus fixes) + Webp update (#1405) 2023-10-03 17:31:33 +00:00
.vscode [ENG-1124 | ENG-1154] Ephemeral location bug: Opening files | Path should always be in present in Inspector (#1401) 2023-10-05 07:21:37 +00:00
apps [ENG-944] Sidebar UX Improvements (#1270) 2023-10-09 10:11:23 +00:00
core [ENG-1096] Image Conversions (#1364) 2023-10-10 02:57:37 +00:00
crates [ENG-1096] Image Conversions (#1364) 2023-10-10 02:57:37 +00:00
docs Change docs and CI scripts to use pnpm tauri command (#1421) 2023-10-03 08:10:55 +00:00
extensions Linted Files according to the .prettierrc. 2022-04-24 21:16:55 +01:00
interface [ENG-1195] Hide folder size in Ephemeral locations (#1446) 2023-10-09 15:05:47 +00:00
packages [ENG-1096] Image Conversions (#1364) 2023-10-10 02:57:37 +00:00
scripts [ENG-1054] libheif for Linux (plus fixes) + Webp update (#1405) 2023-10-03 17:31:33 +00:00
.clippy.toml [ENG-835] Duplicating an empty directory doesn't duplicate nested empty directories (#1213) 2023-08-13 18:34:46 +00:00
.editorconfig [ENG-767, ENG-916] Improvements and fixes for Open/Open With (#1082) 2023-07-24 17:36:00 +00:00
.eslintignore Fix Windows CI + format (#767) 2023-04-27 07:32:15 +00:00
.gitattributes [ENG-469] Make Prettier and ESLint work together (#706) 2023-04-14 21:21:21 +00:00
.gitignore [ENG-265] Improve setup scripts (#1368) 2023-09-28 10:03:46 +00:00
.npmrc [ENG-265] Improve setup scripts (#1368) 2023-09-28 10:03:46 +00:00
.nvmrc Bump node to lts (v18) 2022-12-14 12:43:02 +03:00
.prettierignore [ENG-1075] Light mode for QuickPreview (#1403) 2023-10-03 16:18:16 +00:00
.prettierrc.js [ENG-1067] Update phosphor to new package & update sort imports (#1330) 2023-09-11 15:26:44 +00:00
.rustfmt.toml Added crates folder (#389) 2022-09-29 21:02:29 -07:00
Cargo.lock [ENG-1096] Image Conversions (#1364) 2023-10-10 02:57:37 +00:00
Cargo.toml Fix Android bridge + drop IOS and Android projects (#1336) 2023-09-13 10:07:26 +00:00
CODE_OF_CONDUCT.md New team page (#229) 2022-06-14 13:13:09 -07:00
CONTRIBUTING.md [ENG-1124 | ENG-1154] Ephemeral location bug: Opening files | Path should always be in present in Inspector (#1401) 2023-10-05 07:21:37 +00:00
cspell.config.yaml cleanup(don't hate me): prettier format everything 2023-01-19 19:32:35 -08:00
LICENSE Switch license to AGPL (#307) 2022-07-02 14:26:00 -07:00
package.json [ENG-1054] libheif for Linux (plus fixes) + Webp update (#1405) 2023-10-03 17:31:33 +00:00
pnpm-lock.yaml [ENG-944] Sidebar UX Improvements (#1270) 2023-10-09 10:11:23 +00:00
pnpm-workspace.yaml [ENG-380] Interface code structure improvement (#581) 2023-02-27 21:29:48 -08:00
README.md [ENG-1165] Add a security policy and notices to the appropriate READMEs (#1409) 2023-09-30 08:31:38 +00:00
SECURITY.md [ENG-1165] Add a security policy and notices to the appropriate READMEs (#1409) 2023-09-30 08:31:38 +00:00
tsconfig.json [ENG-380] Interface code structure improvement (#581) 2023-02-27 21:29:48 -08:00
turbo.json Add pnpm tauri root command (#1411) 2023-10-02 14:03:45 +00:00

Logo

Spacedrive

A file explorer from the future.
spacedrive.com »

Download for macOS · Windows · Linux · iOS · watchOS · Android
~ Links will be added once a release is available. ~

Spacedrive is an open source cross-platform file manager, powered by a virtual distributed filesystem (VDFS) written in Rust.

UPDATE: Spacedrive is under active development, we are in the pre-alpha stage, with builds occasionally released via GitHub actions, official alpha coming soon.

Organize files across many devices in one place. From cloud services to offline hard drives, Spacedrive combines the storage capacity and processing power of your devices into one personal distributed cloud, that is both secure and intuitive to use.

For independent creatives, hoarders and those that want to own their digital footprint, Spacedrive provides a free file management experience like no other.

App screenshot


What is a VDFS?

A VDFS (virtual distributed filesystem) is a filesystem designed to work across a variety of storage layers. With a uniform API to manipulate and access content across many devices, VDFS is not restricted to a single machine. It achieves this by maintaining a virtual index of all storage locations, synchronizing the database between clients in realtime. This implementation also uses CAS (Content-addressable storage) to uniquely identify files, while keeping record of logical file paths relative to the storage locations.

The first implementation of a VDFS can be found in this UC Berkeley paper by Haoyuan Li. This paper describes its use for cloud computing, however the underlying concepts can be translated to open consumer software.

Motivation

Many of us have multiple cloud accounts, drives that arent backed up and data at risk of loss. We depend on cloud services like Google Photos and iCloud, but are locked in with limited capacity and almost zero interoperability between services and operating systems. Photo albums shouldnt be stuck in a device ecosystem, or harvested for advertising data. They should be OS agnostic, permanent and personally owned. Data we create is our legacy, that will long outlive us—open source technology is the only way to ensure we retain absolute control over the data that defines our lives, at unlimited scale.

Roadmap

View a list of our planned features here: spacedrive.com/roadmap

Developer Guide

Please refer to the contributing guide for how to install Spacedrive from sources.

Security Policy

Please refer to the security policy for details and information on how to responsibly report a security vulnerability or issue.

Architecture

This project is using what I'm calling the "PRRTT" stack (Prisma, Rust, React, TypeScript, Tauri).

  • Prisma on the front-end? 🤯 Made possible thanks to prisma-client-rust, developed by Brendonovich. Gives us access to the powerful migration CLI in development, along with the Prisma syntax for our schema. The application bundles with the Prisma query engine and codegen for a beautiful Rust API. Our lightweight migration runner is custom built for a desktop app context.
  • Tauri allows us to create a pure Rust native OS webview, without the overhead of your average Electron app. This brings the bundle size and average memory usage down dramatically. It also contributes to a more native feel, especially on macOS due to Safari's close integration with the OS.
  • We also use rspc which allows us to define functions in Rust and call them on the Typescript frontend in a completely typesafe manner, so no unnecessary bugs make it into production!
  • The core (sdcore) is written in pure Rust.

Monorepo structure:

Apps:

Core:

  • core: The Rust core, referred to internally as sdcore. Contains filesystem, database and networking logic. Can be deployed in a variety of host applications.

Packages:

  • client: A TypeScript client library to handle dataflow via RPC between UI and the Rust core.
  • ui: A React Shared component library.
  • interface: The complete user interface in React (used by apps desktop, web and landing)
  • config: eslint configurations (includes eslint-config-next, eslint-config-prettier and all tsconfig.json configs used throughout the monorepo.
  • macos: A Swift Native binary for MacOS system extensions.
  • ios: A Swift Native binary (planned).
  • windows: A C# Native binary (planned).
  • android: A Kotlin Native binary (planned).