Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows aarch64 support #469

Open
ShyneTurtle opened this issue Jan 21, 2025 · 10 comments
Open

Windows aarch64 support #469

ShyneTurtle opened this issue Jan 21, 2025 · 10 comments
Labels
enhancement New feature or request

Comments

@ShyneTurtle
Copy link

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

@ShyneTurtle ShyneTurtle added the enhancement New feature or request label Jan 21, 2025
@SergioGasquez
Copy link
Member

In the meantime, can you build it from source?? cargo install espup

@ShyneTurtle
Copy link
Author

ShyneTurtle commented Jan 21, 2025

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 !

@ShyneTurtle
Copy link
Author

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

@SergioGasquez
Copy link
Member

Ahh right! Sorry I didn't think of this, we don't have Xtensa Rust binaries (generated in rust-build) for aarch64-windows.

@MabezDev
Copy link
Member

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

@ShyneTurtle
Copy link
Author

ShyneTurtle commented Jan 21, 2025

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

@MabezDev
Copy link
Member

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.

@ShyneTurtle
Copy link
Author

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)

@MabezDev
Copy link
Member

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.

@ShyneTurtle
Copy link
Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants