Skip to content

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Apr 17, 2025

Add wasm to list of little-endian arches for NativeEndian as well as bpf2go output.
Make sure at least everything builds against the wasm target of the official Go toolchain.

This change allows ebpf-go to be imported into projects using GOARCH=wasm.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo requested a review from a team as a code owner April 17, 2025 07:28
@ti-mo ti-mo mentioned this pull request Apr 17, 2025
ti-mo added 2 commits April 17, 2025 11:52
In order for `GOOS=js GOARCH=wasm go build ./...` to work on the repository,
the examples need to build correctly in CI.

Adding 'wasm' as a target without a C target name won't include it in the
bpf2go help text under `Supported targets`, it will only make it appear in
the go:build statements in the output.

Signed-off-by: Timo Beckers <timo@isovalent.com>
Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo merged commit cd7849d into cilium:main Apr 29, 2025
16 of 17 checks passed
@ti-mo ti-mo deleted the tb/wasm-build branch April 29, 2025 08:58
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