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

C# enable the runtime numbers test #718

Merged
merged 5 commits into from
Nov 10, 2023

Conversation

yowl
Copy link
Collaborator

@yowl yowl commented Oct 27, 2023

This PR enables the first runtime test for c#.
It compiles using dotnet 8 and NativeAOT-LLVM which unfortunately requires clang from emscripten as well as the WASI SDK (see WebAssembly/wasi-sdk#326). So we download and install emscripten as well as dotnet 8. Tha NativeAOT-LLVM compiler is only supported on windows so the yml has the windows build separated out.

Dotnet 8 is required as we are using static abstract interface methods. This shouldn't be a major issue as dotnet 8 is coming out in a few weeks.

Also moved some of the casting to the Instruction emit cases.

Added 2 new features, csharp-naot and csharp-mono which bring in csharp. csharp-mono has no implementation here for the runtime test.

@yowl yowl closed this Oct 29, 2023
@yowl yowl reopened this Oct 29, 2023
@yowl yowl closed this Oct 29, 2023
@yowl yowl reopened this Oct 29, 2023
add features for the 2 dotnet runtime flavours, naot and mono
@yowl yowl marked this pull request as ready for review November 1, 2023 02:53
.github/workflows/main.yml Outdated Show resolved Hide resolved
Comment on lines +127 to +129
if cfg!(windows) {
c_sharp.push(path);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: When mono is added we will want to still add this for the linux case? Since we aren't running the tests on linux right now, is this needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is the yml matrix in build.yml tries to run all the OSes and if it creates the c# files then it will fail to compile them. Agree we will have to revisit this for Mono, not sure about MacOS, but for Linux we will want it.

.github/workflows/main.yml Outdated Show resolved Hide resolved
tests/runtime/numbers/wasm.cs Outdated Show resolved Hide resolved
yowl and others added 4 commits November 10, 2023 19:34
Co-authored-by: James Sturtevant <jsturtevant@gmail.com>
Co-authored-by: James Sturtevant <jsturtevant@gmail.com>
@yowl yowl merged commit f30e6ac into bytecodealliance:main Nov 10, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants