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

WASM Toolchain Support for ARM64 #80955

Conversation

RedstoneWizard08
Copy link

@RedstoneWizard08 RedstoneWizard08 commented Jan 20, 2023

Currently, the WASM toolchains do not support linux arm64 (aarch64), so I decided to implement this.
This is WIP! Please don't merge until I'm done!

Why is this happening?
If I try running sudo dotnet workload install wasm-tools, this happens:

┌──([redacted]@remote)-[~/dotnet-dev/runtime]
└─$ sudo dotnet workload install wasm-tools

Welcome to .NET 7.0!
---------------------
SDK Version: 7.0.102

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Workload ID wasm-tools isn't supported on this platform.
┌──([redacted]@remote)-[~/dotnet-dev/runtime]
└─$ 

This also doesn't work with other WASM toolchains. My goal is to allow this to work by implementing the libraries and configurations.

  • Begin the patch.
  • Do more patching (inevitable).
  • Fix about 100 million bugs.
  • Finish the patch.
  • Get it to jankily compile.
  • Get it to compile.
  • Get it to reliably compile.
  • Get NuGet packages to work.
  • Run tests.
  • Run example projects.
  • Improve stability.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jan 20, 2023
@dnfadmin
Copy link

dnfadmin commented Jan 20, 2023

CLA assistant check
All CLA requirements met.

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Jan 20, 2023

Tagging subscribers to this area: @dotnet/area-system-reflection-metadata
See info in area-owners.md if you want to be subscribed.

Issue Details

Currently, the WASM toolchains do not support linux arm64 (aarch64), so I decided to implement this.
This is WIP! Please don't merge until I'm done!

Why is this happening?
If I try running sudo dotnet workload install wasm-tools, this happens:

┌──([redacted]@remote)-[~/dotnet-dev/runtime]
└─$ sudo dotnet workload install wasm-tools

Welcome to .NET 7.0!
---------------------
SDK Version: 7.0.102

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Workload ID wasm-tools isn't supported on this platform.
┌──([redacted]@remote)-[~/dotnet-dev/runtime]
└─$ 

This also doesn't work with other WASM toolchains. My goal is to allow this to work by implementing the libraries and configurations.

[x] Begin the patch.
[x] Get it to jankily compile.
[ ] Get it to compile.
[ ] Get it to reliably compile.
[ ] Run tests.
[ ] Run example projects.
[ ] Improve stability.

Author: RedstoneWizard08
Assignees: -
Labels:

area-System.Reflection.Metadata, new-api-needs-documentation, community-contribution

Milestone: -

@lewing lewing added the arch-wasm WebAssembly architecture label Jan 20, 2023
@ghost
Copy link

ghost commented Jan 20, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Currently, the WASM toolchains do not support linux arm64 (aarch64), so I decided to implement this.
This is WIP! Please don't merge until I'm done!

Why is this happening?
If I try running sudo dotnet workload install wasm-tools, this happens:

┌──([redacted]@remote)-[~/dotnet-dev/runtime]
└─$ sudo dotnet workload install wasm-tools

Welcome to .NET 7.0!
---------------------
SDK Version: 7.0.102

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Workload ID wasm-tools isn't supported on this platform.
┌──([redacted]@remote)-[~/dotnet-dev/runtime]
└─$ 

This also doesn't work with other WASM toolchains. My goal is to allow this to work by implementing the libraries and configurations.

  • Begin the patch.
  • Do more patching (inevitable).
  • Fix about 100 million bugs.
  • Finish the patch.
  • Get it to jankily compile.
  • Get it to compile.
  • Get it to reliably compile.
  • Get NuGet packages to work.
  • Run tests.
  • Run example projects.
  • Improve stability.
Author: RedstoneWizard08
Assignees: -
Labels:

arch-wasm, area-System.Reflection.Metadata, new-api-needs-documentation, community-contribution

Milestone: -

@RedstoneWizard08
Copy link
Author

@lewing (I chose you because it said it pinged you for this PR) Would it be possible to tell the pipeline check to run the setup-emscripten.sh script when it runs? Hopefully it will allow it to compile correctly for arm, since it's the only way I could get it to work on my end. The ideal command line would be: source setup-emscripten.sh -c.

@marek-safar
Copy link
Contributor

It's better to target main branch for the work from the start

@RedstoneWizard08
Copy link
Author

It's better to target main branch for the work from the start

Alright, sorry, I just did this because I originally worked from the release/7.0 branch.

@lewing
Copy link
Member

lewing commented Jan 30, 2023

@RedstoneWizard08 sorry I thought I had replied to this but I must have not actually finished my comment. Thank you for starting the work, as @marek-safar mentioned the right place to do this is in main and it should actually be easier to do there. @directhex has already created a osx-arm64 build there and I believe mentioned that linux-arm64 would not be difficult to add as well (I'll let him follow up). To enable the full set of tooling we will also need to create arm64 workload packages in dotnet/emsdk. I'm happy to go into more detail if you are interested in continuing to work on it.

@RedstoneWizard08
Copy link
Author

@lewing I am very interested on working on this, and I do know that emscripten and the emsdk are very easy to set up on arm64 linux (I've done it many times), so I don't think it will be very hard.

@carlossanlop carlossanlop added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Feb 8, 2023
@carlossanlop
Copy link
Member

This is still marked as no-merge. Friendly reminder that the servicing branches open today.

@carlossanlop
Copy link
Member

I'm retargeting this PR to the new release/7.0-staging branch, which is the one that we will use from now on for servicing fixes.

Repo maintainers will now be allowed to merge their own servicing PR as long as it meets the requirements:

  • It is appoved by Tactics (signaled by adding the Servicing-approved label).
  • It's signed-off by an area owner.
  • The CI is green, or the failures are investigated as unrelated.
  • And if the PR touches an OOB package, the necessary OOB authoring changes are added.

The new process is described here: runtime/docs/project/library-servicing.md.

The infra team will be actively monitoring servicing PRs to ensure all requirements are met and to help with any issues.

Let me know if you have any questions.

@carlossanlop carlossanlop changed the base branch from release/7.0 to release/7.0-staging March 28, 2023 20:55
@ghost ghost closed this Apr 27, 2023
@ghost
Copy link

ghost commented Apr 27, 2023

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2023
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono community-contribution Indicates that the PR has been added by a community member new-api-needs-documentation NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants