espup
espup copied to clipboard
Windows aarch64 support
Motivations
I recently bought a windows on ARM laptop (Snapdragon X), however espup does not feature a build for it and since my rustup installation is aarch64, i can't use the x86 one with emulation.
- Would you like to implement this feature? [y/n]
No, i don't have time to jump into a project i don't know the inner workings of.
Solution
Since linux and darwin both feature aarch64 builds i assume it would be as simple as adding the builds for windows aarch64 in some kind of config
Alternatives
N/S
Additional context
N/S
In the meantime, can you build it from source?? cargo install espup
Funily enough i had tried after installing clang, but i forgot to restart the terminal and it failed because clang wasn't detected. trying it out now, the build succeeded !
Having a prebuilt binary amongst the other OSes would be nice for consistancy, though. Thank you for your reply !
Edit: trying to run the .exe i get the error
espup::host_triple::unsupported_host_triple
× Host triple 'aarch64-pc-windows-msvc' is not supported
Ahh right! Sorry I didn't think of this, we don't have Xtensa Rust binaries (generated in rust-build) for aarch64-windows.
Thanks for the report @ShyneTurtle. As github don't currently offer a aarch64 windows runner (except for paid users), and we don't have any hardware in our server room with this combo, we are unfortunately unable to provide prebuilt compilers for this host.
You may be able to get around this limitation by using x86-64-pc-windows-msvc compiler build by installing it manually, and letting (if it exists, like it does on macOS) the x86 emulation take care of running the compiler. This might make compile times slightly longer though.
The final option is building the compiler itself, which honestly isn't that difficult provided you can install the required dependencies for your platform. See https://github.com/esp-rs/rust#building-from-source
Thank you both for the insights !
I'm considering building from source but i'm worried about maintaining the installation: how would the fork compare to rustup in terms of ease of use and updates ?
also letting you know that in the meantime I managed to install the x86 version of esptool using cargo-binstall
I'm considering building from source but i'm worried about maintaining the installation: how would the fork compare to rustup in terms of ease of use and updates ?
All the dependencies are the same as upstream Rust, so it works the same way. We rebase on the stable release branch only, which is currently https://github.com/esp-rs/rust 1.84, when we rebase for 1.85 you can choose to upgrade (meaning compile it again) or stay on your current version if it's working.
Thank you for your answer, i'll try that next.
I'm not sure if the issue is the fact that i installed aarch64 rust and clang+llvm, while using esptool on x86, but while compiling my project i get an error while compiling esp-idf-sys : Neither any or platform specifc match found. Please create an issue on https://github.com/esp-rs/embuild and report your operating system
(currently rerunning the build with rust backtrace to get more info)
embuild, and likely the entire esp-idf build system (this might not be true, I just don't know) doesn't know about your host machine. You might have better luck with the officially supported bare metal programming environment: https://github.com/esp-rs/esp-hal.
The downer is really that the laptop is capable of emulating x86 for compatibility, but the software won't run because of runtime compatibility checks.
For this to work i'd have to self-compile and edit code in most of esp-rs 's build stack i imagine
How would building no_std apps help the compilation ? isn't the build stack shared ?
Any updates on this ? (don't wanna rush anyone, just a head's up)
Any updates on this ? (don't wanna rush anyone, just a head's up)
Hi! We wont be implementing this until the Windows aarch64 gh-hosted runner is available for us, not sure when gh will make it publicly available
The problem is still NOT platform-native compilation, but rather not preventing the program from starting at runtime with a triple check as the laptop features emulation, and is capable of running the x64 version.
Hi! Thanks for the pointer, we would welcome any contribution to improve this.
Also, the Windows aarch64 gh-hosted runner (windows-11-arm) seems to be now available.
Any updates on the progress ?
Hi! We won't be working in this feature anytime soon, but we welcome and will review any contributions.
I don't think we want to increase the maintenance burden we have further. Our efforts are better spent on the upstreaming of LLVM/Xtensa into rustc proper.