Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wasm Support for kotlin-document-store #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ApoloApps
Copy link

@ApoloApps ApoloApps commented Jan 14, 2025

Basically copying js source set code and adapting it to WasmJs. Since dynamic is not available in WasmJs and Promise requires a type that extends JsAny, ive had to replace all Any's and Array's and String's in Promise scope to Wasm Js versions of them (JsArray, JsString,JsAny) while allowing nullability. Since Unit is not a valid JsAny, ive had to replace it with JsAny? since i think there is no other way.
Tested in my browser and it worked. Let me know if you want any changes! (ive tried putting all in a webmain source set but definedExternally, dynamic and needing the Js variants in Wasm, ive given up and let every source set have their own impls)
(i think tests hang with promise, so idk if remove them or not)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant