Valid Approachs for Dynamic C# in Blazor Standalone WASM #64790
Unanswered
SerratedSharp
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
App Domains, dynamically loading a DLL at runtime, Reflection.Emit, etc. ? I assume all of these are probably not supported.
I would like to support user defined C# mods/plugins in my Blazor Standalone WASM app. In other non-WASM contexts, I would usually have a config driven assembly loader and config driven DI registration, and common interfaces defined by my app and implemented by the plugin which would be used to hook my application's code to call the user provided customizations.
I've seen some WASM/WASI experiments for loading nested hosts, but at a glance seems tedious to implement this type of interop layer and costly performance wise. It's a little unnatural to shape these interfaces into a WASI compatible API when there's more straightforward ways to do this natively in C#/.NET. But I'm happy to hear suggestions if there's something that anyone is familiar with that is closer to practical than experimental.
I'm not super concerned with sandboxing/security, as these will be user defined plugins, and running only client side won't have any special access the default client wouldn't otherwise have.
Beta Was this translation helpful? Give feedback.
All reactions