Set --crate-type cdylib from the cmdline#80
Closed
Firestar99 wants to merge 3 commits intorust-mobile:mainfrom
Closed
Set --crate-type cdylib from the cmdline#80Firestar99 wants to merge 3 commits intorust-mobile:mainfrom
--crate-type cdylib from the cmdline#80Firestar99 wants to merge 3 commits intorust-mobile:mainfrom
Conversation
Member
|
See also prior art in #28, where this was already tried and eventually rejected. We can always re-evaluate, but it's worthwhile to at least have previous context linked and taken into account. |
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.
Instead of
cargo build, you can usecargo rustc --crate-type dylibto specify the crate type you want the target crate (not it's dependencies) to be compiled to. All "main apk" crates can (but don't have to) remove the previously required declaration inCargo.tomlbelow:This is entirely untested due to me not having the Android SDK installed, hoping that github actions will test it properly.
Also see rust-gpu's PR doing the exact same thing, where our Android build failed since I removed the explicit crate type everywhere.