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

Wasm support #164

Closed
joreilly opened this issue Jul 5, 2023 · 7 comments · Fixed by #188
Closed

Wasm support #164

joreilly opened this issue Jul 5, 2023 · 7 comments · Fixed by #188

Comments

@joreilly
Copy link

joreilly commented Jul 5, 2023

Any plans to add Wasm support? cc @bashor

@fzhinkin
Copy link
Collaborator

@joreilly Sorry for the long reply.

I'm considering supporting Wasm target at some point.
It can not be enabled by just plunking extra target into build configs, and it requires additional effort, so I'd rather postpone the support for later.

Do you already have use cases for kotlinx-io in Wasm targeting projects? Could you please provide more details? Thanks!

@joreilly
Copy link
Author

Hi, thanks for the reply. I see this more as enabler for projects that start to use this library to support Wasm. For example I believe Apollo is evaluating its use. cc @martinbonnin

@martinbonnin
Copy link
Contributor

Indeed, we've had requests for Wasm already (issue).

@joreilly
Copy link
Author

btw you probably saw this already square/okio#1203

@fzhinkin
Copy link
Collaborator

@joreilly @martinbonnin thank you for the details! I'll investigate what needs to be done to support Wasm then.

@fzhinkin
Copy link
Collaborator

There is not so much to do in order to start building Wasm artifacts:

  • upgrade Kotlin to 1.9.0
  • solve issues w/ benchmarks module after updating to 1.9.0
  • enable Wasm target, provide stub implementations for some expects (and there will be no files support at all, ATM)

See: https://github.com/Kotlin/kotlinx-io/pull/188/files

But there is a bug https://youtrack.jetbrains.com/issue/KT-60212 affecting the project.
I implemented a workaround, but neither it looks good, nor I can assure that there will be no other related issues. So I'd rather wait until 1.9.20 and enable Wasm target then.

@fzhinkin fzhinkin linked a pull request Aug 23, 2023 that will close this issue
@fzhinkin
Copy link
Collaborator

Everything (except file systems) works fine after updating to 1.9.10.

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 a pull request may close this issue.

3 participants