@@ -151,9 +151,6 @@ $(BUILD):
151
151
$(OBJ_DIR ) :
152
152
$(call cmd,mkdir,$@ )
153
153
154
- $(OBJ_DIR ) /fastly-world :
155
- $(call cmd,mkdir,$@ )
156
-
157
154
$(OBJ_DIR ) /impl :
158
155
$(call cmd,mkdir,$@ )
159
156
@@ -169,6 +166,9 @@ $(OBJ_DIR)/core:
169
166
$(OBJ_DIR ) /host_interface :
170
167
$(call cmd,mkdir,$@ )
171
168
169
+ $(OBJ_DIR ) /host_interface/component :
170
+ $(call cmd,mkdir,$@ )
171
+
172
172
shared :
173
173
$(call cmd,mkdir,$@ )
174
174
@@ -277,7 +277,10 @@ regenerate-world:
277
277
@exit 1
278
278
else
279
279
regenerate-world :
280
- $(WIT_BINDGEN ) c fastly.wit --no-helpers --out-dir fastly-world
280
+ $(WIT_BINDGEN ) c --no-helpers \
281
+ --out-dir host_interface/component \
282
+ --world fastly-world \
283
+ host_interface/wit
281
284
endif
282
285
283
286
@@ -295,7 +298,8 @@ $(foreach source,$(FSM_CPP),$(eval $(call compile_cxx,$(source))))
295
298
296
299
# Compute runtime build ########################################################
297
300
298
- $(eval $(call compile_cxx,$(FSM_SRC)/fastly-world/fastly_world_adapter.cpp))
301
+ $(eval $(call compile_cxx,$(FSM_SRC)/host_interface/component/fastly_world_adapter.cpp))
302
+ $(eval $(call compile_cxx,$(FSM_SRC)/impl/main.cpp))
299
303
300
304
# This version of the runtime uses the world adapter in place of the world
301
305
# generated by wit-bindgen, adapting to the currently available host calls on
@@ -306,17 +310,16 @@ $(eval $(call compile_cxx,$(FSM_SRC)/fastly-world/fastly_world_adapter.cpp))
306
310
# that script for more information about why we do this.
307
311
$(OBJ_DIR ) /js-compute-runtime.wasm : $(FSM_OBJ ) $(SM_OBJ ) $(RUST_URL_LIB ) $(RUST_ENCODING_LIB )
308
312
$(OBJ_DIR ) /js-compute-runtime.wasm : $(OBJ_DIR ) /impl/main.o
309
- $(OBJ_DIR ) /js-compute-runtime.wasm : $(OBJ_DIR ) /fastly-world /fastly_world_adapter.o
313
+ $(OBJ_DIR ) /js-compute-runtime.wasm : $(OBJ_DIR ) /host_interface/component /fastly_world_adapter.o
310
314
$(call cmd_format,WASI_LD,$@ ) PATH=" $( FSM_SRC) /scripts:$$ PATH" \
311
315
$(WASI_CXX ) $(LD_FLAGS ) $(OPENSSL_LIBS ) -o $@ $^
312
316
$(call cmd_format,WASM_STRIP,$@ ) $(call WASM_STRIP,$@ )
313
317
$(call cmd_format,WASM_METADATA,$@ ) $(call WASM_METADATA,$@ )
314
318
315
- $(eval $(call compile_cxx,$(FSM_SRC)/impl/main.cpp))
316
-
317
319
# Compute runtime component build ##############################################
318
320
319
- $(eval $(call compile_c,$(FSM_SRC)/fastly-world/fastly_world.c))
321
+ $(eval $(call compile_c,$(FSM_SRC)/host_interface/component/fastly_world.c))
322
+ $(eval $(call compile_cxx,$(FSM_SRC)/impl/main_component.cpp))
320
323
321
324
# This version of the runtime uses the code generated by wit-bindgen, to
322
325
# ultimately be run as a component on c@e.
@@ -326,15 +329,13 @@ $(eval $(call compile_c,$(FSM_SRC)/fastly-world/fastly_world.c))
326
329
# that script for more information about why we do this.
327
330
$(OBJ_DIR ) /js-compute-runtime-component.wasm : $(FSM_OBJ ) $(SM_OBJ ) $(RUST_URL_LIB ) $(RUST_ENCODING_LIB )
328
331
$(OBJ_DIR ) /js-compute-runtime-component.wasm : $(OBJ_DIR ) /impl/main_component.o
329
- $(OBJ_DIR ) /js-compute-runtime-component.wasm : $(FSM_SRC ) /fastly-world /fastly_world_component_type.o
330
- $(OBJ_DIR ) /js-compute-runtime-component.wasm : $(OBJ_DIR ) /fastly-world /fastly_world.o
332
+ $(OBJ_DIR ) /js-compute-runtime-component.wasm : $(FSM_SRC ) /host_interface/component /fastly_world_component_type.o
333
+ $(OBJ_DIR ) /js-compute-runtime-component.wasm : $(OBJ_DIR ) /host_interface/component /fastly_world.o
331
334
$(call cmd_format,WASI_LD,$@ ) PATH=" $( FSM_SRC) /scripts:$$ PATH" \
332
335
$(WASI_CXX ) $(LD_FLAGS ) $(OPENSSL_LIBS ) -o $@ $^
333
336
$(call cmd_format,WASM_STRIP,$@ ) $(call WASM_STRIP,$@ )
334
337
$(call cmd_format,WASM_METADATA,$@ ) $(call WASM_METADATA,$@ )
335
338
336
- $(eval $(call compile_cxx,$(FSM_SRC)/impl/main_component.cpp))
337
-
338
339
# Shared builtins build ########################################################
339
340
340
341
shared-builtins : shared/builtins.a shared/librust_url.a shared/librust_encoding.a
0 commit comments