fix: Default cross builds to the ffi feature#181
Merged
Conversation
make android passed an empty FEATURES through to the cross Makefile, which builds with --no-default-features, so all Android .so files (and iOS .a via make ios) were produced without any cfg_select! branch and exported no symbols. Default FEATURES to ffi in both Makefiles so the C ABI from threshold.h is actually compiled in; overrides via make android FEATURES=... still work.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
make androidpassed an emptyFEATURESthrough tocross/Makefile, which builds with--no-default-features— so nocfg_select!branch incrates/threshold-bls-ffi/src/lib.rswas compiled in and all four Android.sofiles exported no symbols.make ioshad the same problem via the locally-run cross build, producing an empty.a. Any consumer linking the C ABI fromthreshold.h(e.g. the JNA-based React Native bindings) would fail at runtime withUnsatisfiedLinkError.This defaults
FEATURES ?= ffiin both Makefiles. The root Makefile needs its own default because theandroidtarget passes-e FEATURES="$(FEATURES)"into Docker, and an empty-but-set environment variable would defeat a?=default downstream. Overrides viamake android FEATURES=...still work.Verification
--features ffireaching cargo on all three paths: the rootandroidtarget, the env-var route Docker uses, and local cross invocation (make ios)threshold.hsymbols (blind,combine,keygen,partial_sign, …); the featureless build exports zero