diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index e8304a45586..d49fe3fc4f2 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,5 +1,7 @@
+- [ ] Public API changes documented in changelogs (optional)
+
Signed-off-by:
diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml
index 4ced4f78125..30255995c56 100644
--- a/.github/workflows/benchmarks.yml
+++ b/.github/workflows/benchmarks.yml
@@ -15,12 +15,9 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@nightly
with:
- toolchain: nightly
components: rustfmt
- profile: minimal
- override: true
- name: Run Benchmarks
run: cargo bench | tee benchmark-output.txt
diff --git a/.github/workflows/bindings_ci.yml b/.github/workflows/bindings_ci.yml
index b53a81a8cff..1c6e22fcefb 100644
--- a/.github/workflows/bindings_ci.yml
+++ b/.github/workflows/bindings_ci.yml
@@ -12,54 +12,28 @@ on:
- synchronize
- ready_for_review
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
env:
CARGO_TERM_COLOR: always
MATRIX_SDK_CRYPTO_NODEJS_PATH: bindings/matrix-sdk-crypto-nodejs
MATRIX_SDK_CRYPTO_JS_PATH: bindings/matrix-sdk-crypto-js
jobs:
- xtask-linux:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repo
- uses: actions/checkout@v2
-
- - name: Install Protoc
- uses: arduino/setup-protoc@v1
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Check xtask cache
- uses: actions/cache@v3
- id: xtask-cache
- with:
- path: target/debug/xtask
- key: xtask-linux-${{ hashFiles('Cargo.toml', 'xtask/**') }}
-
- - name: Install rust stable toolchain
- if: steps.xtask-cache.outputs.cache-hit != 'true'
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
-
- - name: Build
- if: steps.xtask-cache.outputs.cache-hit != 'true'
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: -p xtask
+ xtask:
+ uses: ./.github/workflows/xtask.yml
test-uniffi-codegen:
name: Test UniFFI bindings generation
- needs: xtask-linux
+ needs: xtask
if: github.event_name == 'push' || !github.event.pull_request.draft
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
@@ -67,24 +41,49 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-linux-${{ hashFiles('Cargo.toml', 'xtask/**') }}
+ key: "${{ needs.xtask.outputs.cachekey-linux }}"
+ fail-on-cache-miss: true
- name: Build library & generate bindings
run: target/debug/xtask ci bindings
+ lint-js-bindings:
+ strategy:
+ fail-fast: true
+ matrix:
+ include:
+ - name: "[m]-crypto-nodejs"
+ path: "bindings/matrix-sdk-crypto-nodejs"
+ - name: "[m]-crypto-js"
+ path: "bindings/matrix-sdk-crypto-js"
+
+ name: lint ${{ matrix.name }}
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout the repo
+ uses: actions/checkout@v3
+
+ - name: Install Node.js
+ uses: actions/setup-node@v3
+
+ - name: Install NPM dependencies
+ working-directory: ${{ matrix.path }}
+ run: npm install
+
+ - name: run lint
+ working-directory: ${{ matrix.path }}
+ run: npm run lint
+
test-matrix-sdk-crypto-nodejs:
name: ${{ matrix.os-name }} [m]-crypto-nodejs, v${{ matrix.node-version }}
if: github.event_name == 'push' || !github.event.pull_request.draft
@@ -111,14 +110,10 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install Node.js
uses: actions/setup-node@v3
@@ -169,15 +164,12 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- target: wasm32-unknown-unknown
- profile: minimal
- override: true
+ targets: wasm32-unknown-unknown
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install Node.js
uses: actions/setup-node@v3
@@ -200,72 +192,37 @@ jobs:
working-directory: ${{ env.MATRIX_SDK_CRYPTO_JS_PATH }}
run: npm run doc
- xtask-macos:
- runs-on: macos-12
- steps:
- - name: Checkout repo
- uses: actions/checkout@v2
-
- - name: Install Protoc
- uses: arduino/setup-protoc@v1
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Check xtask cache
- uses: actions/cache@v3
- id: xtask-cache
- with:
- path: target/debug/xtask
- key: xtask-macos-${{ hashFiles('Cargo.toml', 'xtask/**') }}
-
- - name: Install rust stable toolchain
- if: steps.xtask-cache.outputs.cache-hit != 'true'
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
-
- - name: Build
- if: steps.xtask-cache.outputs.cache-hit != 'true'
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: -p xtask
-
test-apple:
name: matrix-rust-components-swift
- needs: xtask-macos
+ needs: xtask
runs-on: macos-12
if: github.event_name == 'push' || !github.event.pull_request.draft
steps:
- name: Checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
+ # install protoc in case we end up rebuilding opentelemetry-proto
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: nightly
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@nightly
- name: Install aarch64-apple-ios target
run: rustup target install aarch64-apple-ios
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-macos-${{ hashFiles('Cargo.toml', 'xtask/**') }}
+ key: "${{ needs.xtask.outputs.cachekey-macos }}"
+ fail-on-cache-miss: true
- name: Build library & bindings
run: target/debug/xtask swift build-library
@@ -275,4 +232,4 @@ jobs:
run: swift test
- name: Build Framework
- run: cargo xtask swift build-framework --only-target=aarch64-apple-ios
+ run: target/debug/xtask swift build-framework --only-target=aarch64-apple-ios
diff --git a/.github/workflows/cancel_others.yml b/.github/workflows/cancel_others.yml
deleted file mode 100644
index 0f1227f0622..00000000000
--- a/.github/workflows/cancel_others.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-on:
- pull_request:
- branches: [main]
-
-jobs:
- cancel-others:
- runs-on: ubuntu-latest
- steps:
- - name: Cancel workflows for older commits
- uses: styfle/cancel-workflow-action@0.11.0
- with:
- workflow_id: all
- all_but_latest: true
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7795a8715eb..01426cc4231 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,42 +12,16 @@ on:
- synchronize
- ready_for_review
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
env:
CARGO_TERM_COLOR: always
jobs:
xtask:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repo
- uses: actions/checkout@v2
-
- - name: Install Protoc
- uses: arduino/setup-protoc@v1
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Check xtask cache
- uses: actions/cache@v3
- id: xtask-cache
- with:
- path: target/debug/xtask
- key: xtask-${{ hashFiles('xtask/**') }}
-
- - name: Install rust stable toolchain
- if: steps.xtask-cache.outputs.cache-hit != 'true'
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
-
- - name: Build
- if: steps.xtask-cache.outputs.cache-hit != 'true'
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: -p xtask
+ uses: ./.github/workflows/xtask.yml
test-matrix-sdk-features:
name: π§ [m], ${{ matrix.name }}
@@ -70,32 +44,35 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
+ with:
+ # use a separate cache for each job to work around
+ # https://github.com/Swatinem/rust-cache/issues/124
+ key: "${{ matrix.name }}"
+
+ # ... but only save the cache on the main branch
+ # cf https://github.com/Swatinem/rust-cache/issues/95
+ save-if: ${{ github.ref == 'refs/head/main' }}
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-${{ hashFiles('xtask/**') }}
+ key: "${{ needs.xtask.outputs.cachekey-linux }}"
+ fail-on-cache-miss: true
- name: Test
- uses: actions-rs/cargo@v1
- with:
- command: run
- args: -p xtask -- ci test-features ${{ matrix.name }}
+ run: |
+ target/debug/xtask ci test-features ${{ matrix.name }}
test-matrix-sdk-examples:
name: π§ [m]-examples
@@ -108,29 +85,24 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-${{ hashFiles('xtask/**') }}
+ key: "${{ needs.xtask.outputs.cachekey-linux }}"
+ fail-on-cache-miss: true
- name: Test
- uses: actions-rs/cargo@v1
- with:
- command: run
- args: -p xtask -- ci examples
+ run: |
+ target/debug/xtask ci examples
test-matrix-sdk-crypto:
name: π§ [m]-crypto
@@ -143,29 +115,24 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-${{ hashFiles('xtask/**') }}
+ key: "${{ needs.xtask.outputs.cachekey-linux }}"
+ fail-on-cache-miss: true
- name: Test
- uses: actions-rs/cargo@v1
- with:
- command: run
- args: -p xtask -- ci test-crypto
+ run: |
+ target/debug/xtask ci test-crypto
test-all-crates:
name: ${{ matrix.name }}
@@ -190,37 +157,40 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: ${{ matrix.rust }}
- profile: minimal
- override: true
+ # Can't use `${{ matrix.* }}` inside uses
+ - name: Install Rust stable
+ if: matrix.rust == 'stable'
+ uses: dtolnay/rust-toolchain@stable
+
+ - name: Install Rust beta
+ if: matrix.rust == 'beta'
+ uses: dtolnay/rust-toolchain@beta
+
+ - name: Install Rust nightly
+ if: matrix.rust == 'nightly'
+ uses: dtolnay/rust-toolchain@nightly
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Test
- uses: actions-rs/cargo@v1
- with:
- command: nextest
- args: run --workspace --exclude matrix-sdk-integration-testing --exclude sliding-sync-integration-test
+ run: |
+ cargo nextest run --workspace \
+ --exclude matrix-sdk-integration-testing --exclude sliding-sync-integration-test
- name: Test documentation
- uses: actions-rs/cargo@v1
- with:
- command: test
- args: --doc
+ run: |
+ cargo test --doc --features docsrs
test-wasm:
name: πΈοΈ ${{ matrix.name }}
@@ -265,13 +235,10 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- target: wasm32-unknown-unknown
+ targets: wasm32-unknown-unknown
components: clippy
- profile: minimal
- override: true
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
@@ -279,28 +246,33 @@ jobs:
version: v0.10.3
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
+ with:
+ # use a separate cache for each job to work around
+ # https://github.com/Swatinem/rust-cache/issues/124
+ key: "${{ matrix.cmd }}"
+
+ # ... but only save the cache on the main branch
+ # cf https://github.com/Swatinem/rust-cache/issues/95
+ save-if: ${{ github.ref == 'refs/head/main' }}
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-${{ hashFiles('xtask/**') }}
+ key: "${{ needs.xtask.outputs.cachekey-linux }}"
+ fail-on-cache-miss: true
- name: Rust Check
- uses: actions-rs/cargo@v1
- with:
- command: run
- args: -p xtask -- ci wasm ${{ matrix.cmd }}
+ run: |
+ target/debug/xtask ci wasm ${{ matrix.cmd }}
- name: Wasm-Pack test
- uses: actions-rs/cargo@v1
- with:
- command: run
- args: -p xtask -- ci wasm-pack ${{ matrix.cmd }}
+ run: |
+ target/debug/xtask ci wasm-pack ${{ matrix.cmd }}
test-appservice:
name: ${{ matrix.os-name }} [m]-appservice
@@ -314,38 +286,35 @@ jobs:
include:
- os: ubuntu-latest
os-name: π§
+ xtask-cachekey: "${{ needs.xtask.outputs.cachekey-linux }}"
- os: macos-latest
os-name: π
+ xtask-cachekey: "${{ needs.xtask.outputs.cachekey-macos }}"
steps:
- name: Checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-${{ hashFiles('xtask/**') }}
+ key: "${{ matrix.xtask-cachekey }}"
+ fail-on-cache-miss: true
- name: Run checks
- uses: actions-rs/cargo@v1
- with:
- command: run
- args: -p xtask -- ci test-appservice
+ run: |
+ target/debug/xtask ci test-appservice
formatting:
name: Check Formatting
@@ -357,18 +326,13 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@nightly
with:
- toolchain: nightly
components: rustfmt
- profile: minimal
- override: true
- name: Cargo fmt
- uses: actions-rs/cargo@v1
- with:
- command: fmt
- args: -- --check
+ run: |
+ cargo fmt -- --check
typos:
name: Spell Check with Typos
@@ -398,27 +362,23 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@nightly
with:
- toolchain: nightly
components: clippy
- profile: minimal
- override: true
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Get xtask
- uses: actions/cache@v3
+ uses: actions/cache/restore@v3
with:
path: target/debug/xtask
- key: xtask-${{ hashFiles('xtask/**') }}
+ key: "${{ needs.xtask.outputs.cachekey-linux }}"
+ fail-on-cache-miss: true
- name: Clippy
- uses: actions-rs/cargo@v1
- with:
- command: run
- args: -p xtask -- ci clippy
+ run: |
+ target/debug/xtask ci clippy
integration-tests:
name: Integration test
@@ -431,14 +391,10 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install nextest
uses: taiki-e/install-action@nextest
@@ -454,22 +410,19 @@ jobs:
disableRateLimiting: true
- name: Test
- uses: actions-rs/cargo@v1
- with:
- command: nextest
- args: run -p matrix-sdk-integration-testing
+ run: |
+ cargo nextest run -p matrix-sdk-integration-testing
sliding-sync-integration-tests:
name: Sliding Sync Integration test
- # disabled until we can figure out the weird docker-not-starting-situation
- if: false
- # if: github.event_name == 'push' || !github.event.pull_request.draft
+ if: github.event_name == 'push' || !github.event.pull_request.draft
runs-on: ubuntu-latest
- # Service containers to run with `runner-job`
+ # run several docker containers with the same networking stack so the hostname 'postgres'
+ # maps to the postgres container, etc.
services:
- # Label used to access the service container
+ # sliding sync needs a postgres container
postgres:
# Docker Hub image
image: postgres
@@ -487,20 +440,37 @@ jobs:
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
-
+ # run sliding sync and point it at the postgres container and synapse container.
+ # the postgres container needs to be above this to make sure it has started prior to this service.
+ slidingsync:
+ image: "ghcr.io/matrix-org/sliding-sync:v0.99.0"
+ env:
+ SYNCV3_SERVER: "http://synapse:8008"
+ SYNCV3_SECRET: "SUPER_CI_SECRET"
+ SYNCV3_BINDADDR: ":8118"
+ SYNCV3_DB: "user=postgres password=postgres dbname=syncv3 sslmode=disable host=postgres"
+ ports:
+ - 8118:8118
+ # tests need a synapse: this is a service and not michaelkaye/setup-matrix-synapse@main as the
+ # latter does not provide networking for services to communicate with it.
+ synapse:
+ # Custom image built from https://github.com/matrix-org/synapse/tree/v1.72.0/docker/complement
+ # with a dummy /complement/ca set
+ image: ghcr.io/matrix-org/synapse-service:v1.72.0
+ env:
+ SYNAPSE_COMPLEMENT_DATABASE: sqlite
+ SERVER_NAME: synapse
+ ports:
+ - 8008:8008
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install nextest
uses: taiki-e/install-action@nextest
@@ -509,24 +479,11 @@ jobs:
with:
python-version: 3.8
- # local synapse
- - uses: michaelkaye/setup-matrix-synapse@main
- with:
- uploadLogs: true
- httpPort: 8228
- disableRateLimiting: true
-
- # latest sliding sync proxy
-
- - uses: addnab/docker-run-action@v3
- with:
- registry: gcr.io
- image: "matrix-org/sliding-sync:v0.98.0"
- docker_network: "host"
- options: '-e "SYNCV3_SERVER=http://locahost:8228" -e "SYNCV3_SECRET=SUPER_CI_SECRET" -e "SYNCV3_BINDADDR=:8118" -e "SYNCV3_DB=user=postgres password=postgres dbname=syncv3 sslmode=disable host=postgres" -p 8118:8118'
-
- name: Test
- uses: actions-rs/cargo@v1
- with:
- command: nextest
- args: run -p sliding-sync-integration-tests
+ env:
+ RUST_LOG: "hyper=trace"
+ HOMESERVER_URL: "http://localhost:8008"
+ HOMESERVER_DOMAIN: "synapse"
+ SLIDING_SYNC_PROXY_URL: "http://localhost:8118"
+ run: |
+ cargo nextest run -p sliding-sync-integration-test
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index a4103d8b7a8..07355e53e69 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -6,6 +6,10 @@ on:
pull_request:
branches: [main]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
env:
CARGO_TERM_COLOR: always
@@ -22,20 +26,15 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install tarpaulin
- uses: actions-rs/cargo@v1
+ uses: taiki-e/install-action@v2
with:
- command: install
- args: cargo-tarpaulin
+ tool: cargo-tarpaulin
# set up backend for integration tests
- uses: actions/setup-python@v4
@@ -50,10 +49,15 @@ jobs:
serverName: "matrix-sdk.rs"
- name: Run tarpaulin
- uses: actions-rs/cargo@v1
- with:
- command: tarpaulin
- args: --out Xml -e sliding-sync-integration-test
+ run: |
+ cargo tarpaulin --out Xml -e sliding-sync-integration-test
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
+ with:
+ # Work around frequent upload errors, for runs inside the main repo (not PRs from forks).
+ # Otherwise not required for public repos.
+ token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
+ # The upload sometimes fails due to https://github.com/codecov/codecov-action/issues/837.
+ # To make sure that the failure gets flagged clearly in the UI, fail the action.
+ fail_ci_if_error: true
diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
index 8444a87e4eb..b6bad5b95e6 100644
--- a/.github/workflows/documentation.yml
+++ b/.github/workflows/documentation.yml
@@ -5,6 +5,10 @@ on:
branches: [main]
pull_request:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
docs:
name: All crates
@@ -16,11 +20,7 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: nightly
- override: true
+ uses: dtolnay/rust-toolchain@nightly
- name: Install Node.js
uses: actions/setup-node@v3
@@ -28,18 +28,16 @@ jobs:
node-version: 18
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
# Keep in sync with xtask docs
- name: Build rust documentation
- uses: actions-rs/cargo@v1
env:
# Work around https://github.com/rust-lang/cargo/issues/10744
CARGO_TARGET_APPLIES_TO_HOST: "true"
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options --cfg docsrs -Dwarnings"
- with:
- command: doc
- args: --no-deps --features docsrs
+ run:
+ cargo doc --no-deps --features docsrs
- name: Build `matrix-sdk-crypto-nodejs` doc
run: |
diff --git a/.github/workflows/release-crypto-nodejs.yml b/.github/workflows/release-crypto-nodejs.yml
index 4296708d82e..d682a3e606f 100644
--- a/.github/workflows/release-crypto-nodejs.yml
+++ b/.github/workflows/release-crypto-nodejs.yml
@@ -76,16 +76,13 @@ jobs:
- uses: actions/checkout@v3
if: "${{ !inputs.tag }}"
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@nightly
with:
- toolchain: nightly
- profile: minimal
- target: ${{ matrix.target }}
- override: true
+ targets: ${{ matrix.target }}
- name: Install Node.js
uses: actions/setup-node@v3
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- if: ${{ matrix.apt_install }}
run: |
sudo apt-get update
@@ -117,11 +114,7 @@ jobs:
- uses: actions/checkout@v3
if: "${{ !inputs.tag }}"
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: nightly
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@nightly
- name: Install Node.js
uses: actions/setup-node@v3
- name: Build lib
diff --git a/.github/workflows/release_crypto_js.yml b/.github/workflows/release_crypto_js.yml
index be60ad3834f..f5b9b0b0955 100644
--- a/.github/workflows/release_crypto_js.yml
+++ b/.github/workflows/release_crypto_js.yml
@@ -29,15 +29,12 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- target: wasm32-unknown-unknown
- profile: minimal
- override: true
+ targets: wasm32-unknown-unknown
- name: Load cache
- uses: Swatinem/rust-cache@v1
+ uses: Swatinem/rust-cache@v2
- name: Install Node.js
uses: actions/setup-node@v3
diff --git a/.github/workflows/xtask.yml b/.github/workflows/xtask.yml
new file mode 100644
index 00000000000..aa4303f6dc4
--- /dev/null
+++ b/.github/workflows/xtask.yml
@@ -0,0 +1,76 @@
+# A reusable github actions workflow that will build xtask, if it is not
+# already cached.
+#
+# It will create a pair of GHA cache entries, if they do not already exist.
+# The cache keys take the form `xtask-{os}-{hash}`, where "{os}" is "linux"
+# or "macos", and "{hash}" is the hash of the xtask# directory.
+#
+# The cache keys are written to output variables named "cachekey-{os}".
+#
+
+name: Build xtask if necessary
+
+on:
+ workflow_call:
+ outputs:
+ cachekey-linux:
+ description: "The cache key for the linux build artifact"
+ value: "${{ jobs.xtask.outputs.cachekey-linux }}"
+ cachekey-macos:
+ description: "The cache key for the macos build artifact"
+ value: "${{ jobs.xtask.outputs.cachekey-macos }}"
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ xtask:
+ name: "xtask-${{ matrix.os-name }}"
+
+ strategy:
+ fail-fast: true
+ matrix:
+ include:
+ - os: ubuntu-latest
+ os-name: π§
+ cachekey-id: linux
+
+ - os: macos-12
+ os-name: π
+ cachekey-id: macos
+
+ runs-on: "${{ matrix.os }}"
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v3
+
+ - name: Calculate cache key
+ id: cachekey
+ # set a step output variable "cachekey-{os}" that can be referenced in
+ # the job outputs below.
+ run: |
+ echo "cachekey-${{ matrix.cachekey-id }}=xtask-${{ matrix.cachekey-id }}-${{ hashFiles('Cargo.toml', 'xtask/**') }}" >> $GITHUB_OUTPUT
+
+ - name: Check xtask cache
+ uses: actions/cache@v3
+ id: xtask-cache
+ with:
+ path: target/debug/xtask
+ # use the cache key calculated in the step above. Bit of an awkard
+ # syntax
+ key: |
+ ${{ steps.cachekey.outputs[format('cachekey-{0}', matrix.cachekey-id)] }}
+
+ - name: Install rust stable toolchain
+ if: steps.xtask-cache.outputs.cache-hit != 'true'
+ uses: dtolnay/rust-toolchain@stable
+
+ - name: Build
+ if: steps.xtask-cache.outputs.cache-hit != 'true'
+ run: |
+ cargo build -p xtask
+
+ outputs:
+ "cachekey-linux": "${{ steps.cachekey.outputs.cachekey-linux }}"
+ "cachekey-macos": "${{ steps.cachekey.outputs.cachekey-macos }}"
diff --git a/.gitignore b/.gitignore
index b9a0e4f3854..d202f963ade 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ emsdk-*
.idea/
.env
.build
+.swiftpm
/Package.swift
## User settings
diff --git a/.typos.toml b/.typos.toml
index 0f725247480..e274b4d9a65 100644
--- a/.typos.toml
+++ b/.typos.toml
@@ -5,7 +5,9 @@ Fo = "Fo"
BA = "BA"
UE = "UE"
Ure = "Ure"
+OFO = "OFO"
Ot = "Ot"
+ket = "ket"
# This is the thead html tag, remove this once typos is updated in the github
# action. 1.3.1 seems to work correctly, while 1.11.0 on the CI seems to get
# this wrong
diff --git a/CONVENTIONAL_COMMITS.md b/CONVENTIONAL_COMMITS.md
deleted file mode 100644
index f3d3b135834..00000000000
--- a/CONVENTIONAL_COMMITS.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Conventional Commits
-
-This project uses [Conventional
-Commits](https://www.conventionalcommits.org/). Read the
-[Summary](https://www.conventionalcommits.org/en/v1.0.0/#summary) or
-the [Full
-Specification](https://www.conventionalcommits.org/en/v1.0.0/#specification)
-to learn more.
-
-## Types
-
-Conventional Commits defines _type_ (as in `type(scope):
-message`). This section aims at listing the types used inside this
-project:
-
-| Type | Definition |
-|-|-|
-| `feat` | About a new feature. |
-| `fix` | About a bug fix. |
-| `test` | About a test (suite, case, runnerβ¦). |
-| `docs` | About a documentation modification. |
-| `refactor` | About a refactoring. |
-| `ci` | About a Continuous Integration modification. |
-| `chore` | About some cleanup, or regular tasks. |
-
-## Scopes
-
-Conventional Commits defines _scope_ (as in `type(scope): message`). This
-section aims at listing all the scopes used inside this project:
-
-
-
-
- Group |
- Scope |
- Definition |
-
-
-
-
- Crates |
- sdk |
- About the matrix-sdk crate. |
-
-
- appservice |
- About the matrix-sdk-appservice crate. |
-
-
- base |
- About the matrix-sdk-base crate. |
-
-
- common |
- About the matrix-sdk-common crate. |
-
-
- crypto |
- About the matrix-sdk-crypto crate. |
-
-
- indexeddb |
- About the matrix-sdk-indexeddb crate. |
-
-
- qrcode |
- About the matrix-sdk-qrcode crate. |
-
-
- sled |
- About the matrix-sdk-sled crate. |
-
-
- store-encryption |
- About the matrix-sdk-store-encryption crate. |
-
-
- test |
- About the matrix-sdk-test and matrix-sdk-test-macros crate. |
-
-
- Bindings |
- apple |
- About the matrix-rust-components-swift binding. |
-
-
- crypto-nodejs |
- About the matrix-sdk-crypto-nodejs binding. |
-
-
- crypto-js |
- About the matrix-sdk-crypto-js binding. |
-
-
- crypto-ffi |
- About the matrix-sdk-crypto-ffi binding. |
-
-
- ffi |
- About the matrix-sdk-ffi binding. |
-
-
- Labs |
- sled-state-inspector |
- About the sled-state-inspector project. |
-
-
- Continuous Integration |
- xtask |
- About the xtask project. |
-
-
-
-
-## Generating `CHANGELOG.md`
-
-The [`git-cliff`](https://github.com/orhun/git-cliff) project is used
-to generate `CHANGELOG.md` automatically. Hence the various
-`cliff.toml` files that are present in this project, or the
-`package.metadata.git-cliff` sections in various `Cargo.toml` files.
-
-Its companion,
-[`git-cliff-action`](https://github.com/orhun/git-cliff-action)
-project, is used inside Github Action workflows.
diff --git a/Cargo.lock b/Cargo.lock
index f26a4071516..aa81aadd222 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -57,9 +57,9 @@ dependencies = [
[[package]]
name = "ahash"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107"
+checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
dependencies = [
"cfg-if",
"getrandom 0.2.8",
@@ -82,18 +82,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e"
-[[package]]
-name = "android_logger"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8619b80c242aa7bd638b5c7ddd952addeecb71f69c75e33f1d47b2804f8f883a"
-dependencies = [
- "android_log-sys",
- "env_logger",
- "log",
- "once_cell",
-]
-
[[package]]
name = "android_system_properties"
version = "0.1.5"
@@ -111,9 +99,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
[[package]]
name = "anyhow"
-version = "1.0.68"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"
+checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
[[package]]
name = "anymap2"
@@ -123,9 +111,9 @@ checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c"
[[package]]
name = "app_dirs2"
-version = "2.5.4"
+version = "2.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47a8d2d8dbda5fca0a522259fb88e4f55d2b10ad39f5f03adeebf85031eba501"
+checksum = "a7e7b35733e3a8c1ccb90385088dd5b6eaa61325cb4d1ad56e683b5224ff352e"
dependencies = [
"jni",
"ndk-context",
@@ -209,7 +197,7 @@ dependencies = [
"quote",
"serde",
"syn",
- "toml",
+ "toml 0.5.11",
]
[[package]]
@@ -258,6 +246,55 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "async-executor"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b"
+dependencies = [
+ "async-lock",
+ "async-task",
+ "concurrent-queue",
+ "fastrand",
+ "futures-lite",
+ "slab",
+]
+
+[[package]]
+name = "async-global-executor"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776"
+dependencies = [
+ "async-channel",
+ "async-executor",
+ "async-io",
+ "async-lock",
+ "blocking",
+ "futures-lite",
+ "once_cell",
+]
+
+[[package]]
+name = "async-io"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794"
+dependencies = [
+ "async-lock",
+ "autocfg",
+ "concurrent-queue",
+ "futures-lite",
+ "libc",
+ "log",
+ "parking",
+ "polling",
+ "slab",
+ "socket2",
+ "waker-fn",
+ "windows-sys 0.42.0",
+]
+
[[package]]
name = "async-lock"
version = "2.6.0"
@@ -270,9 +307,54 @@ dependencies = [
[[package]]
name = "async-once-cell"
-version = "0.4.2"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "390a110411bbc7c93b77a736cbd694f64cb06dfa2702173f63169d7a1e1b5298"
+
+[[package]]
+name = "async-process"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4"
+dependencies = [
+ "async-io",
+ "async-lock",
+ "autocfg",
+ "blocking",
+ "cfg-if",
+ "event-listener",
+ "futures-lite",
+ "libc",
+ "signal-hook",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
+name = "async-std"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f61305cacf1d0c5c9d3ee283d22f8f1f8c743a18ceb44a1b102bd53476c141de"
+checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
+dependencies = [
+ "async-channel",
+ "async-global-executor",
+ "async-io",
+ "async-lock",
+ "async-process",
+ "crossbeam-utils",
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-lite",
+ "gloo-timers",
+ "kv-log-macro",
+ "log",
+ "memchr",
+ "once_cell",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+ "wasm-bindgen-futures",
+]
[[package]]
name = "async-stream"
@@ -295,11 +377,17 @@ dependencies = [
"syn",
]
+[[package]]
+name = "async-task"
+version = "4.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524"
+
[[package]]
name = "async-trait"
-version = "0.1.61"
+version = "0.1.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282"
+checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2"
dependencies = [
"proc-macro2",
"quote",
@@ -315,6 +403,12 @@ dependencies = [
"autocfg",
]
+[[package]]
+name = "atomic-waker"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599"
+
[[package]]
name = "atty"
version = "0.2.14"
@@ -334,9 +428,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "axum"
-version = "0.6.2"
+version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1304eab461cf02bd70b083ed8273388f9724c549b316ba3d1e213ce0e9e7fb7e"
+checksum = "4e246206a63c9830e118d12c894f56a82033da1a2361f5544deeee3df85c99d9"
dependencies = [
"async-trait",
"axum-core",
@@ -365,9 +459,9 @@ dependencies = [
[[package]]
name = "axum-core"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f487e40dc9daee24d8a1779df88522f159a54a980f99cfbe43db0be0bd3444a8"
+checksum = "1cae3e661676ffbacb30f1a824089a8c9150e71017f7e1e38f2aa32009188d34"
dependencies = [
"async-trait",
"bytes",
@@ -415,12 +509,6 @@ version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
-[[package]]
-name = "base64"
-version = "0.20.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
-
[[package]]
name = "base64"
version = "0.21.0"
@@ -457,27 +545,21 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bit-set"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
-dependencies = [
- "bit-vec",
-]
-
-[[package]]
-name = "bit-vec"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
-
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+[[package]]
+name = "bitmaps"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2"
+dependencies = [
+ "typenum",
+]
+
[[package]]
name = "blake3"
version = "1.3.3"
@@ -519,6 +601,20 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "blocking"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8"
+dependencies = [
+ "async-channel",
+ "async-lock",
+ "async-task",
+ "atomic-waker",
+ "fastrand",
+ "futures-lite",
+]
+
[[package]]
name = "bs58"
version = "0.4.0"
@@ -527,15 +623,15 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
[[package]]
name = "bumpalo"
-version = "3.11.1"
+version = "3.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
+checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
[[package]]
name = "bytemuck"
-version = "1.12.3"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f"
+checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393"
[[package]]
name = "byteorder"
@@ -545,9 +641,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "bytes"
-version = "1.3.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"
+checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
[[package]]
name = "bytesize"
@@ -575,9 +671,9 @@ dependencies = [
[[package]]
name = "cargo_metadata"
-version = "0.15.2"
+version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "982a0cf6a99c350d7246035613882e376d58cebe571785abc5da4f648d53ac0a"
+checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07"
dependencies = [
"camino",
"cargo-platform",
@@ -610,9 +706,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.78"
+version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
+checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
[[package]]
name = "cesu8"
@@ -737,13 +833,13 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.0.32"
+version = "4.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7db700bc935f9e43e88d00b0850dae18a63773cfbec6d8e070fccf7fef89a39"
+checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5"
dependencies = [
"bitflags",
- "clap_derive 4.0.21",
- "clap_lex 0.3.0",
+ "clap_derive 4.1.8",
+ "clap_lex 0.3.1",
"is-terminal",
"once_cell",
"strsim",
@@ -765,9 +861,9 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.0.21"
+version = "4.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014"
+checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0"
dependencies = [
"heck",
"proc-macro-error",
@@ -787,24 +883,13 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8"
+checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
dependencies = [
"os_str_bytes",
]
-[[package]]
-name = "clipboard-win"
-version = "4.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362"
-dependencies = [
- "error-code",
- "str-buf",
- "winapi",
-]
-
[[package]]
name = "cmake"
version = "0.1.49"
@@ -842,24 +927,24 @@ dependencies = [
[[package]]
name = "concurrent-queue"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b"
+checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "console"
-version = "0.15.4"
+version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9b6515d269224923b26b5febea2ed42b2d5f2ce37284a4dd670fedd6cb8347a"
+checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60"
dependencies = [
"encode_unicode",
"lazy_static",
"libc",
"unicode-width",
- "windows-sys",
+ "windows-sys 0.42.0",
]
[[package]]
@@ -1107,9 +1192,9 @@ dependencies = [
[[package]]
name = "cxx"
-version = "1.0.86"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579"
+checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62"
dependencies = [
"cc",
"cxxbridge-flags",
@@ -1119,9 +1204,9 @@ dependencies = [
[[package]]
name = "cxx-build"
-version = "1.0.86"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70"
+checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690"
dependencies = [
"cc",
"codespan-reporting",
@@ -1134,53 +1219,18 @@ dependencies = [
[[package]]
name = "cxxbridge-flags"
-version = "1.0.86"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c"
+checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf"
[[package]]
name = "cxxbridge-macro"
-version = "1.0.86"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "darling"
-version = "0.14.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa"
-dependencies = [
- "darling_core",
- "darling_macro",
-]
-
-[[package]]
-name = "darling_core"
-version = "0.14.2"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f"
+checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892"
dependencies = [
- "fnv",
- "ident_case",
"proc-macro2",
"quote",
- "strsim",
- "syn",
-]
-
-[[package]]
-name = "darling_macro"
-version = "0.14.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e"
-dependencies = [
- "darling_core",
- "quote",
"syn",
]
@@ -1194,7 +1244,7 @@ dependencies = [
"hashbrown",
"lock_api",
"once_cell",
- "parking_lot_core 0.9.5",
+ "parking_lot_core 0.9.7",
]
[[package]]
@@ -1278,44 +1328,14 @@ dependencies = [
"syn",
]
-[[package]]
-name = "derive_builder"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
-dependencies = [
- "derive_builder_macro",
-]
-
-[[package]]
-name = "derive_builder_core"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
-dependencies = [
- "darling",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "derive_builder_macro"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
-dependencies = [
- "derive_builder_core",
- "syn",
-]
-
[[package]]
name = "dialoguer"
-version = "0.10.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1"
+checksum = "af3c796f3b0b408d9fd581611b47fa850821fcb84aa640b83a3c1a5be2d691f2"
dependencies = [
"console",
+ "shell-words",
"tempfile",
"zeroize",
]
@@ -1349,16 +1369,6 @@ dependencies = [
"dirs-sys",
]
-[[package]]
-name = "dirs-next"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
-dependencies = [
- "cfg-if",
- "dirs-sys-next",
-]
-
[[package]]
name = "dirs-sys"
version = "0.3.7"
@@ -1370,23 +1380,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "dirs-sys-next"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
-dependencies = [
- "libc",
- "redox_users",
- "winapi",
-]
-
-[[package]]
-name = "discard"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
-
[[package]]
name = "displaydoc"
version = "0.2.3"
@@ -1400,9 +1393,9 @@ dependencies = [
[[package]]
name = "ed25519"
-version = "1.5.2"
+version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369"
+checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
dependencies = [
"serde",
"signature",
@@ -1425,9 +1418,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.8.0"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
+checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
[[package]]
name = "encode_unicode"
@@ -1437,29 +1430,13 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "encoding_rs"
-version = "0.8.31"
+version = "0.8.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
+checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
dependencies = [
"cfg-if",
]
-[[package]]
-name = "endian-type"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
-
-[[package]]
-name = "env_logger"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
-dependencies = [
- "log",
- "regex",
-]
-
[[package]]
name = "errno"
version = "0.2.8"
@@ -1481,16 +1458,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "error-code"
-version = "2.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21"
-dependencies = [
- "libc",
- "str-buf",
-]
-
[[package]]
name = "event-listener"
version = "2.5.3"
@@ -1557,7 +1524,7 @@ name = "example-emoji-verification"
version = "0.1.0"
dependencies = [
"anyhow",
- "clap 4.0.32",
+ "clap 4.1.8",
"futures",
"matrix-sdk",
"tokio",
@@ -1610,14 +1577,27 @@ dependencies = [
"url",
]
+[[package]]
+name = "example-persist-session"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "dirs",
+ "matrix-sdk",
+ "rand 0.8.5",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tracing-subscriber",
+]
+
[[package]]
name = "example-timeline"
version = "0.1.0"
dependencies = [
"anyhow",
- "clap 4.0.32",
+ "clap 4.1.8",
"futures",
- "futures-signals",
"matrix-sdk",
"tokio",
"tracing-subscriber",
@@ -1635,6 +1615,28 @@ dependencies = [
"syn",
]
+[[package]]
+name = "eyeball"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c7be1d67275032c662cadf525a79aef6909469579c5d81c69c148f7257257af"
+dependencies = [
+ "futures-core",
+ "readlock",
+]
+
+[[package]]
+name = "eyeball-im"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bb8a6cfd1f5947d0426dcb753723318d5922c738e905be7af167547565f81d9"
+dependencies = [
+ "futures-core",
+ "im",
+ "tokio",
+ "tokio-stream",
+]
+
[[package]]
name = "eyre"
version = "0.6.8"
@@ -1657,36 +1659,15 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
-[[package]]
-name = "fancy-regex"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d6b8560a05112eb52f04b00e5d3790c0dd75d9d980eb8a122fb23b92a623ccf"
-dependencies = [
- "bit-set",
- "regex",
-]
-
[[package]]
name = "fastrand"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
+checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
dependencies = [
"instant",
]
-[[package]]
-name = "fd-lock"
-version = "3.0.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb21c69b9fea5e15dbc1049e4b77145dd0ba1c84019c488102de0dc4ea4b0a27"
-dependencies = [
- "cfg-if",
- "rustix",
- "windows-sys",
-]
-
[[package]]
name = "findshlibs"
version = "0.10.2"
@@ -1763,15 +1744,25 @@ dependencies = [
[[package]]
name = "fs_extra"
-version = "1.2.0"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
+
+[[package]]
+name = "futf"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+dependencies = [
+ "mac",
+ "new_debug_unreachable",
+]
[[package]]
name = "futures"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0"
+checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84"
dependencies = [
"futures-channel",
"futures-core",
@@ -1784,9 +1775,9 @@ dependencies = [
[[package]]
name = "futures-channel"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
+checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5"
dependencies = [
"futures-core",
"futures-sink",
@@ -1794,15 +1785,15 @@ dependencies = [
[[package]]
name = "futures-core"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"
+checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608"
[[package]]
name = "futures-executor"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2"
+checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e"
dependencies = [
"futures-core",
"futures-task",
@@ -1811,9 +1802,9 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
+checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531"
[[package]]
name = "futures-lite"
@@ -1832,41 +1823,26 @@ dependencies = [
[[package]]
name = "futures-macro"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
+checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
-[[package]]
-name = "futures-signals"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3acc659ba666cff13fdf65242d16428f2f11935b688f82e4024ad39667a5132"
-dependencies = [
- "discard",
- "futures-channel",
- "futures-core",
- "futures-util",
- "log",
- "pin-project",
- "serde",
-]
-
[[package]]
name = "futures-sink"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9"
+checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364"
[[package]]
name = "futures-task"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"
+checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366"
[[package]]
name = "futures-timer"
@@ -1876,9 +1852,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
[[package]]
name = "futures-util"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
+checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1"
dependencies = [
"futures-channel",
"futures-core",
@@ -1949,9 +1925,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.27.0"
+version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793"
+checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
[[package]]
name = "glob"
@@ -1959,6 +1935,18 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+[[package]]
+name = "gloo-timers"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "js-sys",
+ "wasm-bindgen",
+]
+
[[package]]
name = "gloo-utils"
version = "0.1.6"
@@ -2028,9 +2016,9 @@ dependencies = [
[[package]]
name = "heck"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
@@ -2050,6 +2038,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "hermit-abi"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
+
[[package]]
name = "hkdf"
version = "0.12.3"
@@ -2068,6 +2062,20 @@ dependencies = [
"digest 0.10.6",
]
+[[package]]
+name = "html5ever"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "http"
version = "0.2.8"
@@ -2131,9 +2139,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
[[package]]
name = "hyper"
-version = "0.14.23"
+version = "0.14.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c"
+checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c"
dependencies = [
"bytes",
"futures-channel",
@@ -2215,12 +2223,6 @@ dependencies = [
"cxx-build",
]
-[[package]]
-name = "ident_case"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
-
[[package]]
name = "idna"
version = "0.3.0"
@@ -2231,6 +2233,21 @@ dependencies = [
"unicode-normalization",
]
+[[package]]
+name = "im"
+version = "15.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9"
+dependencies = [
+ "bitmaps",
+ "rand_core 0.6.4",
+ "rand_xoshiro",
+ "serde",
+ "sized-chunks",
+ "typenum",
+ "version_check",
+]
+
[[package]]
name = "image"
version = "0.23.14"
@@ -2301,9 +2318,9 @@ dependencies = [
[[package]]
name = "indoc"
-version = "1.0.8"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da2d6f23ffea9d7e76c53eee25dfb67bcd8fde7f1198b0855350698c9f07c780"
+checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306"
[[package]]
name = "infer"
@@ -2313,13 +2330,13 @@ checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac"
[[package]]
name = "inferno"
-version = "0.11.13"
+version = "0.11.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7207d75fcf6c1868f1390fc1c610431fe66328e9ee6813330a041ef6879eca1"
+checksum = "2fb7c1b80a1dfa604bb4a649a5c5aeef3d913f7c520cb42b40e534e8a61bcdfc"
dependencies = [
- "ahash 0.8.2",
- "atty",
+ "ahash 0.8.3",
"indexmap",
+ "is-terminal",
"itoa",
"log",
"num-format",
@@ -2353,12 +2370,12 @@ dependencies = [
[[package]]
name = "io-lifetimes"
-version = "1.0.3"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
+checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3"
dependencies = [
"libc",
- "windows-sys",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -2369,14 +2386,14 @@ checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146"
[[package]]
name = "is-terminal"
-version = "0.4.2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189"
+checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef"
dependencies = [
- "hermit-abi 0.2.6",
+ "hermit-abi 0.3.1",
"io-lifetimes",
"rustix",
- "windows-sys",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -2409,11 +2426,12 @@ version = "0.2.0"
dependencies = [
"app_dirs2",
"chrono",
- "clap 4.0.32",
+ "clap 4.1.8",
"dialoguer",
+ "eyeball",
+ "eyeball-im",
"eyre",
"futures",
- "futures-signals",
"log4rs",
"matrix-sdk",
"matrix-sdk-common",
@@ -2431,16 +2449,18 @@ dependencies = [
[[package]]
name = "jni"
-version = "0.19.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec"
+checksum = "19bfb8e36ca99b00e6d368320e0822dec9d81db4ccf122f82091f972c90b9985"
dependencies = [
"cesu8",
+ "cfg-if",
"combine",
"jni-sys",
"log",
"thiserror",
"walkdir",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -2469,9 +2489,9 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.60"
+version = "0.3.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
+checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
dependencies = [
"wasm-bindgen",
]
@@ -2516,6 +2536,15 @@ version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "984e109462d46ad18314f10e392c286c3d47bce203088a09012de1015b45b737"
+[[package]]
+name = "kv-log-macro"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
+dependencies = [
+ "log",
+]
+
[[package]]
name = "lazy-regex"
version = "2.4.1"
@@ -2561,6 +2590,12 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "libm"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
+
[[package]]
name = "libsqlite3-sys"
version = "0.25.2"
@@ -2604,6 +2639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
+ "value-bag",
]
[[package]]
@@ -2640,12 +2676,32 @@ dependencies = [
"thread-id",
]
+[[package]]
+name = "mac"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+
[[package]]
name = "maplit"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
+[[package]]
+name = "markup5ever"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+dependencies = [
+ "log",
+ "phf 0.10.1",
+ "phf_codegen",
+ "string_cache",
+ "string_cache_codegen",
+ "tendril",
+]
+
[[package]]
name = "matchers"
version = "0.1.0"
@@ -2700,17 +2756,19 @@ dependencies = [
"chrono",
"ctor",
"dashmap",
- "derive_builder",
"dirs",
"event-listener",
+ "eyeball",
+ "eyeball-im",
"eyre",
"futures",
"futures-core",
- "futures-signals",
"futures-util",
"getrandom 0.2.8",
+ "gloo-timers",
"http",
"hyper",
+ "im",
"image 0.24.5",
"indexmap",
"matrix-sdk-base",
@@ -2719,7 +2777,9 @@ dependencies = [
"matrix-sdk-sled",
"matrix-sdk-test",
"mime",
+ "mime_guess",
"once_cell",
+ "pin-project-lite",
"rand 0.8.5",
"reqwest",
"ruma",
@@ -2729,13 +2789,12 @@ dependencies = [
"tempfile",
"thiserror",
"tokio",
- "tokio-stream",
"tower",
"tracing",
"tracing-subscriber",
"url",
+ "uuid",
"wasm-bindgen-test",
- "wasm-timer",
"wiremock",
"zeroize",
]
@@ -2770,15 +2829,15 @@ dependencies = [
name = "matrix-sdk-base"
version = "0.6.1"
dependencies = [
+ "assert_matches",
"assign",
"async-stream",
"async-trait",
"ctor",
"dashmap",
+ "eyeball",
"futures",
- "futures-channel",
"futures-core",
- "futures-signals",
"futures-util",
"http",
"matrix-sdk-common",
@@ -2804,6 +2863,7 @@ dependencies = [
"async-lock",
"futures-core",
"futures-util",
+ "gloo-timers",
"instant",
"matrix-sdk-test",
"ruma",
@@ -2812,7 +2872,6 @@ dependencies = [
"tokio",
"wasm-bindgen-futures",
"wasm-bindgen-test",
- "wasm-timer",
]
[[package]]
@@ -2823,22 +2882,25 @@ dependencies = [
"anyhow",
"aquamarine",
"assert_matches",
+ "async-std",
"async-trait",
"atomic",
- "base64 0.20.0",
+ "base64 0.21.0",
"bs58",
"byteorder",
"cfg-if",
+ "ctor",
"ctr",
"dashmap",
"event-listener",
+ "eyeball",
"futures",
"futures-core",
- "futures-signals",
"futures-util",
"hmac",
"http",
"indoc",
+ "itertools 0.10.5",
"matrix-sdk-common",
"matrix-sdk-qrcode",
"matrix-sdk-test",
@@ -2846,6 +2908,7 @@ dependencies = [
"pbkdf2",
"proptest",
"rand 0.8.5",
+ "rmp-serde",
"ruma",
"serde",
"serde_json",
@@ -2863,7 +2926,7 @@ name = "matrix-sdk-crypto-ffi"
version = "0.1.0"
dependencies = [
"anyhow",
- "base64 0.20.0",
+ "base64 0.21.0",
"futures-util",
"hmac",
"http",
@@ -2917,6 +2980,7 @@ dependencies = [
"matrix-sdk-common",
"matrix-sdk-crypto",
"matrix-sdk-sled",
+ "matrix-sdk-sqlite",
"napi",
"napi-build",
"napi-derive",
@@ -2931,12 +2995,12 @@ dependencies = [
name = "matrix-sdk-ffi"
version = "0.2.0"
dependencies = [
- "android_logger",
"anyhow",
"base64 0.21.0",
"extension-trait",
+ "eyeball",
+ "eyeball-im",
"futures-core",
- "futures-signals",
"futures-util",
"log-panics",
"matrix-sdk",
@@ -2944,15 +3008,18 @@ dependencies = [
"once_cell",
"opentelemetry",
"opentelemetry-otlp",
+ "ruma",
"sanitize-filename-reader-friendly",
"serde_json",
"thiserror",
"tokio",
"tokio-stream",
"tracing",
+ "tracing-android",
"tracing-opentelemetry",
"tracing-subscriber",
"uniffi",
+ "url",
"zeroize",
]
@@ -2961,10 +3028,10 @@ name = "matrix-sdk-indexeddb"
version = "0.2.0"
dependencies = [
"anyhow",
+ "assert_matches",
"async-trait",
- "base64 0.20.0",
+ "base64 0.21.0",
"dashmap",
- "derive_builder",
"getrandom 0.2.8",
"gloo-utils",
"indexed_db_futures",
@@ -3004,7 +3071,7 @@ dependencies = [
name = "matrix-sdk-qrcode"
version = "0.4.0"
dependencies = [
- "base64 0.20.0",
+ "base64 0.21.0",
"byteorder",
"image 0.23.14",
"qrcode",
@@ -3020,7 +3087,6 @@ dependencies = [
"async-stream",
"async-trait",
"dashmap",
- "derive_builder",
"fs_extra",
"futures-core",
"futures-util",
@@ -3064,12 +3130,12 @@ dependencies = [
"ruma",
"rusqlite",
"serde",
- "serde_json",
"tempfile",
"thiserror",
"tokio",
"tracing",
"tracing-subscriber",
+ "vodozemac",
]
[[package]]
@@ -3084,6 +3150,7 @@ dependencies = [
"hmac",
"pbkdf2",
"rand 0.8.5",
+ "rmp-serde",
"serde",
"serde_json",
"sha2 0.10.6",
@@ -3190,14 +3257,14 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de"
+checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
dependencies = [
"libc",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
- "windows-sys",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -3208,9 +3275,9 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
[[package]]
name = "napi"
-version = "2.10.5"
+version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83c8ae31209e4268eae6003d37c298135d0f36e721b4d1fa91dd938a52388ccf"
+checksum = "2412d19892730f62fd592f8af41606ca6717ea1eca026103cd44b447829f00c1"
dependencies = [
"bitflags",
"ctor",
@@ -3228,9 +3295,9 @@ checksum = "882a73d9ef23e8dc2ebbffb6a6ae2ef467c0f18ac10711e4cc59c5485d41df0e"
[[package]]
name = "napi-derive"
-version = "2.9.3"
+version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af4e44e34e70aa61be9036ae652e27c20db5bca80e006be0f482419f6601352a"
+checksum = "03f15c1ac0eac01eca2a24c27905ab47f7411acefd829d0d01fb131dc39befd7"
dependencies = [
"convert_case",
"napi-derive-backend",
@@ -3241,9 +3308,9 @@ dependencies = [
[[package]]
name = "napi-derive-backend"
-version = "1.0.40"
+version = "1.0.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17925fff04b6fa636f8e4b4608cc1a4f1360b64ac8ecbfdb7da1be1dc74f6843"
+checksum = "4930d5fa70f5663b9e7d6b4f0816b70d095574ee7f3c865fdb8c43b0f7e6406d"
dependencies = [
"convert_case",
"once_cell",
@@ -3255,9 +3322,9 @@ dependencies = [
[[package]]
name = "napi-sys"
-version = "2.2.2"
+version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "529671ebfae679f2ce9630b62dd53c72c56b3eb8b2c852e7e2fa91704ff93d67"
+checksum = "166b5ef52a3ab5575047a9fe8d4a030cdd0f63c96f071cd6907674453b07bae3"
dependencies = [
"libloading",
]
@@ -3287,13 +3354,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
[[package]]
-name = "nibble_vec"
-version = "0.1.0"
+name = "new_debug_unreachable"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
-dependencies = [
- "smallvec",
-]
+checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
[[package]]
name = "nix"
@@ -3308,14 +3372,23 @@ dependencies = [
[[package]]
name = "nom"
-version = "7.1.2"
+version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5507769c4919c998e69e49c839d9dc6e693ede4cc4290d6ad8b41d4f09c548c"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
+[[package]]
+name = "nom8"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
@@ -3386,6 +3459,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
"autocfg",
+ "libm",
]
[[package]]
@@ -3400,9 +3474,9 @@ dependencies = [
[[package]]
name = "object"
-version = "0.30.1"
+version = "0.30.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d864c91689fdc196779b98dba0aceac6118594c2df6ee5d943eb6a8df4d107a"
+checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
dependencies = [
"memchr",
]
@@ -3432,9 +3506,9 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.17.0"
+version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
+checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
[[package]]
name = "oorandom"
@@ -3624,7 +3698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.5",
+ "parking_lot_core 0.9.7",
]
[[package]]
@@ -3643,15 +3717,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.5"
+version = "0.9.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba"
+checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
- "windows-sys",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -3691,14 +3765,94 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
[[package]]
name = "petgraph"
-version = "0.6.2"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143"
+checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4"
dependencies = [
"fixedbitset",
"indexmap",
]
+[[package]]
+name = "phf"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+dependencies = [
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
+dependencies = [
+ "phf_macros",
+ "phf_shared 0.11.1",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+dependencies = [
+ "phf_shared 0.10.0",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf"
+dependencies = [
+ "phf_shared 0.11.1",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66"
+dependencies = [
+ "phf_generator 0.11.1",
+ "phf_shared 0.11.1",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676"
+dependencies = [
+ "siphasher",
+]
+
[[package]]
name = "pin-project"
version = "1.0.12"
@@ -3805,6 +3959,20 @@ dependencies = [
"miniz_oxide 0.6.2",
]
+[[package]]
+name = "polling"
+version = "2.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "libc",
+ "log",
+ "wepoll-ffi",
+ "windows-sys 0.42.0",
+]
+
[[package]]
name = "poly1305"
version = "0.7.2"
@@ -3844,6 +4012,12 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
[[package]]
name = "prettyplease"
version = "0.1.23"
@@ -3856,13 +4030,12 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
-version = "1.2.1"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9"
+checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34"
dependencies = [
"once_cell",
- "thiserror",
- "toml",
+ "toml_edit 0.18.1",
]
[[package]]
@@ -3891,18 +4064,18 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.49"
+version = "1.0.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
+checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6"
dependencies = [
"unicode-ident",
]
[[package]]
name = "proptest"
-version = "1.0.0"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5"
+checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70"
dependencies = [
"bitflags",
"byteorder",
@@ -3913,13 +4086,14 @@ dependencies = [
"rand_chacha 0.3.1",
"rand_xorshift",
"regex-syntax",
+ "unarray",
]
[[package]]
name = "prost"
-version = "0.11.5"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c01db6702aa05baa3f57dec92b8eeeeb4cb19e894e73996b32a4093289e54592"
+checksum = "21dc42e00223fc37204bd4aa177e69420c604ca4a183209a8f9de30c6d934698"
dependencies = [
"bytes",
"prost-derive",
@@ -3927,13 +4101,13 @@ dependencies = [
[[package]]
name = "prost-build"
-version = "0.11.5"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb5320c680de74ba083512704acb90fe00f28f79207286a848e730c45dd73ed6"
+checksum = "a3f8ad728fb08fe212df3c05169e940fbb6d9d16a877ddde14644a983ba2012e"
dependencies = [
"bytes",
"heck",
- "itertools",
+ "itertools 0.10.5",
"lazy_static",
"log",
"multimap",
@@ -3949,9 +4123,9 @@ dependencies = [
[[package]]
name = "prost-derive"
-version = "0.11.5"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8842bad1a5419bca14eac663ba798f6bc19c413c2fdceb5f3ba3b0932d96720"
+checksum = "8bda8c0881ea9f722eb9629376db3d0b903b462477c1aafcb0566610ac28ac5d"
dependencies = [
"anyhow",
"itertools 0.10.5",
@@ -3962,9 +4136,9 @@ dependencies = [
[[package]]
name = "prost-types"
-version = "0.11.5"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "017f79637768cde62820bc2d4fe0e45daaa027755c323ad077767c6c5f173091"
+checksum = "a5e0526209433e96d83d750dd81a99118edbc55739e7e61a46764fd2ad537788"
dependencies = [
"bytes",
"prost",
@@ -4015,16 +4189,6 @@ dependencies = [
"proc-macro2",
]
-[[package]]
-name = "radix_trie"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
-dependencies = [
- "endian-type",
- "nibble_vec",
-]
-
[[package]]
name = "rand"
version = "0.7.3"
@@ -4105,6 +4269,15 @@ dependencies = [
"rand_core 0.6.4",
]
+[[package]]
+name = "rand_xoshiro"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
[[package]]
name = "rayon"
version = "1.6.1"
@@ -4117,9 +4290,9 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.10.1"
+version = "1.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3"
+checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
@@ -4127,6 +4300,12 @@ dependencies = [
"num_cpus",
]
+[[package]]
+name = "readlock"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35c8a22130504d1f661d1bc373b424f2d45910fa5319132d903a4074e1527b2e"
+
[[package]]
name = "redox_syscall"
version = "0.2.16"
@@ -4184,12 +4363,12 @@ dependencies = [
[[package]]
name = "reqwest"
-version = "0.11.13"
+version = "0.11.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c"
+checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9"
dependencies = [
"async-compression",
- "base64 0.13.1",
+ "base64 0.21.0",
"bytes",
"encoding_rs",
"futures-core",
@@ -4235,9 +4414,9 @@ checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0"
[[package]]
name = "rgb"
-version = "0.8.34"
+version = "0.8.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3603b7d71ca82644f79b5a06d1220e9a58ede60bd32255f698cb1af8838b8db3"
+checksum = "7495acf66551cdb696b7711408144bcd3194fc78e32f3a09e809bfe7dd4a7ce3"
dependencies = [
"bytemuck",
]
@@ -4281,8 +4460,8 @@ dependencies = [
[[package]]
name = "ruma"
-version = "0.7.4"
-source = "git+https://github.com/ruma/ruma?rev=00045e559f864eabff08295d603f7b3238288b6f#00045e559f864eabff08295d603f7b3238288b6f"
+version = "0.8.2"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
dependencies = [
"assign",
"js_int",
@@ -4291,12 +4470,13 @@ dependencies = [
"ruma-client-api",
"ruma-common",
"ruma-federation-api",
+ "ruma-push-gateway-api",
]
[[package]]
name = "ruma-appservice-api"
-version = "0.7.0"
-source = "git+https://github.com/ruma/ruma?rev=00045e559f864eabff08295d603f7b3238288b6f#00045e559f864eabff08295d603f7b3238288b6f"
+version = "0.8.1"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
dependencies = [
"js_int",
"ruma-common",
@@ -4306,8 +4486,8 @@ dependencies = [
[[package]]
name = "ruma-client-api"
-version = "0.15.3"
-source = "git+https://github.com/ruma/ruma?rev=00045e559f864eabff08295d603f7b3238288b6f#00045e559f864eabff08295d603f7b3238288b6f"
+version = "0.16.2"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
dependencies = [
"assign",
"bytes",
@@ -4323,13 +4503,14 @@ dependencies = [
[[package]]
name = "ruma-common"
-version = "0.10.5"
-source = "git+https://github.com/ruma/ruma?rev=00045e559f864eabff08295d603f7b3238288b6f#00045e559f864eabff08295d603f7b3238288b6f"
+version = "0.11.3"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
dependencies = [
- "base64 0.20.0",
+ "base64 0.21.0",
"bytes",
"form_urlencoded",
"getrandom 0.2.8",
+ "html5ever",
"http",
"indexmap",
"js-sys",
@@ -4337,6 +4518,7 @@ dependencies = [
"js_option",
"konst",
"percent-encoding",
+ "phf 0.11.1",
"pulldown-cmark",
"rand 0.8.5",
"regex",
@@ -4354,8 +4536,8 @@ dependencies = [
[[package]]
name = "ruma-federation-api"
-version = "0.6.0"
-source = "git+https://github.com/ruma/ruma?rev=00045e559f864eabff08295d603f7b3238288b6f#00045e559f864eabff08295d603f7b3238288b6f"
+version = "0.7.1"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
dependencies = [
"js_int",
"ruma-common",
@@ -4365,8 +4547,8 @@ dependencies = [
[[package]]
name = "ruma-identifiers-validation"
-version = "0.9.0"
-source = "git+https://github.com/ruma/ruma?rev=00045e559f864eabff08295d603f7b3238288b6f#00045e559f864eabff08295d603f7b3238288b6f"
+version = "0.9.1"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
dependencies = [
"js_int",
"thiserror",
@@ -4374,8 +4556,8 @@ dependencies = [
[[package]]
name = "ruma-macros"
-version = "0.10.5"
-source = "git+https://github.com/ruma/ruma?rev=00045e559f864eabff08295d603f7b3238288b6f#00045e559f864eabff08295d603f7b3238288b6f"
+version = "0.11.3"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
dependencies = [
"once_cell",
"proc-macro-crate",
@@ -4384,7 +4566,18 @@ dependencies = [
"ruma-identifiers-validation",
"serde",
"syn",
- "toml",
+ "toml 0.7.2",
+]
+
+[[package]]
+name = "ruma-push-gateway-api"
+version = "0.7.1"
+source = "git+https://github.com/ruma/ruma?rev=8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5#8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5"
+dependencies = [
+ "js_int",
+ "ruma-common",
+ "serde",
+ "serde_json",
]
[[package]]
@@ -4409,23 +4602,23 @@ checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]]
name = "rustix"
-version = "0.36.6"
+version = "0.36.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549"
+checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644"
dependencies = [
"bitflags",
"errno",
"io-lifetimes",
"libc",
"linux-raw-sys",
- "windows-sys",
+ "windows-sys 0.45.0",
]
[[package]]
name = "rustls"
-version = "0.20.7"
+version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c"
+checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
dependencies = [
"log",
"ring",
@@ -4435,11 +4628,11 @@ dependencies = [
[[package]]
name = "rustls-pemfile"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55"
+checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
dependencies = [
- "base64 0.13.1",
+ "base64 0.21.0",
]
[[package]]
@@ -4448,40 +4641,6 @@ version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70"
-[[package]]
-name = "rustyline"
-version = "10.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d1cd5ae51d3f7bf65d7969d579d502168ef578f289452bd8ccc91de28fda20e"
-dependencies = [
- "bitflags",
- "cfg-if",
- "clipboard-win",
- "dirs-next",
- "fd-lock",
- "libc",
- "log",
- "memchr",
- "nix",
- "radix_trie",
- "scopeguard",
- "unicode-segmentation",
- "unicode-width",
- "utf8parse",
- "winapi",
-]
-
-[[package]]
-name = "rustyline-derive"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "107c3d5d7f370ac09efa62a78375f94d94b8a33c61d8c278b96683fb4dbf2d8d"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "ryu"
version = "1.0.12"
@@ -4512,7 +4671,7 @@ version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
dependencies = [
- "windows-sys",
+ "windows-sys 0.42.0",
]
[[package]]
@@ -4571,9 +4730,9 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "2.7.0"
+version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c"
+checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
dependencies = [
"bitflags",
"core-foundation",
@@ -4584,9 +4743,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.6.1"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
+checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
dependencies = [
"core-foundation-sys",
"libc",
@@ -4612,9 +4771,9 @@ dependencies = [
[[package]]
name = "serde_bytes"
-version = "0.11.8"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "718dc5fff5b36f99093fc49b280cfc96ce6fc824317783bff5a1fed0c7a64819"
+checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294"
dependencies = [
"serde",
]
@@ -4645,9 +4804,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.91"
+version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
+checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76"
dependencies = [
"itoa",
"ryu",
@@ -4674,6 +4833,15 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "serde_spanned"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4"
+dependencies = [
+ "serde",
+]
+
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
@@ -4688,9 +4856,9 @@ dependencies = [
[[package]]
name = "serde_yaml"
-version = "0.9.16"
+version = "0.9.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92b5b431e8907b50339b51223b97d102db8d987ced36f6e4d03621db9316c834"
+checksum = "8fb06d4b6cdaef0e0c51fa881acb721bed3c924cfaa71d9c94a3b771dfdf6567"
dependencies = [
"indexmap",
"itoa",
@@ -4732,11 +4900,17 @@ dependencies = [
"lazy_static",
]
+[[package]]
+name = "shell-words"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
+
[[package]]
name = "signal-hook"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d"
+checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9"
dependencies = [
"libc",
"signal-hook-registry",
@@ -4755,9 +4929,9 @@ dependencies = [
[[package]]
name = "signal-hook-registry"
-version = "1.4.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
dependencies = [
"libc",
]
@@ -4774,6 +4948,16 @@ version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
+[[package]]
+name = "sized-chunks"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e"
+dependencies = [
+ "bitmaps",
+ "typenum",
+]
+
[[package]]
name = "slab"
version = "0.4.7"
@@ -4799,29 +4983,14 @@ dependencies = [
"parking_lot 0.11.2",
]
-[[package]]
-name = "sled-state-inspector"
-version = "0.1.0"
-dependencies = [
- "atty",
- "clap 3.2.23",
- "futures",
- "matrix-sdk-base",
- "matrix-sdk-sled",
- "ruma",
- "rustyline",
- "rustyline-derive",
- "serde",
- "serde_json",
- "syntect",
-]
-
[[package]]
name = "sliding-sync-integration-test"
version = "0.1.0"
dependencies = [
"anyhow",
- "ctor",
+ "assert_matches",
+ "eyeball",
+ "eyeball-im",
"futures",
"matrix-sdk",
"matrix-sdk-integration-testing",
@@ -4884,18 +5053,38 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-[[package]]
-name = "str-buf"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
-
[[package]]
name = "str_stack"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb"
+[[package]]
+name = "string_cache"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d69e88b23f23030bf4d0e9ca7b07434f70e1c1f4d3ca7e93ce958b373654d9f"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot 0.12.1",
+ "phf_shared 0.10.0",
+ "precomputed-hash",
+ "serde",
+]
+
+[[package]]
+name = "string_cache_codegen"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+ "proc-macro2",
+ "quote",
+]
+
[[package]]
name = "strsim"
version = "0.10.0"
@@ -4944,9 +5133,9 @@ dependencies = [
[[package]]
name = "sync_wrapper"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8"
+checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
[[package]]
name = "synstructure"
@@ -4960,27 +5149,6 @@ dependencies = [
"unicode-xid",
]
-[[package]]
-name = "syntect"
-version = "5.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8"
-dependencies = [
- "bincode",
- "bitflags",
- "fancy-regex",
- "flate2",
- "fnv",
- "lazy_static",
- "once_cell",
- "regex-syntax",
- "serde",
- "serde_derive",
- "serde_json",
- "thiserror",
- "walkdir",
-]
-
[[package]]
name = "tempfile"
version = "3.3.0"
@@ -4995,11 +5163,22 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "tendril"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+dependencies = [
+ "futf",
+ "mac",
+ "utf-8",
+]
+
[[package]]
name = "termcolor"
-version = "1.1.3"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
+checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
dependencies = [
"winapi-util",
]
@@ -5054,10 +5233,11 @@ dependencies = [
[[package]]
name = "thread_local"
-version = "1.1.4"
+version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
+checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
dependencies = [
+ "cfg-if",
"once_cell",
]
@@ -5096,9 +5276,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.17"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
+checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2"
dependencies = [
"itoa",
"serde",
@@ -5114,9 +5294,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
[[package]]
name = "time-macros"
-version = "0.2.6"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
+checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c"
dependencies = [
"time-core",
]
@@ -5142,15 +5322,15 @@ dependencies = [
[[package]]
name = "tinyvec_macros"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.24.1"
+version = "1.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae"
+checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af"
dependencies = [
"autocfg",
"bytes",
@@ -5161,7 +5341,7 @@ dependencies = [
"pin-project-lite",
"socket2",
"tokio-macros",
- "windows-sys",
+ "windows-sys 0.42.0",
]
[[package]]
@@ -5187,9 +5367,9 @@ dependencies = [
[[package]]
name = "tokio-native-tls"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
dependencies = [
"native-tls",
"tokio",
@@ -5227,13 +5407,14 @@ dependencies = [
"futures-core",
"pin-project-lite",
"tokio",
+ "tokio-util",
]
[[package]]
name = "tokio-util"
-version = "0.7.4"
+version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740"
+checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2"
dependencies = [
"bytes",
"futures-core",
@@ -5245,11 +5426,62 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.5.10"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime 0.6.1",
+ "toml_edit 0.19.3",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5"
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b"
+dependencies = [
+ "indexmap",
+ "nom8",
+ "toml_datetime 0.5.1",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f"
+checksum = "5e6a7712b49e1775fb9a7b998de6635b299237f48b404dde71704f2e0e7f37e5"
dependencies = [
+ "indexmap",
+ "nom8",
"serde",
+ "serde_spanned",
+ "toml_datetime 0.6.1",
]
[[package]]
@@ -5361,6 +5593,17 @@ dependencies = [
"tracing-core",
]
+[[package]]
+name = "tracing-android"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12612be8f868a09c0ceae7113ff26afe79d81a24473a393cb9120ece162e86c0"
+dependencies = [
+ "android_log-sys",
+ "tracing",
+ "tracing-subscriber",
+]
+
[[package]]
name = "tracing-attributes"
version = "0.1.23"
@@ -5441,7 +5684,7 @@ dependencies = [
"sharded-slab",
"smallvec",
"thread_local",
- "time 0.3.17",
+ "time 0.3.19",
"tracing",
"tracing-core",
"tracing-log",
@@ -5523,6 +5766,12 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+[[package]]
+name = "unarray"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+
[[package]]
name = "unicase"
version = "2.6.0"
@@ -5534,9 +5783,9 @@ dependencies = [
[[package]]
name = "unicode-bidi"
-version = "0.3.8"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
+checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58"
[[package]]
name = "unicode-ident"
@@ -5565,9 +5814,9 @@ dependencies = [
[[package]]
name = "unicode-segmentation"
-version = "1.10.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"
+checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
[[package]]
name = "unicode-width"
@@ -5584,8 +5833,7 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
name = "uniffi"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f71cc01459bc34cfe43fabf32b39f1228709bc6db1b3a664a92940af3d062376"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"camino",
@@ -5606,8 +5854,7 @@ dependencies = [
[[package]]
name = "uniffi_bindgen"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbbba5103051c18f10b22f80a74439ddf7100273f217a547005d2735b2498994"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"askama",
@@ -5621,7 +5868,7 @@ dependencies = [
"paste",
"serde",
"serde_json",
- "toml",
+ "toml 0.5.11",
"uniffi_meta",
"uniffi_testing",
"weedle2",
@@ -5630,8 +5877,7 @@ dependencies = [
[[package]]
name = "uniffi_build"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ee1a28368ff3d83717e3d3e2e15a66269c43488c3f036914131bb68892f29fb"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"camino",
@@ -5641,8 +5887,7 @@ dependencies = [
[[package]]
name = "uniffi_checksum_derive"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03de61393a42b4ad4984a3763c0600594ac3e57e5aaa1d05cede933958987c03"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"quote",
"syn",
@@ -5651,8 +5896,7 @@ dependencies = [
[[package]]
name = "uniffi_core"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a2b4852d638d74ca2d70e450475efb6d91fe6d54a7cd8d6bd80ad2ee6cd7daa"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"bytes",
@@ -5667,8 +5911,7 @@ dependencies = [
[[package]]
name = "uniffi_macros"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa03394de21e759e0022f1ea8d992d2e39290d735b9ed52b1f74b20a684f794e"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"bincode",
"camino",
@@ -5678,7 +5921,7 @@ dependencies = [
"quote",
"serde",
"syn",
- "toml",
+ "toml 0.5.11",
"uniffi_build",
"uniffi_meta",
]
@@ -5686,8 +5929,7 @@ dependencies = [
[[package]]
name = "uniffi_meta"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66fdab2c436aed7a6391bec64204ec33948bfed9b11b303235740771f85c4ea6"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"serde",
"siphasher",
@@ -5697,8 +5939,7 @@ dependencies = [
[[package]]
name = "uniffi_testing"
version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92b0570953ec41d97ce23e3b92161ac18231670a1f97523258a6d2ab76d7f76c"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"camino",
@@ -5744,16 +5985,16 @@ dependencies = [
]
[[package]]
-name = "utf8parse"
-version = "0.2.0"
+name = "utf-8"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]]
name = "uuid"
-version = "1.2.2"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"
+checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79"
dependencies = [
"getrandom 0.2.8",
"wasm-bindgen",
@@ -5765,6 +6006,16 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+[[package]]
+name = "value-bag"
+version = "1.0.0-alpha.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55"
+dependencies = [
+ "ctor",
+ "version_check",
+]
+
[[package]]
name = "vcpkg"
version = "0.2.15"
@@ -5780,7 +6031,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "vodozemac"
version = "0.3.0"
-source = "git+https://github.com/matrix-org/vodozemac?rev=12b24e909107c1fac23245376f294eaf48ba186a#12b24e909107c1fac23245376f294eaf48ba186a"
+source = "git+https://github.com/matrix-org/vodozemac?rev=fb609ca1e4df5a7a818490ae86ac694119e41e71#fb609ca1e4df5a7a818490ae86ac694119e41e71"
dependencies = [
"aes",
"arrayvec",
@@ -5849,9 +6100,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.83"
+version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
+checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -5859,9 +6110,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.83"
+version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
+checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
dependencies = [
"bumpalo",
"log",
@@ -5874,9 +6125,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.33"
+version = "0.4.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d"
+checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454"
dependencies = [
"cfg-if",
"js-sys",
@@ -5886,9 +6137,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.83"
+version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
+checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -5896,9 +6147,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.83"
+version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
+checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
dependencies = [
"proc-macro2",
"quote",
@@ -5909,15 +6160,15 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.83"
+version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
+checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
[[package]]
name = "wasm-bindgen-test"
-version = "0.3.33"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09d2fff962180c3fadf677438054b1db62bee4aa32af26a45388af07d1287e1d"
+checksum = "6db36fc0f9fb209e88fb3642590ae0205bb5a56216dabd963ba15879fe53a30b"
dependencies = [
"console_error_panic_hook",
"js-sys",
@@ -5929,9 +6180,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-test-macro"
-version = "0.3.33"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4683da3dfc016f704c9f82cf401520c4f1cb3ee440f7f52b3d6ac29506a49ca7"
+checksum = "0734759ae6b3b1717d661fe4f016efcfb9828f5edb4520c18eaee05af3b43be9"
dependencies = [
"proc-macro2",
"quote",
@@ -5950,26 +6201,11 @@ dependencies = [
"web-sys",
]
-[[package]]
-name = "wasm-timer"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
-dependencies = [
- "futures",
- "js-sys",
- "parking_lot 0.11.2",
- "pin-utils",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
-]
-
[[package]]
name = "web-sys"
-version = "0.3.60"
+version = "0.3.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
+checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -5997,8 +6233,7 @@ dependencies = [
[[package]]
name = "weedle2"
version = "4.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e79c5206e1f43a2306fd64bdb95025ee4228960f2e6c5a8b173f3caaf807741"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"nom",
]
@@ -6009,6 +6244,15 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
+[[package]]
+name = "wepoll-ffi"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "which"
version = "4.4.0"
@@ -6072,47 +6316,71 @@ dependencies = [
"windows_x86_64_msvc",
]
+[[package]]
+name = "windows-sys"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
+checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
+checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
[[package]]
name = "windows_i686_gnu"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
+checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
[[package]]
name = "windows_i686_msvc"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
+checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
+checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
+checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.42.0"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
+checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
[[package]]
name = "winreg"
@@ -6125,9 +6393,9 @@ dependencies = [
[[package]]
name = "wiremock"
-version = "0.5.16"
+version = "0.5.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "631cafe37a030d8453218cf7c650abcc359be8fba4a2fbc5c27fdb9728635406"
+checksum = "12316b50eb725e22b2f6b9c4cbede5b7b89984274d113a7440c86e5c3fc6f99b"
dependencies = [
"assert-json-diff",
"async-trait",
@@ -6186,7 +6454,7 @@ name = "xtask"
version = "0.1.0"
dependencies = [
"camino",
- "clap 4.0.32",
+ "clap 4.1.8",
"fs_extra",
"serde",
"serde_json",
diff --git a/Cargo.toml b/Cargo.toml
index 8e5fad15ca5..f64995365b9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,22 +23,25 @@ rust-version = "1.65"
anyhow = "1.0.68"
async-stream = "0.3.3"
async-trait = "0.1.60"
-base64 = "0.20.0"
+base64 = "0.21.0"
byteorder = "1.4.3"
ctor = "0.1.26"
dashmap = "5.2.0"
+eyeball = "0.4.0"
+eyeball-im = "0.1.0"
+futures-util = { version = "0.3.26", default-features = false, features = ["alloc"] }
http = "0.2.6"
-ruma = { git = "https://github.com/ruma/ruma", rev = "00045e559f864eabff08295d603f7b3238288b6f", features = ["client-api-c"] }
-ruma-common = { git = "https://github.com/ruma/ruma", rev = "00045e559f864eabff08295d603f7b3238288b6f" }
+ruma = { git = "https://github.com/ruma/ruma", rev = "8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5", features = ["client-api-c"] }
+ruma-common = { git = "https://github.com/ruma/ruma", rev = "8eea3e05490fa9a318f9ed66c3a75272e6ef0ee5" }
once_cell = "1.16.0"
serde = "1.0.151"
serde_html_form = "0.2.0"
serde_json = "1.0.91"
thiserror = "1.0.38"
tracing = { version = "0.1.36", default-features = false, features = ["std"] }
-uniffi = "0.23.0"
-uniffi_bindgen = "0.23.0"
-vodozemac = { git = "https://github.com/matrix-org/vodozemac", rev = "12b24e909107c1fac23245376f294eaf48ba186a" }
+uniffi = { git = "https://github.com/mozilla/uniffi-rs", rev = "58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4" }
+uniffi_bindgen = { git = "https://github.com/mozilla/uniffi-rs", rev = "58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4" }
+vodozemac = { git = "https://github.com/matrix-org/vodozemac", rev = "fb609ca1e4df5a7a818490ae86ac694119e41e71" }
zeroize = "1.3.0"
# Default release profile, select with `--release`
diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index 976ac8bd480..5465b4299b0 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -15,7 +15,7 @@ matrix-sdk-test = { path = "../testing/matrix-sdk-test", version = "0.6.0"}
ruma = { workspace = true }
serde_json = { workspace = true }
tempfile = "3.3.0"
-tokio = { version = "1.23.1", default-features = false, features = ["rt-multi-thread"] }
+tokio = { version = "1.24.2", default-features = false, features = ["rt-multi-thread"] }
[target.'cfg(target_os = "linux")'.dependencies]
pprof = { version = "0.11.0", features = ["flamegraph", "criterion"] }
diff --git a/bindings/CONTRIBUTING.md b/bindings/CONTRIBUTING.md
new file mode 100644
index 00000000000..6f5aae26eaf
--- /dev/null
+++ b/bindings/CONTRIBUTING.md
@@ -0,0 +1,41 @@
+## Introduction
+**matrix-rust-sdk** leverages [UniFFI](https://mozilla.github.io/uniffi-rs/) to generate bindings for host languages (eg. Swift and Kotlin).
+
+Rust code related with bindings live in the [matrix-rust-sdk/bindings](https://github.com/matrix-org/matrix-rust-sdk/tree/main/bindings) folder.
+
+Developers can expose Rust code to UniFFI using two different approaches:
+- Using an `.udl` file. When a crate has one, you find it under the `src` folder (an example is [here](https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/matrix-sdk-ffi/src/api.udl)).
+- Add UniFFI directivies as Rust attributes. In this case Rust source files (`.rs`) contain attributes related to UniFFI (e.g. `#[uniffi::export]`). Attributes are preferred, where applicable.
+
+
+## Expose Rust definitions to UniFFI
+
+### Check if the API is already on UniFFI
+
+First of all check if the Rust definition you are looking for exists on UniFFI already. Most of exposed matrix definitions are collected in the crate [matrix-sdk-ffi](https://github.com/matrix-org/matrix-rust-sdk/tree/main/bindings/matrix-sdk-ffi).
+This crate contains mainly small Rust wrappers around the actual Rust SDK (e.g. the crate [matrix-sdk](https://github.com/matrix-org/matrix-rust-sdk/tree/main/crates/matrix-sdk))
+
+If the Rust definition is on UniFFI already, you either:
+- find it in a `.udl` file like [matrix-sdk-ffi/src/api.udl](https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/matrix-sdk-ffi/src/api.udl)
+- see it marked with a proper UniFFI Rust attribute like this `#[uniffi::export]`
+
+
+### Adding a missing matrix API
+
+1. Unless you want to contribute on the crypto side, you probably need to add some code in the [matrix-sdk-ffi](https://github.com/matrix-org/matrix-rust-sdk/tree/main/bindings/matrix-sdk-ffi) crate. After you find the crate you need to understand which file is best to contain the new Rust definition. When exposing new matrix API often (but not always) you need to touch the file [client.rs](https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/matrix-sdk-ffi/src/client.rs)
+
+2. Identify the API to expose in the target Rust crate (typically in [matrix-sdk](https://github.com/matrix-org/matrix-rust-sdk/tree/main/crates/matrix-sdk). If you canβt find it, you probably need to touch the actual Rust SDK as well. In this case you typically just need to write some code around [ruma](https://github.com/ruma/ruma) (a Rust SDKβs dependency) which already implements most of the matrix protocol
+
+3. After you got (by finding or writing) the required Rust code, you need to expose to UniFFI. To do that just write a small Rust wrapper in the related UniFFI crate (most of the time is **matrix-sdk-ffi**) you found on step 1.
+
+4. When your new (wrapping) Rust definition is ready, remember to expose it to UniFFI.
+Itβs best to do it using UniFFI Rust attributes (e.g. `#[uniffi::export]`). Otherwise add the new definition in the crateβs `.udl` file. For the **matrix-sdk-ffi** crate the definition file is [api.udl](https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/matrix-sdk-ffi/src/api.udl). **Remember**: the language inside a `.udl` file isnβt Rust. To learn more about how map Rust into UDL read [here](https://mozilla.github.io/uniffi-rs/udl_file_spec.html)
+
+## FAQ
+
+**Q**: I wrote my Rust code and exposed it to UniFFI. How can I check if the compiler is happy?\
+**A**: Run `cargo build` in the crate you touched (e.g. matrix-sdk-ffi). The compiler will complain if the Rust code and/or the `.udl` is wrong.
+
+
+**Q**: The compiler is happy with my code but the CI is failing on GitHub. How can I fix it?\
+**A**: The CI may fail for different reasons, you need to have a look on the failing GitHub workflow. One common reason though is that the linter ([Clippy](https://github.com/rust-lang/rust-clippy)) isnβt happy with your code. If this is the case, you can run `cargo clippy` in the crate you touched to see whatβs wrong and fix it accordingly.
\ No newline at end of file
diff --git a/bindings/README.md b/bindings/README.md
index b4c07977e06..a6bfd8975e0 100644
--- a/bindings/README.md
+++ b/bindings/README.md
@@ -20,3 +20,6 @@ maintained by the owners of the Matrix Rust SDK project.
[`matrix-sdk-crypto`]: ../crates/matrix-sdk-crypto
[`matrix-sdk-ffi`]: ./matrix-sdk-ffi
[`matrix-sdk`]: ../crates/matrix-sdk
+
+# Contributing
+To contribute read this [guide](./CONTRIBUTING.md).
\ No newline at end of file
diff --git a/bindings/apple/Package.swift b/bindings/apple/Package.swift
index 05f4003ab3c..fb04144f081 100644
--- a/bindings/apple/Package.swift
+++ b/bindings/apple/Package.swift
@@ -5,6 +5,10 @@ import PackageDescription
let package = Package(
name: "MatrixRustSDK",
+ platforms: [
+ .iOS(.v15),
+ .macOS(.v12)
+ ],
products: [
.library(name: "MatrixRustSDK",
targets: ["MatrixRustSDK"]),
diff --git a/bindings/apple/Tests/MatrixRustSDKTests/AuthenticationServiceTests.swift b/bindings/apple/Tests/MatrixRustSDKTests/AuthenticationServiceTests.swift
new file mode 100644
index 00000000000..df92b6a32a5
--- /dev/null
+++ b/bindings/apple/Tests/MatrixRustSDKTests/AuthenticationServiceTests.swift
@@ -0,0 +1,64 @@
+@testable import MatrixRustSDK
+import XCTest
+
+class AuthenticationServiceTests: XCTestCase {
+ var service: AuthenticationService!
+
+ override func setUp() {
+ service = AuthenticationService(basePath: FileManager.default.temporaryDirectory.path,
+ passphrase: nil,
+ customSlidingSyncProxy: nil)
+ }
+
+ func testValidServers() {
+ XCTAssertNoThrow(try service.configureHomeserver(serverNameOrHomeserverUrl: "matrix.org"))
+ XCTAssertNoThrow(try service.configureHomeserver(serverNameOrHomeserverUrl: "https://matrix.org"))
+ XCTAssertNoThrow(try service.configureHomeserver(serverNameOrHomeserverUrl: "https://matrix.org/"))
+ }
+
+ func testInvalidCharacters() {
+ XCTAssertThrowsError(try service.configureHomeserver(serverNameOrHomeserverUrl: "hello!@$Β£%^world"),
+ "A server name with invalid characters should not succeed to build.") { error in
+ guard case AuthenticationError.InvalidServerName = error else { XCTFail("Expected invalid name error."); return }
+ }
+ }
+
+ func textNonExistentDomain() {
+ XCTAssertThrowsError(try service.configureHomeserver(serverNameOrHomeserverUrl: "somesillylinkthatdoesntexist.com"),
+ "A server name that doesn't exist should not succeed.") { error in
+ guard case AuthenticationError.Generic = error else { XCTFail("Expected generic error."); return }
+ }
+ XCTAssertThrowsError(try service.configureHomeserver(serverNameOrHomeserverUrl: "https://somesillylinkthatdoesntexist.com"),
+ "A server URL that doesn't exist should not succeed.") { error in
+ guard case AuthenticationError.Generic = error else { XCTFail("Expected generic error."); return }
+ }
+ }
+
+ func testValidDomainWithoutServer() {
+ XCTAssertThrowsError(try service.configureHomeserver(serverNameOrHomeserverUrl: "https://google.com"),
+ "Google should not succeed as it doesn't host a homeserver.") { error in
+ guard case AuthenticationError.Generic = error else { XCTFail("Expected generic error."); return }
+ }
+ }
+
+ func testServerWithoutSlidingSync() {
+ XCTAssertThrowsError(try service.configureHomeserver(serverNameOrHomeserverUrl: "envs.net"),
+ "Envs should not succeed as it doesn't advertise a sliding sync proxy.") { error in
+ guard case AuthenticationError.SlidingSyncNotAvailable = error else { XCTFail("Expected sliding sync error."); return }
+ }
+ }
+
+ func testHomeserverURL() {
+ XCTAssertThrowsError(try service.configureHomeserver(serverNameOrHomeserverUrl: "https://matrix-client.matrix.org"),
+ "Directly using a homeserver should not succeed as a sliding sync proxy won't be found.") { error in
+ guard case AuthenticationError.SlidingSyncNotAvailable = error else { XCTFail("Expected sliding sync error."); return }
+ }
+ }
+
+ func testHomeserverURLWithProxyOverride() {
+ service = AuthenticationService(basePath: FileManager.default.temporaryDirectory.path,
+ passphrase: nil, customSlidingSyncProxy: "https://slidingsync.proxy")
+ XCTAssertNoThrow(try service.configureHomeserver(serverNameOrHomeserverUrl: "https://matrix-client.matrix.org"),
+ "Directly using a homeserver should succeed what a custom sliding sync proxy has been set.")
+ }
+}
diff --git a/bindings/kotlin/README.md b/bindings/kotlin/README.md
deleted file mode 100644
index ebb206b7eab..00000000000
--- a/bindings/kotlin/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# Matrix rust components kotlin
-
-This project and build scripts demonstrate how to create an aar and how to import it in your android projects.
-
-## Prerequisites
-
-* the Rust toolchain
-* cargo-ndk < 2.12.0 `cargo install cargo-ndk --version 2.11.0`
-* android targets (e.g. `rustup target add \
- aarch64-linux-android \
- armv7-linux-androideabi \
- x86_64-linux-android \
- i686-linux-android`)
-
-## Building the SDK
-
-To build the full sdk and get an aar you can call :
-`./bindings/kotlin/scripts/build_sdk.sh /matrix-rust_sdk/bindings/kotlin/sample/libs`
-where the parameter is the path for the aar to go
-
-## License
-
-[Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
diff --git a/bindings/kotlin/SECURITY.md b/bindings/kotlin/SECURITY.md
deleted file mode 100644
index 3126b47a07e..00000000000
--- a/bindings/kotlin/SECURITY.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Reporting a Vulnerability
-
-**If you've found a security vulnerability, please report it to security@matrix.org**
-
-For more information on our security disclosure policy, visit https://www.matrix.org/security-disclosure-policy/
diff --git a/bindings/kotlin/build.gradle b/bindings/kotlin/build.gradle
deleted file mode 100644
index 4924a37c7b1..00000000000
--- a/bindings/kotlin/build.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-apply plugin: 'io.github.gradle-nexus.publish-plugin'
-apply from: "${rootDir}/scripts/publish-root.gradle"
-
-buildscript {
- repositories {
- maven { url "https://plugins.gradle.org/m2/" }
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath BuildPlugins.android
- classpath BuildPlugins.kotlin
- classpath BuildPlugins.nexusPublish
- }
-}
-
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/bindings/kotlin/buildSrc/build.gradle.kts b/bindings/kotlin/buildSrc/build.gradle.kts
deleted file mode 100644
index 8e88a958d7f..00000000000
--- a/bindings/kotlin/buildSrc/build.gradle.kts
+++ /dev/null
@@ -1,9 +0,0 @@
-import org.gradle.kotlin.dsl.`kotlin-dsl`
-
-plugins {
- `kotlin-dsl`
-}
-
-repositories {
- mavenCentral()
-}
\ No newline at end of file
diff --git a/bindings/kotlin/buildSrc/src/main/java/ConfigurationData.kt b/bindings/kotlin/buildSrc/src/main/java/ConfigurationData.kt
deleted file mode 100644
index e32455732cb..00000000000
--- a/bindings/kotlin/buildSrc/src/main/java/ConfigurationData.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-object ConfigurationData {
- const val compileSdk = 31
- const val targetSdk = 31
- const val minSdk = 21
- const val majorVersion = 0
- const val minorVersion = 2
- const val patchVersion = 0
- const val versionName = "$majorVersion.$minorVersion.$patchVersion"
- const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
- const val publishGroupId = "org.matrix.rustcomponents"
-}
\ No newline at end of file
diff --git a/bindings/kotlin/buildSrc/src/main/java/Dependencies.kt b/bindings/kotlin/buildSrc/src/main/java/Dependencies.kt
deleted file mode 100644
index f5f6e394ec9..00000000000
--- a/bindings/kotlin/buildSrc/src/main/java/Dependencies.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-internal object Versions {
- const val androidGradlePlugin = "7.1.2"
- const val kotlin = "1.6.10"
- const val jUnit = "4.12"
- const val nexusPublishGradlePlugin = "1.1.0"
- const val jna = "5.10.0"
-}
-
-internal object BuildPlugins {
- const val android = "com.android.tools.build:gradle:${Versions.androidGradlePlugin}"
- const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
- const val nexusPublish = "io.github.gradle-nexus:publish-plugin:${Versions.nexusPublishGradlePlugin}"
-}
-
-/**
- * To define dependencies
- */
-internal object Dependencies {
- const val kotlin = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.kotlin}"
- const val junit = "junit:junit:${Versions.jUnit}"
- const val jna = "net.java.dev.jna:jna:${Versions.jna}@aar"
-}
\ No newline at end of file
diff --git a/bindings/kotlin/crypto/crypto-android/.gitignore b/bindings/kotlin/crypto/crypto-android/.gitignore
deleted file mode 100644
index 42afabfd2ab..00000000000
--- a/bindings/kotlin/crypto/crypto-android/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/bindings/kotlin/crypto/crypto-android/build.gradle b/bindings/kotlin/crypto/crypto-android/build.gradle
deleted file mode 100644
index 543cd2a603b..00000000000
--- a/bindings/kotlin/crypto/crypto-android/build.gradle
+++ /dev/null
@@ -1,51 +0,0 @@
-plugins {
- id 'com.android.library'
- id 'org.jetbrains.kotlin.android'
-}
-
-ext {
- PUBLISH_GROUP_ID = ConfigurationData.publishGroupId
- PUBLISH_ARTIFACT_ID = 'crypto-android'
- PUBLISH_VERSION = rootVersionName
- PUBLISH_DESCRIPTION = 'Android Bindings to the Matrix Rust Crypto SDK'
-}
-
-apply from: "${rootDir}/scripts/publish-module.gradle"
-
-android {
-
- compileSdk ConfigurationData.compileSdk
-
- defaultConfig {
- minSdk ConfigurationData.minSdk
- targetSdk ConfigurationData.targetSdk
- versionName ConfigurationData.versionName
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "consumer-rules.pro"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
-}
-
-android.libraryVariants.all { variant ->
- def sourceSet = variant.sourceSets.find { it.name == variant.name }
- sourceSet.java.srcDir new File(buildDir, "generated/source/${variant.name}")
-}
-
-dependencies {
- implementation Dependencies.jna
- testImplementation Dependencies.junit
-}
\ No newline at end of file
diff --git a/bindings/kotlin/crypto/crypto-android/consumer-rules.pro b/bindings/kotlin/crypto/crypto-android/consumer-rules.pro
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/bindings/kotlin/crypto/crypto-android/proguard-rules.pro b/bindings/kotlin/crypto/crypto-android/proguard-rules.pro
deleted file mode 100644
index 481bb434814..00000000000
--- a/bindings/kotlin/crypto/crypto-android/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/bindings/kotlin/crypto/crypto-android/src/main/AndroidManifest.xml b/bindings/kotlin/crypto/crypto-android/src/main/AndroidManifest.xml
deleted file mode 100644
index 730df2c4c1a..00000000000
--- a/bindings/kotlin/crypto/crypto-android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/bindings/kotlin/crypto/crypto-jvm/.gitignore b/bindings/kotlin/crypto/crypto-jvm/.gitignore
deleted file mode 100644
index 42afabfd2ab..00000000000
--- a/bindings/kotlin/crypto/crypto-jvm/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/bindings/kotlin/crypto/crypto-jvm/build.gradle b/bindings/kotlin/crypto/crypto-jvm/build.gradle
deleted file mode 100644
index ce669345bf8..00000000000
--- a/bindings/kotlin/crypto/crypto-jvm/build.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-plugins {
- id 'java-library'
- id 'org.jetbrains.kotlin.jvm'
-}
-
-java {
- sourceCompatibility = JavaVersion.VERSION_1_7
- targetCompatibility = JavaVersion.VERSION_1_7
-}
-
-dependencies {
- implementation 'net.java.dev.jna:jna:5.10.0@aar'
-}
\ No newline at end of file
diff --git a/bindings/kotlin/gradle.properties b/bindings/kotlin/gradle.properties
deleted file mode 100644
index d2c86c8ce02..00000000000
--- a/bindings/kotlin/gradle.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Automatically convert third-party libraries to use AndroidX
-android.enableJetifier=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
-# Enables namespacing of each library's R class so that its R class includes only the
-# resources declared in the library itself and none from the library's dependencies,
-# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
diff --git a/bindings/kotlin/gradle/wrapper/gradle-wrapper.jar b/bindings/kotlin/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c023e..00000000000
Binary files a/bindings/kotlin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/bindings/kotlin/gradle/wrapper/gradle-wrapper.properties b/bindings/kotlin/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index a10cc8b8d88..00000000000
--- a/bindings/kotlin/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Feb 28 18:48:31 CET 2022
-distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
-distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
diff --git a/bindings/kotlin/gradlew b/bindings/kotlin/gradlew
deleted file mode 100755
index 4f906e0c811..00000000000
--- a/bindings/kotlin/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/bindings/kotlin/gradlew.bat b/bindings/kotlin/gradlew.bat
deleted file mode 100644
index ac1b06f9382..00000000000
--- a/bindings/kotlin/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/bindings/kotlin/scripts/build_crypto.sh b/bindings/kotlin/scripts/build_crypto.sh
deleted file mode 100755
index d0ee9710227..00000000000
--- a/bindings/kotlin/scripts/build_crypto.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env bash
-set -eEu
-
-cd "$(dirname "$0")"
-CURRENT_DIR=$(pwd)
-
-# FOR DEBUG
-#RELEASE_FLAG=""
-#RELEASE_TYPE_DIR="debug"
-#RELEASE_AAR_NAME="crypto-android-debug"
-
-# FOR RELEASE
-RELEASE_FLAG="--release"
-RELEASE_TYPE_DIR="release"
-RELEASE_AAR_NAME="crypto-android-release"
-
-SRC_ROOT=../../..
-# Path to the kotlin root project
-KOTLIN_ROOT=..
-
-BASE_TARGET_DIR="${SRC_ROOT}/target"
-SDK_ROOT="${KOTLIN_ROOT}/crypto/crypto-android"
-SDK_TARGET_DIR="${SDK_ROOT}/src/main/jniLibs"
-BUILD_DIR="${SDK_ROOT}/build"
-GENERATED_DIR="${BUILD_DIR}/generated/source/${RELEASE_TYPE_DIR}"
-mkdir -p ${GENERATED_DIR}
-
-TARGET_CRATE=matrix-sdk-crypto-ffi
-
-AAR_DESTINATION=$1
-
-# Build libs for all the different architectures
-
-echo -e "Building for x86_64-linux-android[1/4]"
-cargo ndk --target x86_64-linux-android -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p ${TARGET_CRATE}
-
-echo -e "Building for aarch64-linux-android[2/4]"
-cargo ndk --target aarch64-linux-android -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p ${TARGET_CRATE}
-
-echo -e "Building for armv7-linux-androideabi[3/4]"
-cargo ndk --target armv7-linux-androideabi -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p ${TARGET_CRATE}
-
-echo -e "Building for i686-linux-android[4/4]"
-cargo ndk --target i686-linux-android -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p ${TARGET_CRATE}
-
-# Generate uniffi files
-echo -e "Generate uniffi kotlin file"
-cargo uniffi-bindgen generate "${SRC_ROOT}/bindings/${TARGET_CRATE}/src/olm.udl" \
- --language kotlin \
- --config "${SRC_ROOT}/bindings/${TARGET_CRATE}/uniffi.toml" \
- --out-dir ${GENERATED_DIR} \
- --lib-file "${BASE_TARGET_DIR}/x86_64-linux-android/${RELEASE_TYPE_DIR}/libmatrix_sdk_crypto_ffi.a"
-
-# Create android library
-cd "${KOTLIN_ROOT}"
-./gradlew :crypto:crypto-android:assemble
-cd "${CURRENT_DIR}"
-
-echo -e "Moving the generated aar file to ${AAR_DESTINATION}/matrix-rust-sdk-crypto.aar"
-mv "${BUILD_DIR}/outputs/aar/${RELEASE_AAR_NAME}.aar" "${AAR_DESTINATION}/matrix-rust-sdk-crypto.aar"
-
-# Clean-up
-echo -e "Cleaning up temporary files"
-
-rm -r "${BUILD_DIR}"
-rm -r "${SDK_TARGET_DIR}"
diff --git a/bindings/kotlin/scripts/build_sdk.sh b/bindings/kotlin/scripts/build_sdk.sh
deleted file mode 100755
index e7f3249f7c0..00000000000
--- a/bindings/kotlin/scripts/build_sdk.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env bash
-set -eEu
-
-cd "$(dirname "$0")"
-CURRENT_DIR=$(pwd)
-
-# FOR DEBUG
-#RELEASE_FLAG=""
-#RELEASE_TYPE_DIR="debug"
-#RELEASE_AAR_NAME="sdk-android-debug"
-
-# FOR RELEASE
-RELEASE_FLAG="--release"
-RELEASE_TYPE_DIR="release"
-RELEASE_AAR_NAME="sdk-android-release"
-
-SRC_ROOT=../../..
-# Path to the kotlin root project
-KOTLIN_ROOT=..
-
-BASE_TARGET_DIR="${SRC_ROOT}/target"
-SDK_ROOT="${KOTLIN_ROOT}/sdk/sdk-android"
-SDK_TARGET_DIR="${SDK_ROOT}/src/main/jniLibs"
-BUILD_DIR="${SDK_ROOT}/build"
-GENERATED_DIR="${BUILD_DIR}/generated/source/${RELEASE_TYPE_DIR}"
-mkdir -p ${GENERATED_DIR}
-
-AAR_DESTINATION=$1
-
-# Build libs for all the different architectures
-
-echo -e "Building for x86_64-linux-android[1/4]"
-cargo ndk --target x86_64-linux-android -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p matrix-sdk-ffi
-
-echo -e "Building for aarch64-linux-android[2/4]"
-cargo ndk --target aarch64-linux-android -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p matrix-sdk-ffi
-
-echo -e "Building for armv7-linux-androideabi[3/4]"
-cargo ndk --target armv7-linux-androideabi -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p matrix-sdk-ffi
-
-echo -e "Building for i686-linux-android[4/4]"
-cargo ndk --target i686-linux-android -o ${SDK_TARGET_DIR}/ build "${RELEASE_FLAG}" -p matrix-sdk-ffi
-
-# Generate uniffi files
-echo -e "Generate uniffi kotlin file"
-cargo uniffi-bindgen generate "${SRC_ROOT}/bindings/matrix-sdk-ffi/src/api.udl" \
- --language kotlin \
- --out-dir ${GENERATED_DIR} \
- --lib-file "${BASE_TARGET_DIR}/x86_64-linux-android/${RELEASE_TYPE_DIR}/libmatrix_sdk_ffi.a"
-
-# Create android library
-cd "${KOTLIN_ROOT}"
-./gradlew :sdk:sdk-android:assemble
-cd "${CURRENT_DIR}"
-
-echo -e "Moving the generated aar file to ${AAR_DESTINATION}/matrix-rust-sdk.aar"
-mv "${BUILD_DIR}/outputs/aar/${RELEASE_AAR_NAME}.aar" "${AAR_DESTINATION}/matrix-rust-sdk.aar"
-
-# Clean-up
-echo -e "Cleaning up temporary files"
-
-rm -r "${BUILD_DIR}"
-rm -r "${SDK_TARGET_DIR}"
diff --git a/bindings/kotlin/scripts/publish-module.gradle b/bindings/kotlin/scripts/publish-module.gradle
deleted file mode 100644
index 0b7d3f195c0..00000000000
--- a/bindings/kotlin/scripts/publish-module.gradle
+++ /dev/null
@@ -1,77 +0,0 @@
-apply plugin: 'maven-publish'
-apply plugin: 'signing'
-
-task androidSourcesJar(type: Jar) {
- archiveClassifier.set('sources')
- if (project.plugins.findPlugin("com.android.library")) {
- // For Android libraries
- from android.sourceSets.main.java.srcDirs
- from android.sourceSets.main.kotlin.srcDirs
- } else {
- // For pure Kotlin libraries, in case you have them
- from sourceSets.main.java.srcDirs
- from sourceSets.main.kotlin.srcDirs
- }
-}
-
-artifacts {
- archives androidSourcesJar
-}
-
-group = PUBLISH_GROUP_ID
-version = rootVersionName
-
-afterEvaluate {
- publishing {
- publications {
- release(MavenPublication) {
-
- groupId PUBLISH_GROUP_ID
- artifactId PUBLISH_ARTIFACT_ID
- version PUBLISH_VERSION
-
- if (project.plugins.findPlugin("com.android.library")) {
- from components.release
- } else {
- from components.java
- }
-
- artifact androidSourcesJar
-
- pom {
- name = PUBLISH_ARTIFACT_ID
- description = PUBLISH_DESCRIPTION
- url = 'https://github.com/matrix-org/matrix-rust-components-kotlin'
- licenses {
- license {
- name = 'The Apache Software License, Version 2.0'
- url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
- }
- }
- developers {
- developer {
- id = 'matrixdev'
- name = 'matrixdev'
- email = 'android@element.io'
- }
- }
-
- scm {
- connection = 'scm:git:git://github.com/matrix-org/matrix-rust-components-kotlin.git'
- developerConnection = 'scm:git:ssh://git@github.com/matrix-org/matrix-rust-components-kotlin.git'
- url = 'https://github.com/matrix-org/matrix-rust-components-kotlin'
- }
- }
- }
- }
- }
-}
-
-signing {
- useInMemoryPgpKeys(
- rootProject.ext["signing.keyId"],
- rootProject.ext["signing.key"],
- rootProject.ext["signing.password"],
- )
- sign publishing.publications
-}
\ No newline at end of file
diff --git a/bindings/kotlin/scripts/publish-root.gradle b/bindings/kotlin/scripts/publish-root.gradle
deleted file mode 100644
index 609cb9a8f6a..00000000000
--- a/bindings/kotlin/scripts/publish-root.gradle
+++ /dev/null
@@ -1,43 +0,0 @@
-ext["signing.keyId"] = ''
-ext["signing.password"] = ''
-ext["signing.key"] = ''
-ext["ossrhUsername"] = ''
-ext["ossrhPassword"] = ''
-ext["sonatypeStagingProfileId"] = ''
-ext["snapshot"] = ''
-
-File secretPropsFile = project.rootProject.file('local.properties')
-if (secretPropsFile.exists()) {
- // Read local.properties file first if it exists
- Properties p = new Properties()
- new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) }
- p.each { name, value -> ext[name] = value }
-} else {
- // Use system environment variables
- ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME')
- ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD')
- ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')
- ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
- ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
- ext["signing.key"] = System.getenv('SIGNING_KEY')
- ext["snapshot"] = System.getenv('SNAPSHOT')
-}
-
-if (snapshot.toBoolean()) {
- ext["rootVersionName"] = ConfigurationData.snapshotVersionName
-} else {
- ext["rootVersionName"] = ConfigurationData.versionName
-}
-
-nexusPublishing {
- repositories {
- sonatype {
- stagingProfileId = sonatypeStagingProfileId
- username = ossrhUsername
- password = ossrhPassword
- version = rootVersionName
- nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
- snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
- }
- }
-}
\ No newline at end of file
diff --git a/bindings/kotlin/sdk/sdk-android/.gitignore b/bindings/kotlin/sdk/sdk-android/.gitignore
deleted file mode 100644
index 42afabfd2ab..00000000000
--- a/bindings/kotlin/sdk/sdk-android/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/bindings/kotlin/sdk/sdk-android/build.gradle b/bindings/kotlin/sdk/sdk-android/build.gradle
deleted file mode 100644
index 14cb16560a7..00000000000
--- a/bindings/kotlin/sdk/sdk-android/build.gradle
+++ /dev/null
@@ -1,51 +0,0 @@
-plugins {
- id 'com.android.library'
- id 'org.jetbrains.kotlin.android'
-}
-
-ext {
- PUBLISH_GROUP_ID = ConfigurationData.publishGroupId
- PUBLISH_ARTIFACT_ID = 'sdk-android'
- PUBLISH_VERSION = rootVersionName
- PUBLISH_DESCRIPTION = 'Android Bindings to the Matrix Rust SDK'
-}
-
-apply from: "${rootDir}/scripts/publish-module.gradle"
-
-android {
-
- compileSdk ConfigurationData.compileSdk
-
- defaultConfig {
- minSdk ConfigurationData.minSdk
- targetSdk ConfigurationData.targetSdk
- versionName ConfigurationData.versionName
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "consumer-rules.pro"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
-}
-
-android.libraryVariants.all { variant ->
- def sourceSet = variant.sourceSets.find { it.name == variant.name }
- sourceSet.java.srcDir new File(buildDir, "generated/source/${variant.name}")
-}
-
-dependencies {
- implementation Dependencies.jna
- testImplementation Dependencies.junit
-}
diff --git a/bindings/kotlin/sdk/sdk-android/consumer-rules.pro b/bindings/kotlin/sdk/sdk-android/consumer-rules.pro
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/bindings/kotlin/sdk/sdk-android/proguard-rules.pro b/bindings/kotlin/sdk/sdk-android/proguard-rules.pro
deleted file mode 100644
index 481bb434814..00000000000
--- a/bindings/kotlin/sdk/sdk-android/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/bindings/kotlin/sdk/sdk-android/src/main/AndroidManifest.xml b/bindings/kotlin/sdk/sdk-android/src/main/AndroidManifest.xml
deleted file mode 100644
index 1ae1f06b5cd..00000000000
--- a/bindings/kotlin/sdk/sdk-android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/bindings/kotlin/sdk/sdk-jvm/.gitignore b/bindings/kotlin/sdk/sdk-jvm/.gitignore
deleted file mode 100644
index 42afabfd2ab..00000000000
--- a/bindings/kotlin/sdk/sdk-jvm/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/bindings/kotlin/sdk/sdk-jvm/build.gradle b/bindings/kotlin/sdk/sdk-jvm/build.gradle
deleted file mode 100644
index ce669345bf8..00000000000
--- a/bindings/kotlin/sdk/sdk-jvm/build.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-plugins {
- id 'java-library'
- id 'org.jetbrains.kotlin.jvm'
-}
-
-java {
- sourceCompatibility = JavaVersion.VERSION_1_7
- targetCompatibility = JavaVersion.VERSION_1_7
-}
-
-dependencies {
- implementation 'net.java.dev.jna:jna:5.10.0@aar'
-}
\ No newline at end of file
diff --git a/bindings/kotlin/settings.gradle b/bindings/kotlin/settings.gradle
deleted file mode 100644
index f1f0f22796d..00000000000
--- a/bindings/kotlin/settings.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-pluginManagement {
- repositories {
- gradlePluginPortal()
- google()
- mavenCentral()
- }
- plugins {
- id 'com.android.application' version '7.1.0-beta01'
- id 'com.android.library' version '7.1.0-beta01'
- id 'org.jetbrains.kotlin.android' version '1.5.30'
- id 'org.jetbrains.kotlin.jvm' version '1.5.30'
- }
-}
-dependencyResolutionManagement {
- repositories {
- google()
- mavenCentral()
- flatDir {
- dirs 'libs'
- }
- }
-}
-rootProject.name = "MatrixKotlinRustSDK"
-include ':crypto:crypto-android'
-include ':crypto:crypto-jvm'
-include ':sdk:sdk-jvm'
-include ':sdk:sdk-android'
diff --git a/bindings/matrix-sdk-crypto-ffi/Cargo.toml b/bindings/matrix-sdk-crypto-ffi/Cargo.toml
index 0c8c876b7ca..31ed0ecf1db 100644
--- a/bindings/matrix-sdk-crypto-ffi/Cargo.toml
+++ b/bindings/matrix-sdk-crypto-ffi/Cargo.toml
@@ -52,7 +52,7 @@ default_features = false
features = ["crypto-store"]
[dependencies.tokio]
-version = "1.23.1"
+version = "1.24.2"
default_features = false
features = ["rt-multi-thread"]
diff --git a/bindings/matrix-sdk-crypto-ffi/src/backup_recovery_key.rs b/bindings/matrix-sdk-crypto-ffi/src/backup_recovery_key.rs
index 5cf6e3974f4..110406fb26e 100644
--- a/bindings/matrix-sdk-crypto-ffi/src/backup_recovery_key.rs
+++ b/bindings/matrix-sdk-crypto-ffi/src/backup_recovery_key.rs
@@ -27,8 +27,7 @@ pub enum PkDecryptionError {
}
/// Error type for the decoding and storing of the backup key.
-#[derive(Debug, Error, uniffi::Error)]
-#[uniffi(flat_error)]
+#[derive(Debug, Error)]
pub enum DecodeError {
/// An error happened while decoding the recovery key.
#[error(transparent)]
@@ -41,7 +40,7 @@ pub enum DecodeError {
/// Struct containing info about the way the backup key got derived from a
/// passphrase.
-#[derive(Debug, Clone, uniffi::Record)]
+#[derive(Debug, Clone)]
pub struct PassphraseInfo {
/// The salt that was used during key derivation.
pub private_key_salt: String,
diff --git a/bindings/matrix-sdk-crypto-ffi/src/error.rs b/bindings/matrix-sdk-crypto-ffi/src/error.rs
index 8017481eea2..6ae377a0191 100644
--- a/bindings/matrix-sdk-crypto-ffi/src/error.rs
+++ b/bindings/matrix-sdk-crypto-ffi/src/error.rs
@@ -4,6 +4,7 @@ use matrix_sdk_crypto::{
store::CryptoStoreError as InnerStoreError, KeyExportError, MegolmError, OlmError,
SecretImportError as RustSecretImportError, SignatureError as InnerSignatureError,
};
+use matrix_sdk_sqlite::OpenStoreError;
use ruma::{IdParseError, OwnedUserId};
#[derive(Debug, thiserror::Error)]
@@ -38,9 +39,10 @@ pub enum SignatureError {
UnknownUserIdentity(String),
}
-#[derive(Debug, thiserror::Error, uniffi::Error)]
-#[uniffi(flat_error)]
+#[derive(Debug, thiserror::Error)]
pub enum CryptoStoreError {
+ #[error("Failed to open the store")]
+ OpenStore(#[from] OpenStoreError),
#[error(transparent)]
CryptoStore(#[from] InnerStoreError),
#[error(transparent)]
diff --git a/bindings/matrix-sdk-crypto-ffi/src/lib.rs b/bindings/matrix-sdk-crypto-ffi/src/lib.rs
index 4527025f3b2..aad28d80562 100644
--- a/bindings/matrix-sdk-crypto-ffi/src/lib.rs
+++ b/bindings/matrix-sdk-crypto-ffi/src/lib.rs
@@ -28,9 +28,11 @@ pub use error::{
use js_int::UInt;
pub use logger::{set_logger, Logger};
pub use machine::{KeyRequestPair, OlmMachine, SignatureVerification};
-use matrix_sdk_common::deserialized_responses::VerificationState;
+use matrix_sdk_common::deserialized_responses::ShieldState as RustShieldState;
use matrix_sdk_crypto::{
backups::SignatureState,
+ olm::{IdentityKeys, InboundGroupSession, Session},
+ store::{Changes, CryptoStore, RoomSettings as RustRoomSettings},
types::{EventEncryptionAlgorithm as RustEventEncryptionAlgorithm, SigningKey},
EncryptionSettings as RustEncryptionSettings, LocalTrust,
};
@@ -41,15 +43,18 @@ pub use responses::{
};
use ruma::{
events::room::history_visibility::HistoryVisibility as RustHistoryVisibility, DeviceId,
- DeviceKeyAlgorithm, OwnedUserId, RoomId, SecondsSinceUnixEpoch, UserId,
+ DeviceKeyAlgorithm, OwnedDeviceId, OwnedUserId, RoomId, SecondsSinceUnixEpoch, UserId,
};
use serde::{Deserialize, Serialize};
+use tokio::runtime::Runtime;
+use uniffi_api::*;
pub use users::UserIdentity;
pub use verification::{
CancelInfo, ConfirmVerificationResult, QrCode, QrCodeListener, QrCodeState,
RequestVerificationResult, Sas, SasListener, SasState, ScanResult, StartSasResult,
Verification, VerificationRequest, VerificationRequestListener, VerificationRequestState,
};
+use vodozemac::{Curve25519PublicKey, Ed25519PublicKey};
/// Struct collecting data that is important to migrate to the rust-sdk
#[derive(Deserialize, Serialize)]
@@ -70,6 +75,26 @@ pub struct MigrationData {
cross_signing: CrossSigningKeyExport,
/// The list of users that the Rust SDK should track.
tracked_users: Vec,
+ /// Map of room settings
+ room_settings: HashMap,
+}
+
+/// Struct collecting data that is important to migrate sessions to the rust-sdk
+pub struct SessionMigrationData {
+ /// The user id that the data belongs to.
+ user_id: String,
+ /// The device id that the data belongs to.
+ device_id: String,
+ /// The Curve25519 public key of the Account that owns this data.
+ curve25519_key: String,
+ /// The Ed25519 public key of the Account that owns this data.
+ ed25519_key: String,
+ /// The list of pickleds Olm Sessions.
+ sessions: Vec,
+ /// The list of pickled Megolm inbound group sessions.
+ inbound_group_sessions: Vec,
+ /// The Olm pickle key that was used to pickle all the Olm objects.
+ pickle_key: Vec,
}
/// A pickled version of an `Account`.
@@ -149,17 +174,17 @@ impl From for MigrationError {
}
}
-/// Migrate a libolm based setup to a vodozemac based setup stored in a Sled
+/// Migrate a libolm based setup to a vodozemac based setup stored in a SQLite
/// store.
///
/// # Arguments
///
-/// * `data` - The data that should be migrated over to the Sled store.
+/// * `data` - The data that should be migrated over to the SQLite store.
///
-/// * `path` - The path where the Sled store should be created.
+/// * `path` - The path where the SQLite store should be created.
///
/// * `passphrase` - The passphrase that should be used to encrypt the data at
-/// rest in the Sled store. **Warning**, if no passphrase is given, the store
+/// rest in the SQLite store. **Warning**, if no passphrase is given, the store
/// and all its data will remain unencrypted.
///
/// * `progress_listener` - A callback that can be used to introspect the
@@ -170,7 +195,6 @@ pub fn migrate(
passphrase: Option,
progress_listener: Box,
) -> anyhow::Result<()> {
- use tokio::runtime::Runtime;
let runtime = Runtime::new()?;
runtime.block_on(async move {
migrate_data(data, path, passphrase, progress_listener).await?;
@@ -184,15 +208,8 @@ async fn migrate_data(
passphrase: Option,
progress_listener: Box,
) -> anyhow::Result<()> {
- use matrix_sdk_crypto::{
- olm::PrivateCrossSigningIdentity,
- store::{Changes as RustChanges, CryptoStore, RecoveryKey},
- };
- use vodozemac::{
- megolm::InboundGroupSession,
- olm::{Account, Session},
- Curve25519PublicKey,
- };
+ use matrix_sdk_crypto::{olm::PrivateCrossSigningIdentity, store::RecoveryKey};
+ use vodozemac::olm::Account;
use zeroize::Zeroize;
// The total steps here include all the sessions/inbound group sessions and
@@ -238,11 +255,170 @@ async fn migrate_data(
processed_steps += 1;
listener(processed_steps, total_steps);
+ let (sessions, inbound_group_sessions) = collect_sessions(
+ processed_steps,
+ total_steps,
+ &listener,
+ &data.pickle_key,
+ user_id.clone(),
+ device_id,
+ identity_keys,
+ data.sessions,
+ data.inbound_group_sessions,
+ )?;
+
+ let recovery_key =
+ data.backup_recovery_key.map(|k| RecoveryKey::from_base58(k.as_str())).transpose()?;
+
+ let cross_signing = PrivateCrossSigningIdentity::empty((*user_id).into());
+ cross_signing
+ .import_secrets_unchecked(
+ data.cross_signing.master_key.as_deref(),
+ data.cross_signing.self_signing_key.as_deref(),
+ data.cross_signing.user_signing_key.as_deref(),
+ )
+ .await?;
+
+ data.cross_signing.master_key.zeroize();
+ data.cross_signing.self_signing_key.zeroize();
+ data.cross_signing.user_signing_key.zeroize();
+
+ processed_steps += 1;
+ listener(processed_steps, total_steps);
+
+ let tracked_users: Vec<_> = data
+ .tracked_users
+ .into_iter()
+ .map(|u| Ok(((parse_user_id(&u)?), true)))
+ .collect::>()?;
+
+ let tracked_users: Vec<_> = tracked_users.iter().map(|(u, d)| (&**u, *d)).collect();
+ store.save_tracked_users(tracked_users.as_slice()).await?;
+
+ processed_steps += 1;
+ listener(processed_steps, total_steps);
+
+ let mut room_settings = HashMap::new();
+ for (room_id, settings) in data.room_settings {
+ let room_id = RoomId::parse(room_id)?;
+ room_settings.insert(room_id, settings.into());
+ }
+
+ let changes = Changes {
+ account: Some(account),
+ private_identity: Some(cross_signing),
+ sessions,
+ inbound_group_sessions,
+ recovery_key,
+ backup_version: data.backup_version,
+ room_settings,
+ ..Default::default()
+ };
+
+ save_changes(processed_steps, total_steps, &listener, changes, &store).await
+}
+
+async fn save_changes(
+ mut processed_steps: usize,
+ total_steps: usize,
+ listener: &dyn Fn(usize, usize),
+ changes: Changes,
+ store: &SqliteCryptoStore,
+) -> anyhow::Result<()> {
+ store.save_changes(changes).await?;
+
+ processed_steps += 1;
+ listener(processed_steps, total_steps);
+
+ Ok(())
+}
+
+/// Migrate sessions and group sessions of a libolm based setup to a vodozemac
+/// based setup stored in a SQLite store.
+///
+/// This method allows you to migrate a subset of the data, it should only be
+/// used after the [`migrate()`] method has been already used.
+///
+/// # Arguments
+///
+/// * `data` - The data that should be migrated over to the SQLite store.
+///
+/// * `path` - The path where the SQLite store should be created.
+///
+/// * `passphrase` - The passphrase that should be used to encrypt the data at
+/// rest in the SQLite store. **Warning**, if no passphrase is given, the store
+/// and all its data will remain unencrypted.
+///
+/// * `progress_listener` - A callback that can be used to introspect the
+/// progress of the migration.
+pub fn migrate_sessions(
+ data: SessionMigrationData,
+ path: &str,
+ passphrase: Option,
+ progress_listener: Box,
+) -> anyhow::Result<()> {
+ let runtime = Runtime::new()?;
+ runtime.block_on(migrate_session_data(data, path, passphrase, progress_listener))
+}
+
+async fn migrate_session_data(
+ data: SessionMigrationData,
+ path: &str,
+ passphrase: Option,
+ progress_listener: Box,
+) -> anyhow::Result<()> {
+ let store = SqliteCryptoStore::open(path, passphrase.as_deref()).await?;
+
+ let listener = |progress: usize, total: usize| {
+ progress_listener.on_progress(progress as i32, total as i32)
+ };
+
+ let total_steps = 1 + data.sessions.len() + data.inbound_group_sessions.len();
+ let processed_steps = 0;
+
+ let user_id = UserId::parse(data.user_id)?.into();
+ let device_id: OwnedDeviceId = data.device_id.into();
+
+ let identity_keys = IdentityKeys {
+ ed25519: Ed25519PublicKey::from_base64(&data.ed25519_key)?,
+ curve25519: Curve25519PublicKey::from_base64(&data.curve25519_key)?,
+ }
+ .into();
+
+ let (sessions, inbound_group_sessions) = collect_sessions(
+ processed_steps,
+ total_steps,
+ &listener,
+ &data.pickle_key,
+ user_id,
+ device_id.into(),
+ identity_keys,
+ data.sessions,
+ data.inbound_group_sessions,
+ )?;
+
+ let changes = Changes { sessions, inbound_group_sessions, ..Default::default() };
+ save_changes(processed_steps, total_steps, &listener, changes, &store).await
+}
+
+#[allow(clippy::too_many_arguments)]
+fn collect_sessions(
+ mut processed_steps: usize,
+ total_steps: usize,
+ listener: &dyn Fn(usize, usize),
+ pickle_key: &[u8],
+ user_id: Arc,
+ device_id: Arc,
+ identity_keys: Arc,
+ session_pickles: Vec,
+ group_session_pickles: Vec,
+) -> anyhow::Result<(Vec, Vec)> {
let mut sessions = Vec::new();
- for session_pickle in data.sessions {
+ for session_pickle in session_pickles {
let pickle =
- Session::from_libolm_pickle(&session_pickle.pickle, &data.pickle_key)?.pickle();
+ vodozemac::olm::Session::from_libolm_pickle(&session_pickle.pickle, pickle_key)?
+ .pickle();
let creation_time = SecondsSinceUnixEpoch(UInt::from_str(&session_pickle.creation_time)?);
let last_use_time = SecondsSinceUnixEpoch(UInt::from_str(&session_pickle.last_use_time)?);
@@ -255,12 +431,8 @@ async fn migrate_data(
last_use_time,
};
- let session = matrix_sdk_crypto::olm::Session::from_pickle(
- user_id.clone(),
- device_id.clone(),
- identity_keys.clone(),
- pickle,
- );
+ let session =
+ Session::from_pickle(user_id.clone(), device_id.clone(), identity_keys.clone(), pickle);
sessions.push(session);
processed_steps += 1;
@@ -269,9 +441,12 @@ async fn migrate_data(
let mut inbound_group_sessions = Vec::new();
- for session in data.inbound_group_sessions {
- let pickle =
- InboundGroupSession::from_libolm_pickle(&session.pickle, &data.pickle_key)?.pickle();
+ for session in group_session_pickles {
+ let pickle = vodozemac::megolm::InboundGroupSession::from_libolm_pickle(
+ &session.pickle,
+ pickle_key,
+ )?
+ .pickle();
let sender_key = Curve25519PublicKey::from_base64(&session.sender_key)?;
@@ -302,52 +477,46 @@ async fn migrate_data(
listener(processed_steps, total_steps);
}
- let recovery_key =
- data.backup_recovery_key.map(|k| RecoveryKey::from_base58(k.as_str())).transpose()?;
-
- let cross_signing = PrivateCrossSigningIdentity::empty((*user_id).into());
- cross_signing
- .import_secrets_unchecked(
- data.cross_signing.master_key.as_deref(),
- data.cross_signing.self_signing_key.as_deref(),
- data.cross_signing.user_signing_key.as_deref(),
- )
- .await?;
-
- data.cross_signing.master_key.zeroize();
- data.cross_signing.self_signing_key.zeroize();
- data.cross_signing.user_signing_key.zeroize();
-
- processed_steps += 1;
- listener(processed_steps, total_steps);
-
- let tracked_users: Vec<_> = data
- .tracked_users
- .into_iter()
- .map(|u| Ok(((parse_user_id(&u)?), true)))
- .collect::>()?;
+ Ok((sessions, inbound_group_sessions))
+}
- let tracked_users: Vec<_> = tracked_users.iter().map(|(u, d)| (&**u, *d)).collect();
- store.save_tracked_users(tracked_users.as_slice()).await?;
+/// Migrate room settings, including room algorithm and whether to block
+/// untrusted devices from legacy store to Sqlite store.
+///
+/// Note that this method should only be used if a client has already migrated
+/// account data via [migrate](#method.migrate) method, which did not include
+/// room settings. For a brand new migration, the [migrate](#method.migrate)
+/// method will take care of room settings automatically, if provided.
+///
+/// # Arguments
+///
+/// * `room_settings` - Map of room settings
+///
+/// * `path` - The path where the Sqlite store should be created.
+///
+/// * `passphrase` - The passphrase that should be used to encrypt the data at
+/// rest in the Sqlite store. **Warning**, if no passphrase is given, the store
+/// and all its data will remain unencrypted.
+pub fn migrate_room_settings(
+ room_settings: HashMap,
+ path: &str,
+ passphrase: Option,
+) -> anyhow::Result<()> {
+ let runtime = Runtime::new()?;
+ runtime.block_on(async move {
+ let store = SqliteCryptoStore::open(path, passphrase.as_deref()).await?;
- processed_steps += 1;
- listener(processed_steps, total_steps);
+ let mut rust_settings = HashMap::new();
+ for (room_id, settings) in room_settings {
+ let room_id = RoomId::parse(room_id)?;
+ rust_settings.insert(room_id, settings.into());
+ }
- let changes = RustChanges {
- account: Some(account),
- private_identity: Some(cross_signing),
- sessions,
- inbound_group_sessions,
- recovery_key,
- backup_version: data.backup_version,
- ..Default::default()
- };
- store.save_changes(changes).await?;
+ let changes = Changes { room_settings: rust_settings, ..Default::default() };
+ store.save_changes(changes).await?;
- processed_steps += 1;
- listener(processed_steps, total_steps);
-
- Ok(())
+ Ok(())
+ })
}
/// Callback that will be passed over the FFI to report progress
@@ -369,6 +538,7 @@ impl ProgressListener for T {
}
/// An encryption algorithm to be used to encrypt messages sent to a room.
+#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub enum EventEncryptionAlgorithm {
/// Olm version 1 using Curve25519, AES-256, and SHA-256.
OlmV1Curve25519AesSha2,
@@ -379,12 +549,22 @@ pub enum EventEncryptionAlgorithm {
impl From for RustEventEncryptionAlgorithm {
fn from(a: EventEncryptionAlgorithm) -> Self {
match a {
- EventEncryptionAlgorithm::OlmV1Curve25519AesSha2 => {
- RustEventEncryptionAlgorithm::OlmV1Curve25519AesSha2
- }
- EventEncryptionAlgorithm::MegolmV1AesSha2 => {
- RustEventEncryptionAlgorithm::MegolmV1AesSha2
+ EventEncryptionAlgorithm::OlmV1Curve25519AesSha2 => Self::OlmV1Curve25519AesSha2,
+ EventEncryptionAlgorithm::MegolmV1AesSha2 => Self::MegolmV1AesSha2,
+ }
+ }
+}
+
+impl TryFrom for EventEncryptionAlgorithm {
+ type Error = serde_json::Error;
+
+ fn try_from(value: RustEventEncryptionAlgorithm) -> Result {
+ match value {
+ RustEventEncryptionAlgorithm::OlmV1Curve25519AesSha2 => {
+ Ok(Self::OlmV1Curve25519AesSha2)
}
+ RustEventEncryptionAlgorithm::MegolmV1AesSha2 => Ok(Self::MegolmV1AesSha2),
+ _ => Err(serde::de::Error::custom(format!("Unsupported algorithm {value}"))),
}
}
}
@@ -419,10 +599,10 @@ pub enum HistoryVisibility {
impl From for RustHistoryVisibility {
fn from(h: HistoryVisibility) -> Self {
match h {
- HistoryVisibility::Invited => RustHistoryVisibility::Invited,
- HistoryVisibility::Joined => RustHistoryVisibility::Joined,
- HistoryVisibility::Shared => RustHistoryVisibility::Shared,
- HistoryVisibility::WorldReadable => RustHistoryVisibility::Shared,
+ HistoryVisibility::Invited => Self::Invited,
+ HistoryVisibility::Joined => Self::Joined,
+ HistoryVisibility::Shared => Self::Shared,
+ HistoryVisibility::WorldReadable => Self::Shared,
}
}
}
@@ -432,6 +612,7 @@ impl From for RustHistoryVisibility {
/// These settings control which algorithm the room key should use, how long a
/// room key should be used and some other important information that determines
/// the lifetime of a room key.
+#[derive(uniffi::Record)]
pub struct EncryptionSettings {
/// The encryption algorithm that should be used in the room.
pub algorithm: EventEncryptionAlgorithm,
@@ -462,6 +643,7 @@ impl From for RustEncryptionSettings {
}
/// An event that was successfully decrypted.
+#[derive(uniffi::Record)]
pub struct DecryptedEvent {
/// The decrypted version of the event.
pub clear_event: String,
@@ -473,15 +655,53 @@ pub struct DecryptedEvent {
/// key to us. Is empty if the key came directly from the sender of the
/// event.
pub forwarding_curve25519_chain: Vec,
- /// The verification state of the device that sent us the event, note this
- /// is the state of the device at the time of decryption. It may change in
- /// the future if a device gets verified or deleted.
- pub verification_state: VerificationState,
+ /// The shield state (color and message to display to user) for the event,
+ /// representing the event's authenticity. Computed from the properties of
+ /// the sender user identity and their Olm device.
+ ///
+ /// Note that this is computed at time of decryption, so the value reflects
+ /// the computed event authenticity at that time. Authenticity-related
+ /// properties can change later on, such as when a user identity is
+ /// subsequently verified or a device is deleted.
+ pub shield_state: ShieldState,
+}
+
+/// Take a look at [`matrix_sdk_common::deserialized_responses::ShieldState`]
+/// for more info.
+#[allow(missing_docs)]
+#[derive(uniffi::Enum)]
+pub enum ShieldColor {
+ Red,
+ Grey,
+ None,
+}
+
+/// Take a look at [`matrix_sdk_common::deserialized_responses::ShieldState`]
+/// for more info.
+#[derive(uniffi::Record)]
+#[allow(missing_docs)]
+pub struct ShieldState {
+ color: ShieldColor,
+ message: Option,
+}
+
+impl From for ShieldState {
+ fn from(value: RustShieldState) -> Self {
+ match value {
+ RustShieldState::Red { message } => {
+ Self { color: ShieldColor::Red, message: Some(message.to_owned()) }
+ }
+ RustShieldState::Grey { message } => {
+ Self { color: ShieldColor::Grey, message: Some(message.to_owned()) }
+ }
+ RustShieldState::None => Self { color: ShieldColor::None, message: None },
+ }
+ }
}
/// Struct representing the state of our private cross signing keys, it shows
/// which private cross signing keys we have locally stored.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, uniffi::Record)]
pub struct CrossSigningStatus {
/// Do we have the master key.
pub has_master: bool,
@@ -587,6 +807,34 @@ impl From for CrossSigningStatus {
}
}
+/// Room encryption settings which are modified by state events or user options
+#[derive(Debug, Deserialize, Serialize, PartialEq)]
+pub struct RoomSettings {
+ /// The encryption algorithm that should be used in the room.
+ pub algorithm: EventEncryptionAlgorithm,
+ /// Should untrusted devices receive the room key, or should they be
+ /// excluded from the conversation.
+ pub only_allow_trusted_devices: bool,
+}
+
+impl TryFrom for RoomSettings {
+ type Error = serde_json::Error;
+
+ fn try_from(value: RustRoomSettings) -> Result {
+ let algorithm = value.algorithm.try_into()?;
+ Ok(Self { algorithm, only_allow_trusted_devices: value.only_allow_trusted_devices })
+ }
+}
+
+impl From for RustRoomSettings {
+ fn from(value: RoomSettings) -> Self {
+ Self {
+ algorithm: value.algorithm.into(),
+ only_allow_trusted_devices: value.only_allow_trusted_devices,
+ }
+ }
+}
+
fn parse_user_id(user_id: &str) -> Result {
ruma::UserId::parse(user_id).map_err(|e| CryptoStoreError::InvalidUserId(user_id.to_owned(), e))
}
@@ -596,10 +844,14 @@ mod uniffi_types {
backup_recovery_key::{
BackupRecoveryKey, DecodeError, MegolmV1BackupKey, PassphraseInfo, PkDecryptionError,
},
- error::CryptoStoreError,
- machine::OlmMachine,
- responses::Request,
- BackupKeys, RoomKeyCounts,
+ error::{CryptoStoreError, DecryptionError, SecretImportError},
+ machine::{KeyRequestPair, OlmMachine},
+ responses::{BootstrapCrossSigningResult, DeviceLists, Request},
+ verification::{
+ RequestVerificationResult, StartSasResult, Verification, VerificationRequest,
+ },
+ BackupKeys, CrossSigningKeyExport, CrossSigningStatus, DecryptedEvent, EncryptionSettings,
+ EventEncryptionAlgorithm, RoomKeyCounts, RoomSettings, ShieldColor, ShieldState,
};
}
@@ -610,7 +862,7 @@ mod test {
use tempfile::tempdir;
use super::MigrationData;
- use crate::{migrate, OlmMachine};
+ use crate::{migrate, EventEncryptionAlgorithm, OlmMachine, RoomSettings};
#[test]
fn android_migration() -> Result<()> {
@@ -693,7 +945,17 @@ mod test {
"@this-is-me:matrix.org",
"@Amandine:matrix.org",
"@ganfra:matrix.org"
- ]
+ ],
+ "room_settings": {
+ "!AZkqtjvtwPAuyNOXEt:matrix.org": {
+ "algorithm": "OlmV1Curve25519AesSha2",
+ "only_allow_trusted_devices": true
+ },
+ "!CWLUCoEWXSFyTCOtfL:matrix.org": {
+ "algorithm": "MegolmV1AesSha2",
+ "only_allow_trusted_devices": false
+ },
+ }
});
let migration_data: MigrationData = serde_json::from_value(data)?;
@@ -722,6 +984,27 @@ mod test {
let backup_keys = machine.get_backup_keys()?;
assert!(backup_keys.is_some());
+ let settings1 = machine.get_room_settings("!AZkqtjvtwPAuyNOXEt:matrix.org".into())?;
+ assert_eq!(
+ Some(RoomSettings {
+ algorithm: EventEncryptionAlgorithm::OlmV1Curve25519AesSha2,
+ only_allow_trusted_devices: true
+ }),
+ settings1
+ );
+
+ let settings2 = machine.get_room_settings("!CWLUCoEWXSFyTCOtfL:matrix.org".into())?;
+ assert_eq!(
+ Some(RoomSettings {
+ algorithm: EventEncryptionAlgorithm::MegolmV1AesSha2,
+ only_allow_trusted_devices: false
+ }),
+ settings2
+ );
+
+ let settings3 = machine.get_room_settings("!XYZ:matrix.org".into())?;
+ assert!(settings3.is_none());
+
Ok(())
}
}
diff --git a/bindings/matrix-sdk-crypto-ffi/src/logger.rs b/bindings/matrix-sdk-crypto-ffi/src/logger.rs
index ce9ea068741..c2c99111953 100644
--- a/bindings/matrix-sdk-crypto-ffi/src/logger.rs
+++ b/bindings/matrix-sdk-crypto-ffi/src/logger.rs
@@ -44,9 +44,13 @@ pub struct LoggerWrapper {
pub fn set_logger(logger: Box) {
let logger = LoggerWrapper { inner: Arc::new(Mutex::new(logger)) };
- let filter = EnvFilter::from_default_env().add_directive(
- "matrix_sdk_crypto=trace".parse().expect("Can't parse logging filter directive"),
- );
+ let filter = EnvFilter::from_default_env()
+ .add_directive(
+ "matrix_sdk_crypto=trace".parse().expect("Can't parse logging filter directive"),
+ )
+ .add_directive(
+ "matrix_sdk_sqlite=debug".parse().expect("Can't parse logging filter directive"),
+ );
let _ = tracing_subscriber::fmt()
.with_writer(logger)
diff --git a/bindings/matrix-sdk-crypto-ffi/src/machine.rs b/bindings/matrix-sdk-crypto-ffi/src/machine.rs
index 97c72c1735e..bd9b476ac90 100644
--- a/bindings/matrix-sdk-crypto-ffi/src/machine.rs
+++ b/bindings/matrix-sdk-crypto-ffi/src/machine.rs
@@ -16,7 +16,7 @@ use matrix_sdk_crypto::{
},
decrypt_room_key_export, encrypt_room_key_export,
olm::ExportedRoomKey,
- store::RecoveryKey,
+ store::{Changes, RecoveryKey},
LocalTrust, OlmMachine as InnerMachine, UserIdentities,
};
use ruma::{
@@ -53,9 +53,9 @@ use crate::{
responses::{response_from_string, OwnedResponse},
BackupKeys, BackupRecoveryKey, BootstrapCrossSigningResult, CrossSigningKeyExport,
CrossSigningStatus, DecodeError, DecryptedEvent, Device, DeviceLists, EncryptionSettings,
- KeyImportError, KeysImportResult, MegolmV1BackupKey, ProgressListener, Request, RequestType,
- RequestVerificationResult, RoomKeyCounts, Sas, SignatureUploadRequest, StartSasResult,
- UserIdentity, Verification, VerificationRequest,
+ EventEncryptionAlgorithm, KeyImportError, KeysImportResult, MegolmV1BackupKey,
+ ProgressListener, Request, RequestType, RequestVerificationResult, RoomKeyCounts, RoomSettings,
+ Sas, SignatureUploadRequest, StartSasResult, UserIdentity, Verification, VerificationRequest,
};
/// A high level state machine that handles E2EE for Matrix.
@@ -147,6 +147,14 @@ impl OlmMachine {
HashMap::from([("ed25519".to_owned(), ed25519_key), ("curve25519".to_owned(), curve_key)])
}
+
+ /// Get the status of the private cross signing keys.
+ ///
+ /// This can be used to check which private cross signing keys we have
+ /// stored locally.
+ pub fn cross_signing_status(&self) -> CrossSigningStatus {
+ self.runtime.block_on(self.inner.cross_signing_status()).into()
+ }
}
impl OlmMachine {
@@ -174,18 +182,7 @@ impl OlmMachine {
let runtime = Runtime::new().expect("Couldn't create a tokio runtime");
let store = runtime
- .block_on(matrix_sdk_sqlite::SqliteCryptoStore::open(path, passphrase.as_deref()))
- .map_err(|e| match e {
- // This is a bit of an error in the sled store, the
- // CryptoStore returns an `OpenStoreError` which has a
- // variant for the state store. Not sure what to do about
- // this.
- matrix_sdk_sqlite::OpenStoreError::Crypto(r) => r.into(),
- matrix_sdk_sqlite::OpenStoreError::Sqlite(s) => CryptoStoreError::CryptoStore(
- matrix_sdk_crypto::store::CryptoStoreError::backend(s),
- ),
- _ => unreachable!(),
- })?;
+ .block_on(matrix_sdk_sqlite::SqliteCryptoStore::open(path, passphrase.as_deref()))?;
passphrase.zeroize();
@@ -450,7 +447,10 @@ impl OlmMachine {
Ok(())
}
+}
+#[uniffi::export]
+impl OlmMachine {
/// Let the state machine know about E2EE related sync changes that we
/// received from the server.
///
@@ -468,12 +468,12 @@ impl OlmMachine {
/// * `key_counts` - The map of uploaded one-time key types and counts.
pub fn receive_sync_changes(
&self,
- events: &str,
+ events: String,
device_changes: DeviceLists,
key_counts: HashMap,
unused_fallback_keys: Option>,
) -> Result {
- let to_device: ToDevice = serde_json::from_str(events)?;
+ let to_device: ToDevice = serde_json::from_str(&events)?;
let device_changes: RumaDeviceLists = device_changes.into();
let key_counts: BTreeMap = key_counts
.into_iter()
@@ -528,8 +528,8 @@ impl OlmMachine {
///
/// A user can be marked for tracking using the
/// [`OlmMachine::update_tracked_users()`] method.
- pub fn is_user_tracked(&self, user_id: &str) -> Result {
- let user_id = parse_user_id(user_id)?;
+ pub fn is_user_tracked(&self, user_id: String) -> Result {
+ let user_id = parse_user_id(&user_id)?;
Ok(self.runtime.block_on(self.inner.tracked_users())?.contains(&user_id))
}
@@ -560,6 +560,101 @@ impl OlmMachine {
.map(|r| r.into()))
}
+ /// Get the stored room settings, such as the encryption algorithm or
+ /// whether to encrypt only for trusted devices.
+ ///
+ /// These settings can be modified via
+ /// [set_room_algorithm()](#method.set_room_algorithm) and
+ /// [set_room_only_allow_trusted_devices()](#method.
+ /// set_room_only_allow_trusted_devices) methods.
+ pub fn get_room_settings(
+ &self,
+ room_id: String,
+ ) -> Result