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

Support WASM #275

Merged
merged 5 commits into from
Dec 15, 2023
Merged

Support WASM #275

merged 5 commits into from
Dec 15, 2023

Conversation

drewhamilton
Copy link
Owner

Closes #235.

Adds the wasmJs target to the :poko-annotations and :poko-tests projects.

Adds explicit irImplicitCast calls after irIs checks to avoid compile errors: the WASM target doesn't generate these automatically like other targets do. I posted a public Slack message about it here.

The WASM target currently requires a canary Node.js version. I'm unclear on the implications of shipping with this, will follow up in this PR's comments.

build.gradle.kts Outdated
@@ -11,6 +14,17 @@ plugins {
alias(libs.plugins.ksp) apply false
}

plugins.withType<NodeJsRootPlugin> {
extensions.getByType<NodeJsRootExtension>().apply {
nodeVersion = "22.0.0-v8-canary202312089dd1cd78d4"
Copy link
Owner Author

Choose a reason for hiding this comment

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

Does this affect published artifacts, or only the test runtime? I tried to find a way to apply the canary version only to the wasmJs targets, to avoid affecting the js targets, but that doesn't seem to be possible.

If it affects published artifacts, it may not be a good idea to merge this right now...

Copy link
Owner Author

Choose a reason for hiding this comment

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

Updated to a v21 canary version, but the same question applies.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's only for local testing. Doesn't make it into anything published.

JakeWharton and others added 5 commits December 14, 2023 15:54

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
A canary version is needed until nodejs/node#50115 lands.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
The compiler was automatically generating these implicit casts for other targets, but not for WASM.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
WASM requires a canary Node.js version. This is the last v21 canary, and has both darwin-arm64 and darwin-x64 artifacts.
@drewhamilton
Copy link
Owner Author

Adds explicit irImplicitCast calls after irIs checks to avoid compile errors: the WASM target doesn't generate these automatically like other targets do. I posted a public Slack message about it here.

From the linked Slack thread—turns out I should have included the irImplicitCast calls all along; I was just getting lucky that it worked before.

@drewhamilton drewhamilton merged commit 942d194 into main Dec 15, 2023
@drewhamilton drewhamilton deleted the drew/wasm branch December 15, 2023 17:42
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.

WASM support
2 participants