Defining standards and SDKs via practical application #229
Replies: 1 comment
-
Conversation archived from 8/19/2022 https://discord.com/channels/372137812037730304/547159933838163969/1010053785202208840 kermit the pog Arlo kermit the pog Arlo kermit the pog Arlo kermit the pog Arlo kermit the pog Arlo kermit the pog Arlo kermit the pog Arlo |
Beta Was this translation helpful? Give feedback.
-
WASM allows us to run code natively, locally, in any language, using a downloadable payload file. As soon as we found that out, it upended our plans for any RPC or HTTP API.
These conversations have happened largely on Discord, so I'm archiving our musings here as notes.
As we define these better, this will be updated with more substance and less notes. Chat archives will be collapsed.
Discussion points and open questions (please read conversation below):
08/02/2022 https://discord.com/channels/372137812037730304/547159933838163969/1004237169591857243
If I understand things correctly:
Maybe this could enable cross-platform and cross-language plugins and cores. My original plan for Cores involved compiling them, Process.Start, and stdin/out, but this is much better and could let plugins run natively in the browser, or in other languages if there's a Strix SDK available.
Except the wasmtime .NET nuget package needs .NET 6 or higher, meaning we'd need to use WinAppSDK or WebView2's WASM.
08/03/2022 https://discord.com/channels/372137812037730304/547159933838163969/1004462158450540584
The only downside is that I might need to re-implement the SDK in Rust, or something good at creating WASM. dotnet just compiles the entire .NET runtime and it makes massive binaries.
08/03/2022 https://discord.com/channels/372137812037730304/547159933838163969/1004497025741635656
Anyway, even if WinRT works in other places, it isn't the best solution for what Strix is trying to do
The barrier to entry for implementors and consumers is too high
Plus we really want this to function in the browser, as well as other languages
If someone wants to write a Strix Music Core in C++, Go, Rust, JS, etc., and consume it in anywhere, then WASM/WASI looks like our best option.
We're going to continue focusing on the .NET version of the Strix Music SDK for now, let WinAppSDK, WASI and WASM continue to grow and evolve a bit more, and probably drum up a prototype some time next year.
If the binary size if small enough, we could potentially reuse all existing Cores written in .NET in other languages
08/13/2022 https://discord.com/channels/372137812037730304/547159933838163969/1008079317768622140
Version management isn't done by the SDK, it's up to the consuming application to set that up
In order to make Wasi/Wasm happen on any language, we need to create bindings into WASM.
Those bindings are static methods iiuc, so managing instances needs to be done manually. It'll need a translation layer made of 2 parts - 1 that wraps around a normal core / plugin (any language) and provides static methods in WASM the consumer can call, and 1 in your SDK (any language) that wraps bindings around the binary and turns it back into normal core / plugin instances, in whatever language you're using.
That's the minimum we need to do for x-lang support.
This is more of an ecosystem concern. If people are using Nuget to publish actual binaries, then it might work in .NET using NuGet.Packaging, but it probably won't in other languages.
I think I would rather have people submit an IPNS address of their plugin (so they can update with new versions) and create an IPNS containing the other IPNS addresses.
A plugin gallery on IPFS, where a single address can get you a curated list of plugins, if you trust the source.
That would allow any Strix SDK implementation in any language to consume a plugin created in any other language. Anyone can create a plugin gallery, and nobody has to pay for hosting fees because it's all on IPFS.
08/18/2022 https://discord.com/channels/372137812037730304/547159933838163969/1010046006823493673
I bet it wouldn't be too hard to prototype this, once you figure out how to do WASM bindings...
We can already compile .NET to WASM, we could compile a Core and run it in another language.
CoreModels really are the bones of the Strix Music Standard, aren't they :hmm:
We'll want to get the standard well defined before we even attempt to go x-lang, and I'm not convinced that merging should be part of it.
But I think we need to keep stress testing the .NET SDK and make a ton of cores before we do that, too
Beta Was this translation helpful? Give feedback.
All reactions