Skip to content

Commit ca91254

Browse files
authored
build: add wasm targets for keeper (#33124)
[powdr](github.com/powdr-labs/powdr) has tested keeper in their womir system and managed to get it to work. This PR adds wasm as a keeper target. There's another plan by the zkevm team to support wasm with wasi as well, so these PR adds both targets. These currently uses the `example` tag, as there is no precompile intefrace defined for either target yet. Nonetheless, this is useful for testing these zkvms so it makes sense to support these experimental targets already.
1 parent fbd89be commit ca91254

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

build/ci.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ var (
107107
Tags: "ziren",
108108
Env: map[string]string{"GOMIPS": "softfloat", "CGO_ENABLED": "0"},
109109
},
110+
{
111+
Name: "wasm-js",
112+
GOOS: "js",
113+
GOARCH: "wasm",
114+
Tags: "example",
115+
},
116+
{
117+
Name: "wasm-wasi",
118+
GOOS: "wasip1",
119+
GOARCH: "wasm",
120+
Tags: "example",
121+
},
110122
{
111123
Name: "example",
112124
Tags: "example",
@@ -331,6 +343,10 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (
331343
}
332344
ld = append(ld, "-extldflags", "'"+strings.Join(extld, " ")+"'")
333345
}
346+
// TODO(gballet): revisit after the input api has been defined
347+
if runtime.GOARCH == "wasm" {
348+
ld = append(ld, "-gcflags=all=-d=softfloat")
349+
}
334350
if len(ld) > 0 {
335351
flags = append(flags, "-ldflags", strings.Join(ld, " "))
336352
}

0 commit comments

Comments
 (0)