Verifiable icon indicating copy to clipboard operation
Verifiable copied to clipboard

Consider WASM as a compilation target (not only Blazor)

Open veikkoeeva opened this issue 2 years ago • 2 comments

  • Non-browser targers: WASI via https://github.com/stevesandersonms/dotnet-wasi-sdk for non-browser targets (targeting browser via this may need something like https://www.npmjs.com/package/@wasmer/wasi).

  • Browser targets without Blazor https://github.com/dotnet/runtimelab/blob/feature/NativeAOT-LLVM/docs/using-nativeaot/compiling.md#webassembly or maybe https://github.com/unoplatform/Uno.Wasm.Bootstrap.

  • Blazor.

Here Blazor and WASM without Blazor are more important than WASI.

Some other notes

WebCrypto could mean using RSA (or ECDSA). In this case keyAgreement could mean https://datatracker.ietf.org/doc/html/rfc6101#section-6.1.1.

It may be https://w3c.github.io/webappsec/admin/webappsec-charter-2021.html will define Ed25519 (and X25519) support and browsers implement it quickly. It also appears LibSodium can be compiled to WASM.

Explicit notes:

  • There should be possibility, maybe even dynamically selective, to choose either platform or library provided libraries to be used. One scenario: easy testing on some actual platform.
  • Adequate testing of WASM and when using platform specific cryptograhic implementations.

See also publishing wasm files, e.g. at https://dev.to/azure/exploring-net-webassembly-with-wasi-and-wasmtime-41l5.

veikkoeeva avatar Apr 10 '22 19:04 veikkoeeva

Newest instructions to compile to browser and non-browser WASM are at https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-7-rc-1/.

veikkoeeva avatar Sep 14 '22 19:09 veikkoeeva

A blog post regarding the feature included in .NET 7: https://devblogs.microsoft.com/dotnet/dotnet-7-wasm/.

veikkoeeva avatar Sep 26 '22 19:09 veikkoeeva