Skip to content

Conversation

@andreaTP
Copy link

Description

This changes the build to wasm to be targeting wasm-unknown the most "platform agnostic" compilation target.

I attempted to quickly test the result in open-feature/java-sdk-contrib but one test seems to be looping, I haven't narrowed down the root cause yet.

Closes issue(s)

Resolve #

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /website/docs)
  • I have followed the contributing guide

@netlify
Copy link

netlify bot commented Nov 25, 2025

Deploy Preview for go-feature-flag-doc-preview ready!

Name Link
🔨 Latest commit a57e5a1
🔍 Latest deploy log https://app.netlify.com/projects/go-feature-flag-doc-preview/deploys/6925981f21a1c7000834fe43
😎 Deploy Preview https://deploy-preview-4366--go-feature-flag-doc-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link

}


// alloc/free implementation for wasm-unknown target from:
Copy link
Author

Choose a reason for hiding this comment

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

When not targeting wasm-wasi or gojs tinygo doesn't exports those functions.
Here we are exporting stable identifiers to be used on any target.

Copy link
Owner

Choose a reason for hiding this comment

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

oh I didn't know about that, thanks for the addition.
I will test the full pipeline locally with your 2 PRs tonight or tomorrow.

Copy link
Author

Choose a reason for hiding this comment

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

Let me know how it goes and we continue from there 👍

@andreaTP andreaTP changed the title Build for wasm-unknown instead of gojs chore(wasm) Build for wasm-unknown instead of gojs Nov 25, 2025
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.98%. Comparing base (b480471) to head (a57e5a1).
⚠️ Report is 47 commits behind head on main.

Files with missing lines Patch % Lines
cmd/wasm/main.go 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4366      +/-   ##
==========================================
- Coverage   85.06%   84.98%   -0.09%     
==========================================
  Files         142      143       +1     
  Lines        5893     5939      +46     
==========================================
+ Hits         5013     5047      +34     
- Misses        662      674      +12     
  Partials      218      218              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thomaspoignant thomaspoignant changed the title chore(wasm) Build for wasm-unknown instead of gojs chore(wasm): Build for wasm-unknown instead of gojs Nov 26, 2025
@thomaspoignant
Copy link
Owner

@andreaTP I've done some tests and I end up with errors like out of bounds memory access: attempted to access address: -1812927666 but limit is: 524288 and size: 1 not sure if this is the way I use chicory.

@andreaTP
Copy link
Author

@thomaspoignant which version of Java are you using? I suggest you try with Java21+ as a first iteration.

Also we might need to increase the default memory limits:

Instance.builder().withMemoryLimits(new MemoryLimits(10))

"should" make the trick, if you have a reproducer I can take a look :-)

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.

2 participants