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

Support Windows on ARM64 #2985

Open
Alovchin91 opened this issue Oct 17, 2020 · 5 comments
Open

Support Windows on ARM64 #2985

Alovchin91 opened this issue Oct 17, 2020 · 5 comments
Assignees
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@Alovchin91
Copy link

Alovchin91 commented Oct 17, 2020

Is your feature request related to a problem? Please describe.
Rust has recently promoted Windows on ARM64 (aarch64-pc-windows-msvc) platform to Tier 2 Development Platform.
Since tokio is one of the most essential crates in Rust ecosystem, it's important that it supports Windows on ARM64 as a target platform. Right now however it's not possible to compile tokio for aarch64-pc-windows-msvc target.
Unfortunately this means that I currently cannot build many Rust projects natively for my Surface Pro X.

Describe the solution you'd like
The reason seems to be a single crate in mio's dependency tree: ntapi. I've managed to implement the missing support (which seems to be very straightforward) and open a Pull Request to that project. After that, I've managed to build tokio without problem and run all the tests. After a second run all tests succeeded (on the first run one timer test failed but the machine was under heavy load atm).
Shall the Pull Request be merged, no actions should be required. I would like to track the progress in this issue however so I could help keep tokio tested for Windows on ARM64, and to keep the discussion open shall the Pull Request not be merged or other issues arise.

Describe alternatives you've considered
-

Additional context
-

@Alovchin91 Alovchin91 added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Oct 17, 2020
@Darksonn
Copy link
Contributor

Once our dependencies support the platform, it would be nice to add the platform to our CI setup, if possible.

@Alovchin91
Copy link
Author

The mentioned Pull Request has been merged!

Now I can build tokio from master for Windows on ARM64 without any patches 👍

@Darksonn How complicated would it be to add the platform to the CI? I think it has to be cross-compilation for now, since there are no Windows on ARM runners anywhere yet.

@Alovchin91
Copy link
Author

Alovchin91 commented Oct 23, 2020

Also, I keep seeing the test no_out_of_bounds_close_to_max fail from time to time:

thread 'no_out_of_bounds_close_to_max' panicked at 'timer error: timer duration exceeds maximum duration', tokio\src\time\sleep.rs:130:23

I think I've found some pattern here. The test seems to fail every time cargo has to download some dependencies. When all the dependencies are up to date, the test succeeds.

Please see the attached log file for the detailed tests run.

Does it make sense to open a separate issue for this flaky test?

tokio_aarch64_build.log

@Darksonn
Copy link
Contributor

Yes, open an issue about it. As for CI, if there's no runner, we will have to make do with just compiling it. We already have some of that:

cross:
name: cross
runs-on: ubuntu-latest
strategy:
matrix:
target:
- i686-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- mips-unknown-linux-gnu
- arm-linux-androideabi
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: check
args: --workspace --target ${{ matrix.target }}

@carllerche carllerche added the E-help-wanted Call for participation: Help is requested to fix this issue. label Nov 12, 2020
@Alovchin91
Copy link
Author

Just run all the tests on Tokio v1.0.0 and didn't see the issue with the test anymore 👍

I'm gonna see if I can add Windows aarch64 cross build to ci.yml now. It's a shame there are no arm64 Windows builders, but hey, v1.0.0 works! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants