renamed for crate

This commit is contained in:
nvrl committed 2026-06-28 11:47:54 +02:00
1 parent c98ec2d55d
commit 643f5a2c3b
19 files changed
+30 -30

No files matched your search

Generated
+1 -1
View File
@@ -1873,7 +1873,7 @@ dependencies = [
]
[[package]]
name = "proton-drive-sdk"
name = "proton-drive-rs"
version = "0.1.0"
dependencies = [
"async-trait",
+1 -1
View File
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["crates/proton-sdk", "crates/proton-drive-sdk"]
members = ["crates/proton-sdk", "crates/proton-drive-rs"]
[workspace.package]
version = "0.1.0"
+7 -7
View File
@@ -44,14 +44,14 @@ All crypto paths have offline round-trip tests, and the read/write surface
(upload/download round-trips, AEAD + streaming + thumbnails, enumeration,
folder/node ops, move, and the event feed) is covered by a **live integration
test suite** validated against a real Proton account — see
`crates/proton-drive-sdk/tests/live_*.rs`.
`crates/proton-drive-rs/tests/live_*.rs`.
## Workspace
| Crate | Purpose |
| --- | --- |
| `crates/proton-sdk` | Core account/session/crypto (`Proton.Sdk` analogue) |
| `crates/proton-drive-sdk` | High-level Drive client (`Proton.Drive.Sdk` analogue) |
| `crates/proton-drive-rs` | High-level Drive client (`Proton.Drive.Sdk` analogue) |
OpenPGP is provided by the [`pgp`](https://crates.io/crates/pgp) crate (rPGP 0.16).
@@ -76,7 +76,7 @@ SRP login (with 2FA), then read the my-files root:
```rust,no_run
use proton_sdk::config::ProtonClientConfiguration;
use proton_sdk::session::ProtonApiSession;
use proton_drive_sdk::ProtonDriveClient;
use proton_drive_rs::ProtonDriveClient;
async fn run() -> proton_sdk::error::Result<()> {
let config = ProtonClientConfiguration::new("external-drive-myapp@0.1.0-alpha");
@@ -99,12 +99,12 @@ async fn run() -> proton_sdk::error::Result<()> {
Already have tokens? Use `ProtonApiSession::resume(config, ResumeParameters {..})`
instead of `begin`.
A live smoke test lives in `crates/proton-drive-sdk/examples/live_login.rs`
A live smoke test lives in `crates/proton-drive-rs/examples/live_login.rs`
(reads `username` / `password` from a repo-root `.env`, TOTP from
`PROTON_TOTP_SECRET`):
```bash
PROTON_TOTP_SECRET=... cargo run -p proton-drive-sdk --example live_login
PROTON_TOTP_SECRET=... cargo run -p proton-drive-rs --example live_login
```
## Build & test
@@ -114,14 +114,14 @@ cargo build # 0 warnings / 0 errors
cargo test # offline crypto + derivation round-trip tests
```
The `crates/proton-drive-sdk/tests/live_*.rs` suite runs the read/write surface
The `crates/proton-drive-rs/tests/live_*.rs` suite runs the read/write surface
against a real account. These tests are `#[ignore]`d by default (they need
credentials) and each cleans up after itself. With `.env` (`username` /
`password`) and `PROTON_TOTP_SECRET` set:
```bash
# all live tests, single-threaded (shared test account)
PROTON_TOTP_SECRET=... cargo test -p proton-drive-sdk --test 'live_*' \
PROTON_TOTP_SECRET=... cargo test -p proton-drive-rs --test 'live_*' \
-- --ignored --nocapture --test-threads=1
```
@@ -1,5 +1,5 @@
[package]
name = "proton-drive-sdk"
name = "proton-drive-rs"
description = "High-level Proton Drive client for Rust"
version.workspace = true
edition.workspace = true
@@ -11,7 +11,7 @@ keywords.workspace = true
categories.workspace = true
rust-version.workspace = true
readme = "../../README.md"
documentation = "https://docs.rs/proton-drive-sdk"
documentation = "https://docs.rs/proton-drive-rs"
[dependencies]
proton-sdk = { path = "../proton-sdk", version = "0.1.0" }
File renamed without changes.
@@ -3,7 +3,7 @@
//! Reads credentials from `.env` (repo root): `username=`, `password=`.
//! The TOTP secret comes from the `PROTON_TOTP_SECRET` env var (base32).
//!
//! Run: `PROTON_TOTP_SECRET=... cargo run -p proton-drive-sdk --example live_login`
//! Run: `PROTON_TOTP_SECRET=... cargo run -p proton-drive-rs --example live_login`
//!
//! Flow: SRP `begin` → `apply_second_factor_code` (computed TOTP) → construct
//! `ProtonDriveClient` with the data password → `get_my_files_folder` →
@@ -12,7 +12,7 @@
use std::time::{SystemTime, UNIX_EPOCH};
use hmac::{Hmac, KeyInit, Mac};
use proton_drive_sdk::ProtonDriveClient;
use proton_drive_rs::ProtonDriveClient;
use proton_sdk::config::ProtonClientConfiguration;
use proton_sdk::session::ProtonApiSession;
use sha1::Sha1;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -8,7 +8,7 @@
//! # async fn run() -> proton_sdk::error::Result<()> {
//! use proton_sdk::config::ProtonClientConfiguration;
//! use proton_sdk::session::{PasswordMode, ProtonApiSession, ResumeParameters};
//! use proton_drive_sdk::ProtonDriveClient;
//! use proton_drive_rs::ProtonDriveClient;
//!
//! let config = ProtonClientConfiguration::new("external-drive-myapp@0.1.0-alpha");
//! let session = ProtonApiSession::resume(config, ResumeParameters {
File renamed without changes.
File renamed without changes.
@@ -14,7 +14,7 @@
use std::time::{SystemTime, UNIX_EPOCH};
use hmac::{Hmac, KeyInit, Mac};
use proton_drive_sdk::ProtonDriveClient;
use proton_drive_rs::ProtonDriveClient;
use proton_sdk::config::ProtonClientConfiguration;
use proton_sdk::session::{PasswordMode, ProtonApiSession, ResumeParameters};
use serde::{Deserialize, Serialize};
@@ -2,19 +2,19 @@
//! verification against a real Proton account.
//!
//! Skipped by default. Run against the test account with:
//! cargo test -p proton-drive-sdk --test live_drive_ops -- --ignored --nocapture
//! cargo test -p proton-drive-rs --test live_drive_ops -- --ignored --nocapture
//!
//! Each test cleans up after itself (trash + delete-from-trash) so the account
//! stays reusable across runs.
mod common;
use proton_drive_sdk::proton_sdk::crypto::VerificationStatus;
use proton_drive_sdk::{Node, NodeKind};
use proton_drive_rs::proton_sdk::crypto::VerificationStatus;
use proton_drive_rs::{Node, NodeKind};
use proton_sdk::ids::NodeUid;
/// Trash then permanently delete the given nodes; best-effort, logs on failure.
async fn cleanup(client: &proton_drive_sdk::ProtonDriveClient, uids: &[NodeUid]) {
async fn cleanup(client: &proton_drive_rs::ProtonDriveClient, uids: &[NodeUid]) {
if let Err(e) = client.trash_nodes(uids).await {
eprintln!("[cleanup] trash failed: {e}");
return;
@@ -25,7 +25,7 @@ async fn cleanup(client: &proton_drive_sdk::ProtonDriveClient, uids: &[NodeUid])
}
/// Fetch a node that must exist, panicking with context otherwise.
async fn get(client: &proton_drive_sdk::ProtonDriveClient, uid: &NodeUid, what: &str) -> Node {
async fn get(client: &proton_drive_rs::ProtonDriveClient, uid: &NodeUid, what: &str) -> Node {
client
.get_node(uid)
.await
@@ -2,7 +2,7 @@
//! `enumerate_events`) against a real Proton account.
//!
//! Skipped by default. Run against the test account with:
//! cargo test -p proton-drive-sdk --test live_events -- --ignored --nocapture --test-threads=1
//! cargo test -p proton-drive-rs --test live_events -- --ignored --nocapture --test-threads=1
//!
//! Each test cleans up after itself (trash + delete-from-trash) so the account
//! stays reusable across runs.
@@ -16,11 +16,11 @@ mod common;
use std::time::Duration;
use proton_drive_sdk::{DriveEvent, DriveEventScopeId};
use proton_drive_rs::{DriveEvent, DriveEventScopeId};
use proton_sdk::ids::{DriveEventId, NodeUid};
/// Trash then permanently delete the given nodes; best-effort, logs on failure.
async fn cleanup(client: &proton_drive_sdk::ProtonDriveClient, uids: &[NodeUid]) {
async fn cleanup(client: &proton_drive_rs::ProtonDriveClient, uids: &[NodeUid]) {
if let Err(e) = client.trash_nodes(uids).await {
eprintln!("[cleanup] trash failed: {e}");
return;
@@ -40,7 +40,7 @@ const POLL_DELAY: Duration = Duration::from_secs(2);
/// cumulative (everything after the cursor), so we can re-poll the same cursor
/// without losing earlier events. Returns `None` if nothing matched in time.
async fn poll_for(
client: &proton_drive_sdk::ProtonDriveClient,
client: &proton_drive_rs::ProtonDriveClient,
scope: &DriveEventScopeId,
cursor: &DriveEventId,
mut predicate: impl FnMut(&DriveEvent) -> bool,
@@ -300,7 +300,7 @@ async fn permanent_delete_surfaces_node_deleted() {
/// Seed the feed and return the cursor to enumerate from next.
async fn seed(
client: &proton_drive_sdk::ProtonDriveClient,
client: &proton_drive_rs::ProtonDriveClient,
scope: &DriveEventScopeId,
) -> DriveEventId {
let seeded = client
@@ -3,7 +3,7 @@
//! Proton account.
//!
//! Skipped by default. Run against the test account with:
//! cargo test -p proton-drive-sdk --test live_transfer_ops -- --ignored --nocapture --test-threads=1
//! cargo test -p proton-drive-rs --test live_transfer_ops -- --ignored --nocapture --test-threads=1
//!
//! Each test cleans up after itself (trash + delete-from-trash) so the account
//! stays reusable across runs.
@@ -12,11 +12,11 @@ mod common;
use std::io::Cursor;
use proton_drive_sdk::{NodeKind, Thumbnail, ThumbnailType};
use proton_drive_rs::{NodeKind, Thumbnail, ThumbnailType};
use proton_sdk::ids::NodeUid;
/// Trash then permanently delete the given nodes; best-effort, logs on failure.
async fn cleanup(client: &proton_drive_sdk::ProtonDriveClient, uids: &[NodeUid]) {
async fn cleanup(client: &proton_drive_rs::ProtonDriveClient, uids: &[NodeUid]) {
if let Err(e) = client.trash_nodes(uids).await {
eprintln!("[cleanup] trash failed: {e}");
return;
@@ -1,7 +1,7 @@
//! Live integration: upload → download → byte-equality round-trips.
//!
//! Skipped by default. Run against the test account with:
//! PROTON_TOTP_SECRET=... cargo test -p proton-drive-sdk --test live_upload_download -- --ignored --nocapture
//! PROTON_TOTP_SECRET=... cargo test -p proton-drive-rs --test live_upload_download -- --ignored --nocapture
//!
//! Each test cleans up after itself (trash + delete-from-trash) so the account
//! stays reusable across runs.
@@ -11,7 +11,7 @@ mod common;
use proton_sdk::ids::NodeUid;
/// Trash then permanently delete the given nodes; best-effort, logs on failure.
async fn cleanup(client: &proton_drive_sdk::ProtonDriveClient, uids: &[NodeUid]) {
async fn cleanup(client: &proton_drive_rs::ProtonDriveClient, uids: &[NodeUid]) {
if let Err(e) = client.trash_nodes(uids).await {
eprintln!("[cleanup] trash failed: {e}");
return;