Skip to content

Comments

Make uniffi an optional feature#32

Merged
notmandatory merged 1 commit intobitcoindevkit:masterfrom
bitcoinppl:uniffi-optional
Apr 28, 2025
Merged

Make uniffi an optional feature#32
notmandatory merged 1 commit intobitcoindevkit:masterfrom
bitcoinppl:uniffi-optional

Conversation

@praveenperera
Copy link
Contributor

No description provided.

Copy link
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

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

ACK 6ccaea6

Thanks, good to have this feature flagged!

@notmandatory notmandatory merged commit 75bcfb0 into bitcoindevkit:master Apr 28, 2025
6 checks passed
@praveenperera praveenperera deleted the uniffi-optional branch April 28, 2025 21:30
@reez
Copy link
Collaborator

reez commented May 1, 2025

this broke swift bindings, messed around with trying to fix properly, but figured I should ask for more context from you all on what this fixed/unblocked so that my fix didn't then break something you all needed from this change

@notmandatory
Copy link
Member

What sort of error did you get? it may not be related to this PR since #28 also touched swift stuff.

@praveenperera
Copy link
Contributor Author

@reez might need to add --features uniffi to these lines in the build xcframework script

# Target architectures
# macOS Intel
cargo build --package rust-cktap --profile release-smaller --target x86_64-apple-darwin
# macOS Apple Silicon
cargo build --package rust-cktap --profile release-smaller --target aarch64-apple-darwin
# Simulator on Intel Macs
cargo build --package rust-cktap --profile release-smaller --target x86_64-apple-ios
# Simulator on Apple Silicon Mac
cargo build --package rust-cktap --profile release-smaller --target aarch64-apple-ios-sim
# iPhone devices
cargo build --package rust-cktap --profile release-smaller --target aarch64-apple-ios

@reez
Copy link
Collaborator

reez commented May 1, 2025

@reez might need to add --features uniffi to these lines in the build xcframework script

# Target architectures
# macOS Intel
cargo build --package rust-cktap --profile release-smaller --target x86_64-apple-darwin
# macOS Apple Silicon
cargo build --package rust-cktap --profile release-smaller --target aarch64-apple-darwin
# Simulator on Intel Macs
cargo build --package rust-cktap --profile release-smaller --target x86_64-apple-ios
# Simulator on Apple Silicon Mac
cargo build --package rust-cktap --profile release-smaller --target aarch64-apple-ios-sim
# iPhone devices
cargo build --package rust-cktap --profile release-smaller --target aarch64-apple-ios

tried that earlier this morning in #33 but did not work for me (let me know if it somehow worked for you though?)

@reez
Copy link
Collaborator

reez commented May 1, 2025

What sort of error did you get? it may not be related to this PR since #28 also touched swift stuff.

error is that it doesnt generate rust_cktap.swift file anymore

It's not #28 , I verified by testing that earlier today by checking out from commit b6b7172

Its definitely this PR changes

And I've tried a good amount of ways today to try to get around it, that's why I figured I'd check with you all on context to maybe see if it sparked another idea for how to fix the swift bindings while not breaking what you all needed it for

@reez reez mentioned this pull request May 2, 2025
8 tasks
notmandatory added a commit that referenced this pull request May 15, 2025
f23819a chore: project restructure (Matthew)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  This PR restructures the project, separating core library functionality from FFI bindings. The goal is to support what was needed for PR #32 while still allowing the swift bindings to be built successfully.

  ### Notes to the reviewers

  - created dedicated cktap-ffi crate
  - removed ffi specific code from main library

  ### Changelog notice

  <!-- Notice the release manager should include in the release tag message changelog -->
  <!-- See https://keepachangelog.com/en/1.0.0/ for examples -->

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/notmandatory/rust-cktap/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [ ] I've added tests for the new feature
  * [ ] I've added docs for the new feature

  #### Bugfixes:

  * [ ] This pull request breaks the existing API
  * [ ] I've added tests to reproduce the issue which are now passing
  * [ ] I'm linking the issue being fixed by this PR

ACKs for top commit:
  notmandatory:
    ACK f23819a

Tree-SHA512: 36e9eeedf8b0df3351a261a03d65757bd66f602413d48d524cfb0959873f7a965c323aa03b114063ae992fd3eaacfb0e3841c7e6cb6a2c3db5a5a5d5030196ce
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.

3 participants