dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.26k stars 4.73k forks source link

[browser] Improvements for native library linking #94187

Open maraf opened 1 year ago

maraf commented 1 year ago
ghost commented 1 year ago

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

Issue Details
- [ ] **Missing blittable types** - Enum - It should already work https://github.com/dotnet/runtime/blob/7420ee78b7fc63bcefbbd82b0a382599302c99b4/src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs#L396-L399 - Structures - Function pointers (blocked on S.R version due to MSBuild), - ❓Should we allow to manually pass additiona signatures we can't parse? - 💡Rewrite generator to S.R.M - [ ] **Frozen emscripten cache** - If `EmccExtraLDFlags` includes `-sUSE_SDL=2`, like `-lSDL -sUSE_SDL=2`, build fails - @radekdoulik suggested to remove frozen when WasmCachePath is set - https://github.com/dotnet/runtime/issues/83281#issuecomment-1651560470 - Seems like an emsdk bug with frozen cache and additional libraries - https://github.com/emscripten-core/emscripten/issues/19198 - [ ] **Uno's `WasmShellAdditionalPInvokeLibrary`** - Matches our internal `_WasmPInvokeModules` - We compute the list from `NativeFileReference` - ❓Should we make the MSBuild item public? - [ ] **Managed2Native static local function - invalid trampoline name**
Author: maraf
Assignees: -
Labels: `arch-wasm`, `area-Build-mono`, `os-browser`
Milestone: 9.0.0
maraf commented 1 year ago

cc @Perksey

Perksey commented 1 year ago

Many thanks for opening ❤️

Yep, enum blittability was fixed and didn't encounter any issues here beyond attempt 1, just wasn't in the first time we tried it.

maraf commented 1 year ago

@Perksey Thank you for great feedback in your article https://perksey.com/blog/blazor-silkdotnet.html

lewing commented 3 months ago

@kg can you update the tracking on this?

kg commented 3 months ago

Should be up to date now based on the work I did. It's possible other stuff works too.