Skip to content

Commit b296ed8

Browse files
committed
feat(crypto): drive matrix-js-sdk crypto from a Rust engine over IPC
1 parent 243908e commit b296ed8

80 files changed

Lines changed: 11331 additions & 292 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: minor
3+
---
4+
5+
Add a built-in UnifiedPush distributor so Android push works without Google Play Services or a separate distributor app, support MSC4174 so the homeserver can deliver web push directly, and decrypt push previews through the Rust crypto engine.

.github/workflows/rust-quality.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ jobs:
7878
save-if: ${{ github.ref == 'refs/heads/dev' }}
7979

8080
- name: Check native app
81-
run: cargo check --locked --manifest-path src-tauri/Cargo.toml
81+
run: cargo check --locked --manifest-path src-tauri/Cargo.toml --features matrix-crypto
8282

8383
- name: Run Rust tests
84-
run: cargo test --locked --manifest-path src-tauri/Cargo.toml
84+
run: cargo test --locked --manifest-path src-tauri/Cargo.toml --features matrix-crypto
8585

8686
- name: Run Clippy
87-
run: cargo clippy --locked --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
87+
run: cargo clippy --locked --manifest-path src-tauri/Cargo.toml --all-targets --features matrix-crypto -- -D warnings

.github/workflows/tauri-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
171171
- name: Build desktop bundles
172172
shell: bash
173-
run: pnpm tauri build ${{ matrix.args }} $TAURI_BUILD_ARGS
173+
run: pnpm tauri:wry build ${{ matrix.args }} $TAURI_BUILD_ARGS
174174

175175
- name: Normalize desktop artifact names
176176
shell: bash
@@ -334,7 +334,7 @@ jobs:
334334
fi
335335
CONFIG_ARGS=""
336336
[ "$IS_NIGHTLY" = "true" ] && CONFIG_ARGS="--config src-tauri/tauri.nightly.conf.json"
337-
pnpm tauri android build $CONFIG_ARGS --apk --aab --target aarch64 armv7
337+
pnpm tauri android build $CONFIG_ARGS --apk --aab --target aarch64 armv7 -- --features matrix-crypto
338338
OUT='src-tauri/gen/android/app/build/outputs'
339339
APK=$(find "$OUT/apk/universal/release" -name '*.apk' -type f | head -1)
340340
AAB=$(find "$OUT/bundle/universalRelease" -name '*.aab' -type f | head -1)
@@ -476,7 +476,7 @@ jobs:
476476
fi
477477
CONFIG_ARGS=""
478478
[ "$IS_NIGHTLY" = "true" ] && CONFIG_ARGS="--config src-tauri/tauri.nightly.conf.json"
479-
pnpm tauri ios build $CONFIG_ARGS --no-sign --ci
479+
pnpm tauri ios build $CONFIG_ARGS --no-sign --ci -- --features matrix-crypto
480480
IPA=$(find src-tauri/gen/apple/build -name '*.ipa' -type f | head -1)
481481
[ -n "$IPA" ] || { echo "IPA not found"; ls -R src-tauri/gen/apple/build 2>/dev/null || true; exit 1; }
482482
NORMALIZED_IPA="$(dirname "$IPA")/Sable-${VERSION}-ios-arm64.ipa"

knip.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@
77
"type": true
88
},
99
"ignoreFiles": ["src/app/generated/**/*"],
10-
"ignoreDependencies": [
11-
"buffer",
12-
"@sableclient/sable-call-embedded",
13-
"@matrix-org/matrix-sdk-crypto-wasm",
14-
"@sableclient/twemoji-font"
15-
],
10+
"ignoreDependencies": ["buffer", "@sableclient/sable-call-embedded", "@sableclient/twemoji-font"],
1611
"ignoreBinaries": ["knope", "mise"],
1712
"rules": {
1813
"exports": "off",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@
5252
"@livekit/components-react": "2.9.24",
5353
"@lottiefiles/dotlottie-react": "^0.19.14",
5454
"@lottiefiles/dotlottie-web": "0.79.1",
55+
"@matrix-org/matrix-sdk-crypto-wasm": "^18.3.1",
5556
"@noble/hashes": "^2.3.0",
5657
"@phosphor-icons/react": "^2.1.10",
5758
"@rolldown/plugin-node-polyfills": "^1.0.3",
5859
"@sableclient/matrixrtc": "^0.1.0",
5960
"@sableclient/tauri-plugin-livekit-mobile": "^0.2.0",
60-
"@sableclient/tauri-plugin-notifications-api": "^0.5.2",
61+
"@sableclient/tauri-plugin-notifications-api": "^0.5.3",
6162
"@sableclient/twemoji-font": "^1.0.4",
6263
"@sentry/react": "^10.70.0",
6364
"@tanstack/react-query": "^5.101.4",

pnpm-lock.yaml

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/tauri.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ async function main() {
7171
// The frontend is built before Cargo, so mirror the updater feature into Vite.
7272
process.env.VITE_DESKTOP_UPDATER_ENABLED = String(!noUpdater);
7373

74-
const features = noUpdater ? platform : `${platform},updater`;
74+
const base = noUpdater ? platform : `${platform},updater`;
75+
const features = `${base},matrix-crypto`;
7576
const args = [cmd, '--features', features, ...tauriArgs];
7677
if (!tauriArgs.includes('--')) {
7778
args.push('--');

0 commit comments

Comments
 (0)