indexeddb icon indicating copy to clipboard operation
indexeddb copied to clipboard

Initial port for wasmJs

Open eygraber opened this issue 1 year ago • 9 comments

~~I'd like to supply a common interface, but at first glance that looks like it might be a lot more work. I started work on commonizing the interface. Tests are currently failing; I am working on that now.~~ Commonizing is done and tests are passing. This solution required having expect/actuals for primitives (so that js and wasmJs have a shared JsAny; see discussion here and elsewhere).

~~I'm trying to rework the API a bit so that none of that has to be exposed. Not sure if it is possible, but I'll give it a try.~~

It should be done now. There's still weirdness to support common code between js and wasmJs, but hopefully the API surface is a little better now, e.g. a lot of the type checking happen when you create a key instead of validating a key after it was created. There are still footguns available to the user, but they would be there anyways (e.g. unsafe casting).

It seems like there is partial support for null keys in js, but the spec seems to suggest that it shouldn't be allowed. I mirrored the null key support in wasmJs for now.

Fixes #157

eygraber avatar Aug 30 '24 05:08 eygraber