Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[wasmJs] Enable wasmJs target #5531

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

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

IlyaGulya
Copy link
Contributor

Enable wasmJs target

This PR adds support for the WebAssembly JavaScript (wasmJs) target in SQLDelight.

Changes

Build Configuration

  • Added wasmJs() target alongside existing js() target in multiplatform conventions
  • Applied default KMP hierarchy template.
  • Added a jsCommon group that contains both JS and WasmJS targets

Source Reorganization

  • Moved CurrentThreadId.kt in :runtime from jsMain to jsCommonMain to share between JS and WasmJS
  • Commonized Closeable.kt from jsMain and nativeMain into jsNativeCommonMain to share between JS, WasmJS, and Native targets.

@IlyaGulya IlyaGulya mentioned this pull request Oct 29, 2024
Copy link
Collaborator

@dellisd dellisd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of naming suggestions (and some files will need to be moved), but otherwise this looks good. Thank you!

moduleKind.set(JsModuleKind.MODULE_UMD)
}
}

applyDefaultHierarchyTemplate {
common {
group("jsCommon") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
group("jsCommon") {
group("web") {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -16,6 +16,16 @@ apiValidation {
}

kotlin {
applyDefaultHierarchyTemplate {
it.common {
it.group("jsNativeCommon") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it.group("jsNativeCommon") {
it.group("nonJvm") {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@IlyaGulya IlyaGulya force-pushed the feature/enable-wasmjs branch from 938bfa7 to 6713b83 Compare October 29, 2024 19:23
@dellisd dellisd merged commit 4d8283e into sqldelight:master Oct 29, 2024
12 checks passed
@IlyaGulya IlyaGulya deleted the feature/enable-wasmjs branch October 30, 2024 06:51
@skaldebane
Copy link

Great to see this land! Amazing work Ilya.

When can we expect a release with the Wasm support?

@IlyaGulya
Copy link
Contributor Author

@skaldebane this is only 1st PR of 3 🙂

@Thomas-Vos
Copy link

Is there a snapshot available with this merged PR? I cannot find the latest snapshots anywhere.

@IlyaGulya
Copy link
Contributor Author

IlyaGulya commented Dec 5, 2024

@Thomas-Vos here's a snapshot by @ahna92 in my another PR but you will need PAT to access it #5534 (comment)

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

Successfully merging this pull request may close these issues.

4 participants