Skip to content

Build fixes and improvements #34

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 7 commits into from
Oct 9, 2024
Merged

Build fixes and improvements #34

merged 7 commits into from
Oct 9, 2024

Conversation

rkistner
Copy link
Contributor

@rkistner rkistner commented Oct 8, 2024

This now adds explicit -Z build-std and --target specifiers to every release build.

The significant effects:

  1. The --target ensures we actually build for the correct target. The current linux libpowersync_aarch64.so release is actually a x86_64 build.
  2. build-std gives us a more optimized std-lib, and specifically removes any unwinding-related code. This reduces the output library size (241KB -> 173K for linux x86_64),
  3. The above avoids undefined symbol: _Unwind_Resume or similar issues.

build-std also requires an explicit target.

Additionally, this fixes some linux targets incorrectly specified in .cargo/config.toml.

This specifically affects linux, macos and windows builds - will have to test each of those again. Android, iOS and WASM already used build-std, and are not affected.

This also fixes some issues in the release process:

  • Only upload binaries in the release.yml workflow - the others were not used.
  • Use gh release upload for binary uploads. The previous method created both a draft release and another published release; this now only creates a single draft.

Sizes of artifacts after these changes:
image

Note: Manually rebuilt libpowersync_aarch64.so for release 0.2.0, 0.2.1 and 0.3.0 to fix the build issue in current releases.

@rkistner rkistner marked this pull request as ready for review October 9, 2024 09:27
@rkistner rkistner requested a review from mugikhan October 9, 2024 11:07
Copy link
Contributor

@mugikhan mugikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the build process much simpler!

@rkistner rkistner merged commit aa09d5d into main Oct 9, 2024
31 checks passed
@rkistner rkistner deleted the build-fixes branch October 9, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants