You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a custom filename in my Cargo.toml like so:
[lib]
crate-type = ["cdylib"]
path = "custom.rs"
Then, if i run x build --arch arm64 --platform android , i'd have an output like so:
[1/3] Fetch precompiled artifacts
info: component 'rust-std' for target 'aarch64-linux-android' is up to date
[1/3] Fetch precompiled artifacts [112ms]
[2/3] Build rust `my_app` [SKIPPED]
[3/3] Create apk [429ms]
It wouldn't build the app and just print [SKIPPED].
It took me a while to realize this is because I'm using a custom path and there is no src/lib.rs
Probably due to this check.
@ogoffart indeed! I've previously solved this for cargo-apk (""deprecated"") in rust-mobile/cargo-subcommand#17 (including renames via name = ""), and am now mostly unhappy that xbuild has mostly copy-pasted older implementations rather than reusing that crate (or any other crate that parses/reflects a workspace). To the point that I don't feel like typing up the solutions for the second time :)
I'm using a custom filename in my Cargo.toml like so:
Then, if i run
x build --arch arm64 --platform android
, i'd have an output like so:It wouldn't build the app and just print
[SKIPPED]
.It took me a while to realize this is because I'm using a custom path and there is no src/lib.rs
Probably due to this check.
xbuild/xbuild/src/command/build.rs
Line 30 in 268939a
I'm not quite sure why this check is there, but I would recommend checking the existence of a
[lib]
section in Cargo.toml as well.The text was updated successfully, but these errors were encountered: