SteveSandersonMS/dotnet-wasi-sdk

Is it possible to selectively export classes or static methods in the built .wasm file that can be invoked directly?

justingaffney opened this issue · 2 comments

I'd like to be able to build a .wasm file from a class library without an entrypoint and expose certain classes or static methods that can be invoked with arguments, to then potentially use in the browser or other environments.

Is this currently possible? If not can arguments be passed into the Main method as a potential alternative?

+1

I'd love to be able to write plugins/ extensions for a server (or any application) in C#, and compile them to WASM and then call into them at runtime

Agreed, we should make this straightforwards to do. I think #30 will cover this.