Skip to content

[wasm] EmccExportedRuntimeMethod MSBuild item - #76455

Merged
pavelsavara merged 10 commits into
dotnet:mainfrom
pavelsavara:wasm_EmccExtraExportedRuntimeMethods
Oct 6, 2022
Merged

pavelsavara merged 10 commits into
dotnet:mainfrom
pavelsavara:wasm_EmccExtraExportedRuntimeMethods

Conversation

@pavelsavara

@pavelsavara pavelsavara commented Sep 30, 2022 •

Copy link
Copy Markdown
Member
  • add ability to extend EXPORTED_RUNTIME_METHODS via EmccExportedRuntimeMethod MSBuild item
  • add ability to extend EXPORTED_FUNCTIONS via EmccExportedFunction MSBuild item
  • add example to advanced sample

Fixes #76077

…dRuntimeMethods MSBuild property

- add example to advanced sample
@ghost

ghost commented Sep 30, 2022

Copy link
Copy Markdown

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

Issue Details
  • add ability to extend EXPORTED_RUNTIME_METHODS via EmccExtraExportedRuntimeMethods MSBuild property
  • add example to advanced sample

Fixes #76077

Author: pavelsavara
Assignees: pavelsavara
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@pavelsavara

Copy link
Copy Markdown
Member Author

@radekdoulik could you please have look at the version checks I did for EmccExportedFunction items ? Are they still necessary ?

@radical I duplicated it accross WasmApp.Native.targets and wasm.proj is the way how to re-use it ?

@pavelsavara
pavelsavara requested a review from maraf October 4, 2022 07:51
Comment thread src/mono/wasm/wasm.proj Resolved
Comment thread src/mono/wasm/wasm.proj Resolved
@pavelsavara
pavelsavara requested a review from radical October 4, 2022 10:56
@pavelsavara pavelsavara changed the title [wasm] EmccExtraExportedRuntimeMethods MSBuild property [wasm] EmccExportedRuntimeMethod MSBuild item Oct 4, 2022
@radekdoulik

Copy link
Copy Markdown
Member

@radekdoulik could you please have look at the version checks I did for EmccExportedFunction items ? Are they still necessary ?

I think we can remove these: _htons,_ntohs,__get_daylight,__get_timezone,__get_tzname for emscripten >= 3.1.12. (emscripten-core/emscripten#16118) I tried to remove them locally and the Microsoft.Extensions.HostFactoryResolver.Tests don't fail for me.

I would keep the malloc, memset and memalign in, as they are probably needed every time anyway.

_free was added by @jeromelaban, not sure what was the story there, but it is probably similar to the above memory related functions and should be always present anyway.

Not sure about stackSave,stackRestore,stackAlloc, these were added by you in 6019cda, so hopefully you would know.

@radekdoulik radekdoulik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The changes introducing EmccExportedFunction look good.

@pavelsavara

Copy link
Copy Markdown
Member Author

I think we can remove these: _htons,_ntohs,__get_daylight,__get_timezone,__get_tzname

Let's do that as separate PR

Not sure about stackSave,stackRestore,stackAlloc,

We use them for JS interop, they should stay

@jeromelaban

Copy link
Copy Markdown
Contributor

_free was added by @jeromelaban, not sure what was the story there, but it is probably similar to the above memory related functions and should be always present anyway.

Indeed, it's used by third-party packages when doing managed to JS interop.

Comment thread src/mono/wasm/wasm.proj Resolved
Comment thread src/mono/wasm/build/WasmApp.targets Resolved
Comment thread src/mono/wasm/wasm.proj Resolved

@radical radical left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@pavelsavara
pavelsavara merged commit 8eb4138 into dotnet:main Oct 6, 2022
@mattleibow

Copy link
Copy Markdown
Member

Exciting stuff here!

@pavelsavara

pavelsavara commented Oct 6, 2022 •

Copy link
Copy Markdown
Member Author

@mattleibow do you need this in .NET 7 ?

@mattleibow

Copy link
Copy Markdown
Member

I have a workaround using js for now.

@pavelsavara
pavelsavara deleted the wasm_EmccExtraExportedRuntimeMethods branch October 13, 2022 10:03
@ghost ghost locked as resolved and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WASM: GL object no longer accessible in .net 7 (Skiasharp)

6 participants