Skip to content

Commit ee6abe7

Browse files
committed
fix
1 parent 5941ae6 commit ee6abe7

File tree

4 files changed

+14
-1087
lines changed

4 files changed

+14
-1087
lines changed

examples/go-processor/build.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
1919

2020
WIT_DIR="$SCRIPT_DIR/wit"
2121
PROJECT_WIT_FILE="$PROJECT_ROOT/wit/processor.wit"
22-
WIT_DEPS_DIR="$WIT_DIR/deps"
22+
WIT_DEPS_DIR="$PROJECT_ROOT/wit/deps"
2323

2424
BINDINGS_DIR="$SCRIPT_DIR/bindings"
2525
BUILD_DIR="$SCRIPT_DIR/build"
@@ -56,7 +56,12 @@ mkdir -p "$BINDINGS_DIR" "$BUILD_WIT_DIR/deps"
5656
cp "$PROJECT_WIT_FILE" "$BUILD_WIT_DIR/processor.wit"
5757
cp -a "$WIT_DEPS_DIR/." "$BUILD_WIT_DIR/deps/"
5858

59-
# 3. Generate Bindings
59+
if ! command -v wit-bindgen-go &> /dev/null; then
60+
echo "wit-bindgen-go not found. Installing..."
61+
go install go.bytecodealliance.org/cmd/wit-bindgen-go@latest
62+
export PATH=$PATH:$(go env GOPATH)/bin
63+
fi
64+
6065
wit-bindgen-go generate \
6166
--world processor \
6267
--out "$BINDINGS_DIR" \
@@ -72,7 +77,7 @@ mkdir -p "$(dirname "$OUTPUT_FILE")"
7277
tinygo build -target=wasip2 \
7378
-tags purego \
7479
-wit-package "$BUILD_WIT_DIR" \
75-
-wit-world processor \
80+
-wit-world processor-runtime \
7681
-o "$OUTPUT_FILE" "$SCRIPT_DIR/main.go"
7782

7883
# 5. Optional Post-Build Validation

python/functionstream-runtime/build.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
FS_API_DIR = SCRIPT_DIR.parent / "functionstream-api"
4242

43-
WORLD_NAME = "processor"
43+
WORLD_NAME = "processor-runtime"
4444
MAIN_MODULE = "fs_runtime.runner"
4545

4646
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s")
@@ -124,7 +124,6 @@ def build_wasm(self):
124124
"-d", str(WIT_DIR.absolute()),
125125
"-w", WORLD_NAME,
126126
"componentize",
127-
"--stub-wasi",
128127
"-p", str(DEPENDENCIES_DIR.absolute()),
129128
"-p", str(SRC_DIR.absolute()),
130129
MAIN_MODULE,

0 commit comments

Comments
 (0)