PolyMeilex / vscode-rust-targets

Change rust targets easily
6 stars 4 forks source link

Override cargo runner for android #7

Open pronebird opened 1 month ago

pronebird commented 1 month ago

Hi,

Some targets like android require additional configuration in order to compile the code. Would it be possible to provide additional configuration to override the runner for cargo? For example invoke cargo ndk --target aarch64-linux-android check instead of regular cargo --target <..> check

PolyMeilex commented 3 weeks ago

Hi, Can you check if this is possible with rust analyzer at all? By setting rust-analyzer.check.command to "ndk chcek" instead of regular "check" or "clippy".

pronebird commented 3 weeks ago

Unfortunately it only seems to work with overrideCommand:

"rust-analyzer.check.overrideCommand": [
        "cargo",
        "ndk",
        "-t",
        "arm64-v8a",
        "check"
],

However I can't really test it in my workspace as not all crates from my workspace can be built for android. Errrm... in console I can simply pass -p <package> and it's all good. Doesn't seem to work with vscode/rust-analyzer this way.