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

Add WASI sample #10

Open
yamachu opened this issue Sep 20, 2022 · 1 comment
Open

Add WASI sample #10

yamachu opened this issue Sep 20, 2022 · 1 comment

Comments

@yamachu
Copy link
Owner

yamachu commented Sep 20, 2022

No description provided.

@yamachu
Copy link
Owner Author

yamachu commented Sep 20, 2022

Currently the following code crashes.

Console.WriteLine($"Hello from .NET at {DateTime.Now.ToLongTimeString()}");
Console.WriteLine(await Task.FromResult(0).ContinueWith(v => v.Result, TaskScheduler.Default).ConfigureAwait(false));

and logs

Hello from .NET at 18:10:10
[wasm_trace_logger] cant resolve internal call to "System.Threading.ThreadPool::QueueCallback" (tested without signature also)

Your mono runtime and class libraries are out of sync.
The out of sync library is: /WasiConsoleApp/bin/Debug/net7.0/runtime/native/System.Private.CoreLib.dll

When you update one from git you need to update, compile and install
the other too.
Do not report this as a bug unless you're sure you have updated correctly:
you probably have a broken mono install.
If you see other errors or faults after this message they are probably related
and you need to fix your mono install first.

Task and threads does not seem to be supported now.

dotnet/runtime#65895

  • Support .NET threads on threading-enabled wasm runtimes. This includes updating the synthetic-pthread.c code to support having separate pthread keys for each thread instead of a single global list.

https://github.com/yamachu/dotnet-wasi-sdk/tree/use-v7.0.0-rc1

It does not change even if rc1 is used.

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

No branches or pull requests

1 participant