Lamberto Basti
12/22/2024, 5:57 PMMichael Paus
12/22/2024, 6:27 PMLamberto Basti
12/22/2024, 6:46 PMMichael Paus
12/23/2024, 9:26 AMwasmJs target but not wasmWasi.Lamberto Basti
12/23/2024, 9:29 AMMichael Paus
12/23/2024, 9:31 AMwasmWasi inside any browser.Lamberto Basti
12/23/2024, 5:16 PMwasmJs with wasmWasi and wasm() with wasmJs.
So, here my findings:
• wasmWasi is for non browser runtimes and as such IndexedDB is not available. It would be possible to compile LevelDB for wasmWasi using Make, but that would require me a lot of time, and I do not see the need for that.
• Kotlin/Native wasmJs target can use window APIs (IndexedDB as well) and it can also use JS libraries. Unfortunately, JS symbols such as Promise and Any are different between source sets jsMain and wasmJsMain, making the use of expects and actuals not possible for basic usage. It would require a copy paste of all symbols and adjustments, duplicating future maintenance in the codebase.
Because of the points above, for now I will not provide any DataStore implementation for any wasm target for now.