Skip to content

Conversation

radekdoulik
Copy link
Member

@radekdoulik radekdoulik commented Jan 12, 2022

Context: #64232

Add 2 simple WebAssembly templates, wasmbrowser and wasmconsole.

The templates are packed into the nuget package, which is added to the wasm-tools workload manifest. When the workload is installed, the templates can be used with dotnet new command.

Add build tests to exercise the use of the templates - create, build and publish browser and console projects.

@ghost
Copy link

ghost commented Jan 12, 2022

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

@ghost ghost assigned radekdoulik Jan 12, 2022
@radekdoulik radekdoulik marked this pull request as ready for review January 24, 2022 22:25
@pavelsavara
Copy link
Member

Maybe we should start with CommonJS version for the console, until we resolve #62740
It would get rid of those TODOs

Console.WriteLine ("Hello, Console!");

public class MyClass {
[MethodImpl(MethodImplOptions.NoInlining)]
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this NoInlining ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess its purpose is to avoid inlining the method during AOT. Not sure whether anything changed recently in that area though. @lewing, do you know if we need it?

@marek-safar
Copy link
Contributor

Can you add documentation about how is this supposed to be used ?

@radekdoulik
Copy link
Member Author

Can you add documentation about how is this supposed to be used ?

I can add section to the src/mono/wasm/README.md about it. Or do you have some other place in mind?

@marek-safar
Copy link
Contributor

I can add section to the src/mono/wasm/README.md about it

Sounds like good start. It might be worth also adding something to the nuget itself

Also

 * add README with hint how to run the app
 * use top level statement to be consistent with browser template
@radekdoulik radekdoulik merged commit c091dc3 into dotnet:main Jan 31, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants