Skip to content

Commit 39f1169

Browse files
chore: move wasm binary to cmd/wasm (#4099)
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
1 parent e4661ca commit 39f1169

File tree

12 files changed

+4
-4
lines changed

12 files changed

+4
-4
lines changed

β€ŽMakefileβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ build-jsonschema-generator: create-out-dir ## Build the jsonschema-generator in
4444
CGO_ENABLED=0 GO111MODULE=on $(GOWORK_ENV) $(GOCMD) build $(MODFLAG) -o out/bin/jsonschema-generator ./cmd/jsonschema-generator/
4545

4646
build-wasm: create-out-dir ## Build the wasm evaluation library in out/bin/
47-
cd wasm && $(TINYGOCMD) build -o ../out/bin/gofeatureflag-evaluation.wasm -target wasm -opt=2 -opt=s --no-debug -scheduler=none && cd ..
47+
cd cmd/wasm && $(TINYGOCMD) build -o ../out/bin/gofeatureflag-evaluation.wasm -target wasm -opt=2 -opt=s --no-debug -scheduler=none
4848

4949
build-wasi: create-out-dir ## Build the wasi evaluation library in out/bin/
50-
cd wasm && $(TINYGOCMD) build -o ../out/bin/gofeatureflag-evaluation.wasi -target wasi -opt=2 -opt=s --no-debug -scheduler=none && cd ..
50+
cd cmd/wasm && $(TINYGOCMD) build -o ../out/bin/gofeatureflag-evaluation.wasi -target wasi -opt=2 -opt=s --no-debug -scheduler=none
5151

5252
build-modules: ## Run build command to build all modules in the workspace
5353
@echo "Building all modules in the workspace..."
File renamed without changes.
File renamed without changes.

β€Žwasm/helpers/wasm_test.goβ€Ž renamed to β€Žcmd/wasm/helpers/wasm_test.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"testing"
55
"unsafe"
66

7-
"github.com/thomaspoignant/go-feature-flag/wasm/helpers"
7+
"github.com/thomaspoignant/go-feature-flag/cmd/wasm/helpers"
88
)
99

1010
func TestWasmReadBufferFromMemory_ZeroLengthReturnsEmptySlice(t *testing.T) {

β€Žwasm/main.goβ€Ž renamed to β€Žcmd/wasm/main.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import (
44
"encoding/json"
55
"fmt"
66

7+
"github.com/thomaspoignant/go-feature-flag/cmd/wasm/helpers"
78
"github.com/thomaspoignant/go-feature-flag/modules/core/ffcontext"
89
"github.com/thomaspoignant/go-feature-flag/modules/core/flag"
910
"github.com/thomaspoignant/go-feature-flag/modules/core/model"
1011
"github.com/thomaspoignant/go-feature-flag/modules/core/utils"
1112
"github.com/thomaspoignant/go-feature-flag/modules/evaluation"
12-
"github.com/thomaspoignant/go-feature-flag/wasm/helpers"
1313
)
1414

1515
// main is the entry point for the wasm module.
File renamed without changes.

0 commit comments

Comments
Β (0)