-
Notifications
You must be signed in to change notification settings - Fork 48
Using goada-wasm if CGO_ENABLE=0
#511
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #511 +/- ##
==========================================
+ Coverage 56.36% 56.62% +0.26%
==========================================
Files 130 130
Lines 8131 6479 -1652
==========================================
- Hits 4583 3669 -914
+ Misses 3184 2446 -738
Partials 364 364
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Update: Hmm, completely removing the cgo goada wasn't a good idea, since wasm has a much greater performance penalty than cgo. |
CGO_ENABLE=0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables Zeno to build and run without CGO by introducing a WebAssembly-based URL parser (goada-wasm) as an alternative to the CGO-dependent goada library. The change makes CGO optional rather than required, allowing the project to compile on systems without C++ compiler toolchains at the cost of reduced performance on non-amd64/arm64 architectures.
Key Changes:
- Added CGO-free URL parsing implementation using
goada-wasmpackage - Updated build process to test both CGO-enabled and CGO-disabled configurations
- Revised documentation to reflect that CGO is now optional
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
internal/pkg/preprocessor/url_cgofree.go |
New CGO-free implementation of URL normalization using goada-wasm |
internal/pkg/preprocessor/url_cgo.go |
Added build tag and Backend() function to existing CGO implementation |
go.mod |
Added goada-wasm v1.0.1 dependency |
cmd/cmd.go |
Added URL parser backend information to CLI help output |
README.md |
Updated requirements section to document CGO as optional with performance tradeoffs |
.github/workflows/go.yml |
Enhanced CI to test both CGO-enabled and CGO-disabled builds |
.github/copilot-instructions.md |
Updated internal documentation to reflect optional CGO dependency |
No description provided.