Skip to content

Update dependencies, prepare release #114

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 5 commits into from
Aug 6, 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
235 changes: 152 additions & 83 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ inherits = "release"
inherits = "wasm"

[workspace.package]
version = "0.4.2"
edition = "2021"
version = "0.4.3"
edition = "2024"
authors = ["JourneyApps"]
keywords = ["sqlite", "powersync"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group = "com.powersync"
version = "0.4.2"
version = "0.4.3"
description = "PowerSync Core SQLite Extension"

val localRepo = uri("build/repository/")
Expand Down
2 changes: 1 addition & 1 deletion android/src/prefab/prefab.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "powersync_sqlite_core",
"schema_version": 2,
"dependencies": [],
"version": "0.4.2"
"version": "0.4.3"
}
2 changes: 1 addition & 1 deletion crates/core/src/bson/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use serde::{
};

use super::{
BsonError,
error::ErrorKind,
parser::{ElementType, Parser},
BsonError,
};

pub struct Deserializer<'de> {
Expand Down
3 changes: 1 addition & 2 deletions crates/core/src/bson/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloc::{
boxed::Box,
string::{String, ToString},
};
use serde::de::{self, StdError};
use serde::de::{self};

use super::parser::ElementType;

Expand Down Expand Up @@ -97,4 +97,3 @@ impl de::Error for BsonError {
BsonError::new(None, ErrorKind::Custom(msg.to_string()))
}
}
impl StdError for BsonError {}
2 changes: 1 addition & 1 deletion crates/core/src/bson/parser.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::ffi::CStr;

use super::{error::ErrorKind, BsonError};
use super::{BsonError, error::ErrorKind};
use num_traits::{FromBytes, Num};

pub struct Parser<'de> {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use sqlite_nostd::{Connection, Context, Value};

use crate::create_sqlite_text_fn;
use crate::error::PowerSyncError;
use crate::sync::checkpoint::{validate_checkpoint, OwnedBucketChecksum};
use crate::sync::checkpoint::{OwnedBucketChecksum, validate_checkpoint};
use crate::sync::line::Checkpoint;

#[derive(Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/crud_vtab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extern crate alloc;
use alloc::boxed::Box;
use alloc::sync::Arc;
use const_format::formatcp;
use core::ffi::{c_char, c_int, c_void, CStr};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::sync::atomic::Ordering;
use serde::Serialize;
use serde_json::value::RawValue;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use alloc::{
string::{String, ToString},
};
use num_traits::FromPrimitive;
use sqlite_nostd::{self as sqlite, context, sqlite3, Connection, Context, ResultCode};
use sqlite_nostd::{self as sqlite, Connection, Context, ResultCode, context, sqlite3};
use thiserror::Error;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/ext.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sqlite_nostd::{sqlite3, Connection, Destructor, ManagedStmt, ResultCode};
use sqlite_nostd::{Connection, Destructor, ManagedStmt, ResultCode, sqlite3};

pub trait SafeManagedStmt {
fn exec(&self) -> Result<(), ResultCode>;
Expand Down
6 changes: 3 additions & 3 deletions crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ mod view_admin;
mod views;
mod vtab_util;

#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn sqlite3_powersync_init(
db: *mut sqlite::sqlite3,
err_msg: *mut *mut c_char,
Expand Down Expand Up @@ -87,7 +87,7 @@ fn init_extension(db: *mut sqlite::sqlite3) -> Result<(), PowerSyncError> {
Ok(())
}

extern "C" {
unsafe extern "C" {
#[cfg(feature = "static")]
#[allow(non_snake_case)]
pub fn sqlite3_auto_extension(
Expand All @@ -102,7 +102,7 @@ extern "C" {
}

#[cfg(feature = "static")]
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn powersync_init_static() -> c_int {
unsafe {
let f = sqlite3_powersync_init;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/schema/table_info.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use alloc::{format, string::String, vec, vec::Vec};
use serde::{de::Visitor, Deserialize};
use serde::{Deserialize, de::Visitor};

#[derive(Deserialize)]
pub struct Table {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl DatabaseState {
}

pub unsafe extern "C" fn destroy_arc(ptr: *mut c_void) {
drop(Arc::from_raw(ptr.cast::<DatabaseState>()));
drop(unsafe { Arc::from_raw(ptr.cast::<DatabaseState>()) });
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/sync/bucket_priority.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use serde::{de::Visitor, Deserialize, Serialize};
use serde::{Deserialize, Serialize, de::Visitor};

use crate::error::PowerSyncError;

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/sync/checkpoint.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloc::{string::String, vec::Vec};
use num_traits::Zero;

use crate::sync::{line::BucketChecksum, BucketPriority, Checksum};
use crate::sync::{BucketPriority, Checksum, line::BucketChecksum};
use sqlite_nostd::{self as sqlite, Connection, ResultCode};

/// A structure cloned from [BucketChecksum]s with an owned bucket name instead of one borrowed from
Expand Down
6 changes: 3 additions & 3 deletions crates/core/src/sync/checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use core::{
ops::{Add, AddAssign, Sub, SubAssign},
};

use num_traits::float::FloatCore;
use num_traits::Zero;
use serde::{de::Visitor, Deserialize, Serialize};
use num_traits::float::FloatCore;
use serde::{Deserialize, Serialize, de::Visitor};

/// A checksum as received from the sync service.
///
Expand All @@ -18,7 +18,7 @@ pub struct Checksum(Wrapping<u32>);

impl Checksum {
pub const fn value(self) -> u32 {
self.0 .0
self.0.0
}

pub const fn from_value(value: u32) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/sync/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ pub fn register(db: *mut sqlite::sqlite3, state: Arc<DatabaseState>) -> Result<(
}

unsafe extern "C" fn destroy(ptr: *mut c_void) {
drop(Box::from_raw(ptr.cast::<SqlController>()));
drop(unsafe { Box::from_raw(ptr.cast::<SqlController>()) });
}

let controller = Box::new(SqlController {
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/sync/line.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use alloc::borrow::Cow;
use alloc::vec::Vec;
use serde::de::{IgnoredAny, VariantAccess, Visitor};
use serde::Deserialize;
use serde::de::{IgnoredAny, VariantAccess, Visitor};

use crate::util::{deserialize_optional_string_to_i64, deserialize_string_to_i64};

use super::bucket_priority::BucketPriority;
use super::Checksum;
use super::bucket_priority::BucketPriority;

/// While we would like to always borrow strings for efficiency, that's not consistently possible.
/// With the JSON decoder, borrowing from input data is only possible when the string contains no
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/sync/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::{
ext::SafeManagedStmt,
};

use super::line::OplogData;
use super::Checksum;
use super::line::OplogData;
use super::{
line::{DataLine, OpType},
storage_adapter::{BucketInfo, StorageAdapter},
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/sync/storage_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
schema::Schema,
state::DatabaseState,
sync::{
checkpoint::{validate_checkpoint, ChecksumMismatch},
checkpoint::{ChecksumMismatch, validate_checkpoint},
sync_status::SyncPriorityStatus,
},
sync_local::{PartialSyncOperation, SyncOperation},
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/sync/streaming_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use crate::{
kv::client_id,
state::DatabaseState,
sync::{
checkpoint::OwnedBucketChecksum, interface::StartSyncStream, line::DataLine,
sync_status::Timestamp, BucketPriority,
BucketPriority, checkpoint::OwnedBucketChecksum, interface::StartSyncStream,
line::DataLine, sync_status::Timestamp,
},
};
use sqlite_nostd::{self as sqlite};
Expand Down
7 changes: 4 additions & 3 deletions crates/core/src/sync/sync_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ pub struct DownloadSyncStatus {

impl DownloadSyncStatus {
fn debug_assert_priority_status_is_sorted(&self) {
debug_assert!(self
.priority_status
.is_sorted_by(|a, b| a.priority >= b.priority))
debug_assert!(
self.priority_status
.is_sorted_by(|a, b| a.priority >= b.priority)
)
}

pub fn disconnect(&mut self) {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use sqlite::ResultCode;
use sqlite_nostd as sqlite;
use sqlite_nostd::{Connection, Context};

use crate::constants::{short_git_hash, CORE_PKG_VERSION};
use crate::constants::{CORE_PKG_VERSION, short_git_hash};
use crate::create_sqlite_text_fn;
use crate::error::PowerSyncError;

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/view_admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use sqlite_nostd as sqlite;
use sqlite_nostd::{Connection, Context};

use crate::error::PowerSyncError;
use crate::migrations::{powersync_migrate, LATEST_VERSION};
use crate::migrations::{LATEST_VERSION, powersync_migrate};
use crate::util::quote_identifier;
use crate::{create_auto_tx_function, create_sqlite_text_fn};

Expand Down
2 changes: 1 addition & 1 deletion crates/shell/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn panic(_info: &core::panic::PanicInfo) -> ! {
#[lang = "eh_personality"]
extern "C" fn eh_personality() {}

#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn core_init(_dummy: *mut c_char) -> c_int {
powersync_init_static()
}
2 changes: 1 addition & 1 deletion powersync-sqlite-core.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'powersync-sqlite-core'
s.version = '0.4.2'
s.version = '0.4.3'
s.summary = 'PowerSync SQLite Extension'
s.description = <<-DESC
PowerSync extension for SQLite.
Expand Down
2 changes: 1 addition & 1 deletion tool/build_xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TARGETS=(
aarch64-apple-tvos-sim
x86_64-apple-tvos
)
VERSION=0.4.2
VERSION=0.4.3

function generatePlist() {
min_os_version=0
Expand Down
Loading