8000 Update Rust toolchain by simolus3 · Pull Request #83 · powersync-ja/powersync-sqlite-core · GitHub
[go: up one dir, main page]

Skip to content

Update Rust toolchain #83

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:

- name: Setup
run: |
rustup toolchain install nightly-2024-05-18-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2024-05-18-x86_64-unknown-linux-gnu
rustup toolchain install nightly-2025-04-15-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2025-04-15-x86_64-unknown-linux-gnu
rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:

- name: Setup
run: |
rustup toolchain install nightly-2024-05-18-aarch64-apple-darwin
rustup component add rust-src --toolchain nightly-2024-05-18-aarch64-apple-darwin
rustup toolchain install nightly-2025-04-15-aarch64-apple-darwin
rustup component add rust-src --toolchain nightly-2025-04-15-aarch64-apple-darwin
rustup target add \
x86_64-apple-darwin \
aarch64-apple-darwin \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binaries
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binaries
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binary
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binary
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:

- name: Setup
run: |
rustup toolchain install nightly-2024-05-18-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2024-05-18-x86_64-unknown-linux-gnu
rustup toolchain install nightly-2025-04-15-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2025-04-15-x86_64-unknown-linux-gnu
rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
Expand Down Expand Up @@ -84,8 +84,8 @@ jobs:

- name: Setup
run: |
rustup toolchain install nightly-2024-05-18-aarch64-apple-darwin
rustup component add rust-src --toolchain nightly-2024-05-18-aarch64-apple-darwin
rustup toolchain install nightly-2025-04-15-aarch64-apple-darwin
rustup component add rust-src --toolchain nightly-2025-04-15-aarch64-apple-darwin
rustup target add \
x86_64-apple-darwin \
aarch64-apple-darwin \
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binaries
Expand All @@ -178,7 +178,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binaries
Expand All @@ -203,7 +203,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binary
Expand All @@ -228,7 +228,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binary
Expand All @@ -253,7 +253,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binary
Expand All @@ -278,7 +278,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Setup emsdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ jobs:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.68
version: 4.0.7

- name: Build WASM
run: ./tool/build_wasm.sh
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
toolchain: nightly-2025-04-15
components: rust-src

- name: Build binary
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ default-members = ["crates/shell", "crates/sqlite"]

[profile.dev]
panic = "abort"
strip = true

[profile.release]
panic = "abort"
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/checkpoint.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extern crate alloc;

use alloc::format;
use alloc::string::String;
use alloc::vec::Vec;
use core::ffi::c_int;
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/diff.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extern crate alloc;

use alloc::format;
use alloc::string::{String, ToString};
use core::ffi::c_int;

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/fix_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn remove_duplicate_key_encoding(key: &str) -> Option<String> {
}

fn powersync_remove_duplicate_key_encoding_impl(
ctx: *mut sqlite::context,
_ctx: *mut sqlite::context,
args: &[*mut sqlite::value],
) -> Result<Option<String>, SQLiteError> {
let arg = args.get(0).ok_or(ResultCode::MISUSE)?;
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/json_merge.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extern crate alloc;

use alloc::format;
use alloc::string::{String, ToString};
use core::ffi::c_int;

Expand Down
1 change: 0 additions & 1 deletion crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#![feature(vec_into_raw_parts)]
#![allow(internal_features)]
#![feature(core_intrinsics)]
#![feature(error_in_core)]
#![feature(assert_matches)]

extern crate alloc;
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/uuid.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extern crate alloc;

use alloc::format;
use alloc::string::String;
use alloc::string::ToString;
use core::ffi::c_int;
Expand Down
1 change: 0 additions & 1 deletion crates/loadable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![feature(core_intrinsics)]
#![allow(internal_features)]
#![feature(lang_items)]
#![feature(error_in_core)]

extern crate alloc;

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-05-18"
channel = "nightly-2025-04-15"
7 changes: 4 additions & 3 deletions tool/build_wasm.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
emcc --version

# Normal build
# target/wasm32-unknown-emscripten/wasm/powersync.wasm
Expand Down Expand Up @@ -31,13 +32,13 @@ cp "target/wasm32-unknown-emscripten/wasm_asyncify/powersync.wasm" "libpowersync
# Static lib.
# Works for both sync and asyncify builds.
# Works for both emscripten and wasi.
# target/wasm32-wasi/wasm/libpowersync.a
# target/wasm32-wasip1/wasm/libpowersync.a
cargo build \
-p powersync_loadable \
--profile wasm \
--no-default-features \
--features "powersync_core/static powersync_core/omit_load_extension sqlite_nostd/omit_load_extension" \
-Z build-std=panic_abort,core,alloc \
--target wasm32-wasi
--target wasm32-wasip1

cp "target/wasm32-wasi/wasm/libpowersync.a" "libpowersync-wasm.a"
cp "target/wasm32-wasip1/wasm/libpowersync.a" "libpowersync-wasm.a"
0