supabase-kt icon indicating copy to clipboard operation
supabase-kt copied to clipboard

Add support for WASM-JS and migrate to Ktor 3.0.0

Open jan-tennert opened this issue 1 year ago • 6 comments

What kind of change does this PR introduce?

Feature (closes #86)

What is the current behavior?

N/A

What is the new behavior?

New wasm-js target for supabase-kt

Supported modules:

  • [x] supabase-kt
  • [x] gotrue-kt
  • [x] storage-kt
  • [x] functions-kt
  • [x] postgrest-kt
  • [x] realtime-kt
  • [x] compose-auth
  • [x] compose-auth-ui
  • [x] apollo-graphql

Note: I'll probably add wasm-js to supported samples once this is merged.

Additional context

The implementation should be almost the same as the js browser implementation. wasm-wasi support may also come if the libraries support it. Latest compatible build: 2.4.2-wasm0 Note: A pre-release version for Ktor is used, waiting for a full release to merge this PR.

jan-tennert avatar Oct 13 '23 11:10 jan-tennert

Putting this on hold until official KotlinX versions release.

jan-tennert avatar Oct 21 '23 11:10 jan-tennert

KotlinX Serialization, Coroutines and atomicfu now have official support, ktor and ~coroutines~ to go 👍

jan-tennert avatar Nov 15 '23 18:11 jan-tennert

ktor has an experimental wasm2 build available here: https://youtrack.jetbrains.com/issue/KTOR-5587/Ktor-client-for-Kotlin-Wasm#focus=Comments-27-8670434.0-0

mikepenz avatar Dec 27 '23 08:12 mikepenz

ktor has an experimental wasm2 build available here: https://youtrack.jetbrains.com/issue/KTOR-5587/Ktor-client-for-Kotlin-Wasm#focus=Comments-27-8670434.0-0

I know, the only problem is that these builds do not support some Kotlin targets required for this project. I might publish separate wasm builds until the official release.

jan-tennert avatar Dec 27 '23 11:12 jan-tennert

ktor has an experimental wasm2 build available here: https://youtrack.jetbrains.com/issue/KTOR-5587/Ktor-client-for-Kotlin-Wasm#focus=Comments-27-8670434.0-0

I know, the only problem is that these builds do not support some Kotlin targets required for this project. I might publish separate wasm builds until the official release.

Update: Published a compatible build 2.0.2-wasm0

jan-tennert avatar Dec 28 '23 13:12 jan-tennert

Thank you very much!

mikepenz avatar Dec 28 '23 15:12 mikepenz

I'll definitely squash that PR.

jan-tennert avatar Sep 10 '24 16:09 jan-tennert