-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support directly to wasm4 #1
Comments
Thanks for digging into this! Very exciting 😄 Instead of building llvm, would it be possible to use |
@aduros Yes, that works. E.g. I used Windows Subsystem for Linux (MinGW might also work), and
Probably some of these options can be removed, the @tjpalmer Yes, you need to build NativeAOT-LLVM unfortunately. In particular as of today there are 2 barriers to entry here.
|
Thanks for the info! Out of curiosity, do string literals work in no runtime mode? If not, do char arrays work? |
Meanwhile, I'm thinking a dockerfile might be best for figuring out how to make this work and for helping others run it. |
The problem with string literals is that in C# they are unicode (UTF16), so if you want to pass that to |
Sort of like this
But that is doing one at a time. |
Glad to hear it might work at all, though. Thanks for the info. (Edit: My main concern was that string literals might not work without string objects and that those might not work without runtime support. But apparently they can. I still haven't gotten that far in setting things up, so I was just asking in advance.) |
I started trying to work a dockerfile for this. Looks like I forgot to push my latest changes, though, and I'm on a different system at the moment. When I run I'll try looking into it more later. |
Ah yes, the Linux build has rotted since the compiler moved repos . It used to work so shouldn't be hard to get it going . I'll have a look later.
…--
Scott
________________________________
From: Tom ***@***.***>
Sent: Thursday, December 23, 2021 7:41:58 AM
To: yowl/csharp-wasm4 ***@***.***>
Cc: Scott Waye ***@***.***>; Comment ***@***.***>
Subject: Re: [yowl/csharp-wasm4] Add support directly to wasm4 (Issue #1)
I started trying to work a dockerfile for this<https://github.com/tjpalmer/wasm4-docker/blob/dotnet/cs/Containerfile>.
Looks like I forgot to push my latest changes, though, and I'm on a different system at the moment. When I run build.sh in the runtimelab, it grabs dotnet all over again, so I commented out the first round. But the build failed after some while, and I didn't have time to look into it. I might should install clang first, but I'm not sure if that was the issue.
I'll try looking into it more later.
—
Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAUYCKJQLBOB5DSYHX5PRVLUSMKJNANCNFSM5KSSIWJA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID: ***@***.***>
|
In case it matters, this is where it dies:
|
And I don't have python on it yet. Maybe should do that first. |
After adding clang, cmake, make, and python3, it now works until this happens:
|
Ok, sounds good. There are some docker images for building the runtime with all the prerequisites but looks like you've got past that, https://github.com/dotnet/runtimelab/blob/feature/NativeAOT-LLVM/docs/workflow/requirements/linux-requirements.md Failing in gen-buildsys.sh sounds about right. I'm away for a few days and my SSD destroyed the OS, so I've been a bit behind. NativeAOT-LLVM used to be part of CoreRT where the Linux build was working so there might be some clues in https://github.com/dotnet/corert/blob/master/src/Native/gen-buildsys-clang.sh if you fancy it . Otherwise I'll look when I get back, |
We have wide variants of all functions that take strings, eg: |
@aduros Thanks, I'll get that in the sample |
Thanks much for working on this! Do you also have a dockerfile by chance? As an aside, I'm likely to switch base distro from Alpine to Ubuntu or something because wasi-sdk binaries seem to have trouble on Alpine. |
The Windows packages are now being built, not much help for the Linux side, and we still need the lib PR merged for it to be useful for wasm4. https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet-experimental I'm using Ubuntu under WSL to try to get it building, but I've never created a docker file. Not sure whats involved there, would need to read up on it. |
I'm using podman (rather than docker) on linux. I'm not sure what's required for setup on windows. My command on linux is to go into the dir with the containerfile and run:
|
That's building the image, not using it, but if that doesn't end in error, that's still progress. |
The windows packages are now available at https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet-experimental These contain the compiler that can build the library as required by wasm4. Unfortunately, although I spent some time trying to get the Linux build going, I've not succeeded and I'm unlikely to make much progress on it before the game jam. |
Thanks much for working on this. I'm unlikely to work at it before the jam either. Maybe next time. And it'd be nice if they just get this feature set into main .net at some point. |
Here's the issue there that I made for this. This is just to point back that way.
Also, do I need this separately for building? https://github.com/dotnet/runtimelab/tree/feature/NativeAOT-LLVM
The text was updated successfully, but these errors were encountered: