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 wasm variants in NuGet packages #76959

Closed
Tracked by #68162
lambdageek opened this issue Oct 12, 2022 · 6 comments
Closed
Tracked by #68162

Support wasm variants in NuGet packages #76959

lambdageek opened this issue Oct 12, 2022 · 6 comments
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono
Milestone

Comments

@lambdageek
Copy link
Member

lambdageek commented Oct 12, 2022

We need some way for NuGet package authors to provide single threaded and multi-threaded versions of native assets.

Additionally, library authors should be able to identify whether they are in a single- or multi-threaded app.
(For example consider making System.Threading.Thread.IsThreadStartSupported a public property (and also linker-friendly))

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 12, 2022
@lambdageek lambdageek added arch-wasm WebAssembly architecture area-VM-threading-mono and removed untriaged New issue has not been triaged by the area owner labels Oct 12, 2022
@ghost
Copy link

ghost commented Oct 12, 2022

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

Issue Details

We need some way for NuGet package authors to provide single threaded and multi-threaded versions of native assets.

Additionally, library authors should be able to identify whether they are in a single- or multi-threaded app.
(For example consider making System.Threading.Thread.IsThreadStartSupported a public property (and also linker-friendly))

Author: lambdageek
Assignees: -
Labels:

arch-wasm, untriaged, area-Threading-mono

Milestone: -

@lambdageek lambdageek added this to the 8.0.0 milestone Oct 12, 2022
@lambdageek
Copy link
Member Author

@lewing @richlander This probably needs to be part of a broader discussion than just the runtime

@lewing
Copy link
Member

lewing commented Oct 15, 2022

yes

cc @jeromelaban

@jeromelaban
Copy link
Contributor

jeromelaban commented Oct 15, 2022

Thanks Larry! Indeed, this is needed. For native assets, here's what we've been using with Uno to address that problem (along with the emscripten version number, for backward compatibility). SkiaSharp is already built this way, in the build folder of the package (mono/SkiaSharp#2286 is coming to support multi-threading).

For a moment, Wasm exceptions support was considered a variant, but since it is supported by all major browsers, that leaves simd and threading for now.

As for capabilities detection, it's for now available as part of an environment variable for threading, yet it's a quite weak API at this point.

This issue should also be linked to another issue about startup time features detection. This is to include multiple builds of the same payload with different variants, based on browser capabilities, considering there's no current way (as far as I can see) to make fined-grained feature switching at IL level, or runtime level.

@lambdageek
Copy link
Member Author

Related #77541

@lewing lewing closed this as completed Jul 22, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono
Projects
None yet
Development

No branches or pull requests

3 participants