-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add watchOS support (tentative) #73
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e3eb0f5
feat: add watchos support
zifeo 3b88988
cleanup
zifeo 3113ade
Refactor creating xcframework
simolus3 78a56cc
Remove unecessary changes
simolus3 3a35dea
Add static build as separate target
simolus3 01c0604
Add swift package for overrides
simolus3 eadfde2
Raise minimum version in podspec
simolus3 e96b797
Add missing space back
simolus3 d980146
Revert wasm build changes
simolus3 9d3a1d1
Don't add no-std targets
simolus3 9e94504
Add back missing whitespace
simolus3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ target/ | |
*.tar.gz | ||
*.tar.xz | ||
*.zip | ||
.build |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// swift-tools-version: 5.7 | ||
|
||
// NOTE! This is never released, we're only using this to support local builds builds for the | ||
// Swift SDK. | ||
import PackageDescription | ||
let packageName = "PowerSyncSQLiteCore" | ||
|
||
let package = Package( | ||
name: packageName, | ||
platforms: [ | ||
.iOS(.v13), | ||
.macOS(.v10_15), | ||
.watchOS(.v9) | ||
], | ||
products: [ | ||
.library( | ||
name: packageName, | ||
targets: [packageName]), | ||
], | ||
targets: [ | ||
.binaryTarget( | ||
name: packageName, | ||
path: "powersync-sqlite-core.xcframework" | ||
) | ||
] | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "powersync_static" | ||
edition.workspace = true | ||
version.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
authors.workspace = true | ||
keywords.workspace = true | ||
|
||
[lib] | ||
name = "powersync" | ||
crate-type = ["staticlib"] | ||
simolus3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[dependencies] | ||
sqlite_nostd = { workspace=true } | ||
|
||
[dependencies.powersync_core] | ||
path = "../core" | ||
default-features = false | ||
features = [] | ||
|
||
[features] | ||
default = ["powersync_core/static", "powersync_core/omit_load_extension", "sqlite_nostd/omit_load_extension"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Builds the core extension as a static library, exposing the `powersync_init_static` function to load it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#![no_std] | ||
#![feature(vec_into_raw_parts)] | ||
#![feature(core_intrinsics)] | ||
#![allow(internal_features)] | ||
#![feature(lang_items)] | ||
|
||
extern crate alloc; | ||
|
||
// Defines sqlite3_powersync_init | ||
#[allow(unused_imports)] | ||
use powersync_core; | ||
|
||
// Use the SQLite allocator, allowing us to freely transfer memory between SQLite and Rust. | ||
#[cfg(not(test))] | ||
use sqlite_nostd::SQLite3Allocator; | ||
|
||
#[cfg(not(test))] | ||
#[global_allocator] | ||
static ALLOCATOR: SQLite3Allocator = SQLite3Allocator {}; | ||
|
||
// Custom Panic handler for WASM and other no_std builds | ||
#[cfg(not(test))] | ||
#[panic_handler] | ||
fn panic(_info: &core::panic::PanicInfo) -> ! { | ||
core::intrinsics::abort() | ||
} | ||
|
||
#[cfg(not(target_family = "wasm"))] | ||
#[cfg(not(test))] | ||
#[lang = "eh_personality"] | ||
extern "C" fn eh_personality() {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.