Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev infra #8438

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4089bbb
fix selected target folder defaulting to INBOX after changing view
abdulkadir-tutao Jan 30, 2025
6c2827e
[mimimi] rename make_import_directory to indicate it's creating a path
tuta-sudipg Jan 28, 2025
66dad7d
[mimimi] improve error state for import UI
tuta-sudipg Jan 28, 2025
3e5e33a
[mimimi] more closely track how many mails failed to import
tuta-sudipg Jan 28, 2025
0952a58
unify all rust project into single workspace
tuta-sudipg Jan 29, 2025
16b5637
- add comment why we need uniffi-bindgen as seperate crate
tuta-sudipg Jan 30, 2025
9c72adf
[tutasdk] improve docs on SuspendableRestClient
tuta-sudipg Jan 30, 2025
f9c10d7
[tutasdk] make the rust workspace work for the ios build
tuta-sudipg Jan 30, 2025
f77d6bf
change Github rust workflow to run on project root
tuta-sudipg Jan 30, 2025
527ae6b
remove all default members from workspace
ganthern Jan 23, 2025
804d72c
don't log mlock warnings for tests
kibibytium Jan 29, 2025
bb523d0
delete import state id on cancel
kibibytium Feb 3, 2025
5650515
use MailSetEntry ListId in process imported mails
kibibytium Feb 3, 2025
c7e8af2
use the repository root as a cargo workspace
ganthern Feb 4, 2025
92df0ee
[calendar] fix calendar update notifications missing new exclusions
ganthern Jan 29, 2025
6cf986a
[mimimi] make it possible to import apple mail exports
tuta-sudipg Feb 5, 2025
28a02ac
[mimimi] fix formatting
ganthern Feb 6, 2025
d65fea0
do not lose mbox filename for apple export format mbox
tuta-sudipg Feb 7, 2025
a4a32a1
typo: return AppleMbox not MBOX
tuta-sudipg Feb 7, 2025
c8bc52a
clippy fix
tuta-sudipg Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

[profile.release]
lto = true
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
types: [ opened, synchronize, edited ]
paths:
- 'tuta-sdk/**'
- '.github/workflows/tuta-sdk-test.yml'
- 'packages/node-mimimi/**'
- '.github/workflows/rust-test.yml'
push:
branches:
- dev-*
Expand Down Expand Up @@ -35,12 +36,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: ./.github/shared/setup-rust
- name: sdk format
working-directory: tuta-sdk/rust
- name: rust format
run: cargo fmt --check
- name: sdk warning check with clippy
working-directory: tuta-sdk/rust
run: cargo clippy --package tuta-sdk --no-deps -- -Dwarnings # -Dwarnings changes warnings to errors so that the check fails
- name: sdk tests
working-directory: tuta-sdk/rust
run: cargo test
- name: rust warning check with clippy
run: cargo clippy --all --no-deps -- -Dwarnings # -Dwarnings changes warnings to errors so that the check fails
- name: rust tests
run: cargo test --all
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
target
build-calendar-app
dist
node_modules
Expand All @@ -24,3 +25,5 @@ tuta-sdk/out
app-android/app/src/main/jniLibs
app-android/app/src/main/java/de/tutao/tutasdk
DerivedData/
tuta-sdk/rust/out
tuta-sdk/android
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ app-android/
app-ios/
fdroid-metadata-workaround/
packages/tutanota-crypto/lib/internal/
tuta-sdk/rust/target
packages/node-mimimi
target/
packages/node-mimimi/tests
156 changes: 156 additions & 0 deletions tuta-sdk/rust/Cargo.lock → Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[workspace.package]
version = "267.250206.0"
rust-version = "1.84.0"
edition = "2021"
homepage = "https://tutao.de"
repository = "https://github.com/tutao/tutanota"
license-file = "./Lisence.txt"
publish = false

[profile]
# these config should be configured in .cargo/config.toml

[workspace]
resolver = "2" # todo: can use resolver 3 after 1.84.0+
members = [
"tuta-sdk/rust/sdk",
"packages/node-mimimi",
# uniffi-bindgen is a seperate crate as uniffi-bindgen does not have a cli yet:
# https://github.com/mozilla/uniffi-rs/blob/fbe146f/docs/manual/src/tutorial/foreign_language_bindings.md#creating-the-bindgen-binary
# note: not to be confused with `bindgen` binary which is from: https://github.com/rust-lang/rust-bindgen
"tuta-sdk/rust/uniffi-bindgen",
]

# in most cases, we don't want to build everything.
# this requires passing --all or --package <package-name> to
# cargo for almost anything
default-members = []

[workspace.dependencies]
tuta-sdk = { path = "tuta-sdk/rust/sdk", default-features = false }
thiserror = { version = "2.0" }
base64 = { version = "0.22.1" }
log = { version = "0.4.22" }
serde = { version = "1.0.210", features = ["derive"] }
serde_json = { version = "1.0.117" }
tokio = { version = "1.43", default-features = false }
uniffi = { git = "https://github.com/mozilla/uniffi-rs.git", rev = "13a1c559cb3708eeca40dcf95dc8b3ccccf3b88c", default-features = false }
rand = { version = "0.8" }

# --------- lints

# lints.cargo not supported on stable yet.
# [workspace.lints.cargo]

[workspace.lints.clippy]
new_without_default = "allow" # we don't want to implement Default for everything
enum_variant_names = "allow" # creates more problems than it solves
let_and_return = "allow" # we commonly use this style
too_many_arguments = "allow" # this is fine

# "pedantic" lints worth warning on
manual_let_else = "warn"
must_use_candidate = "warn"
unused_async = "warn"
implicit_clone = "warn"
explicit_iter_loop = "warn"


[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ci)'] }

[patch.'https://github.com/rust-lang/crates.io-index']
pqcrypto-internals = { git = 'https://github.com/rustpq/pqcrypto', rev = 'b39937410b149156de81fc8e3150753aff925aa4' }
Loading
Loading