Skip to content

Commit 57d2148

Browse files
Jake ChampionJakeChampion
authored andcommitted
chore: use c-at-e as the identifier
1 parent 87a0dce commit 57d2148

37 files changed

+1873
-1837
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ jobs:
294294
name: engine-release
295295
- name: Locate component resources
296296
run: |
297-
cp c-dependencies/js-compute-runtime/xqd.wit .
297+
cp c-dependencies/js-compute-runtime/c-at-e.wit .
298298
cp c-dependencies/js-compute-runtime/wasi_snapshot_preview1.wasm .
299299
- run: yarn
300300
shell: bash

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ node_modules/
1515
/js-compute-runtime-component.wasm
1616
/c-dependencies/js-compute-runtime/obj
1717
tests/wpt-harness/wpt-test-runner.js
18-
/xqd.wit
18+
/c-at-e.wit
1919
/wasi_snapshot_preview1.wasm
2020
wpt-runtime.wasm
2121
docs-app/bin/main.wasm
2222
docs-app/pkg/*.tar.gz
23-
c-dependencies/js-compute-runtime/xqd-world/xqd_world_component_type.o
23+
c-dependencies/js-compute-runtime/c-at-e-world/c_at_e_world_component_type.o
2424

2525
*.a

.vscode/settings.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"files.associations": {
3+
"*.mdx": "mdx",
34
"cstddef": "c",
45
"limits": "c",
56
"type_traits": "c",
6-
"xqd.h": "c",
7+
"c-at-e.h": "c",
78
"algorithm": "cpp",
89
"memory": "cpp",
910
"__functional_base": "cpp",
@@ -87,7 +88,8 @@
8788
"__functional_03": "cpp",
8889
"__functional_base_03": "cpp",
8990
"memory_resource": "cpp",
90-
"numeric": "cpp"
91+
"numeric": "cpp",
92+
"c_at_e_world.h": "c"
9193
},
9294
"git.ignoreLimitWarning": true
9395
}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
### Changed
5454

55-
* ensure CacheOverride bitflags are the same value as defined in xqd ([#386](https://github.com/fastly/js-compute-runtime/issues/386)) ([8a1c215](https://github.com/fastly/js-compute-runtime/commit/8a1c2158505e8ed1ebb424fc97866da155601d1f))
55+
* ensure CacheOverride bitflags are the same value as defined in c-at-e ([#386](https://github.com/fastly/js-compute-runtime/issues/386)) ([8a1c215](https://github.com/fastly/js-compute-runtime/commit/8a1c2158505e8ed1ebb424fc97866da155601d1f))
5656

5757
## 1.3.0 (2023-01-24)
5858

c-dependencies/js-compute-runtime/Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ CFLAGS += --sysroot=$(WASI_SDK)/share/wasi-sysroot
9393

9494
# Includes for compiling c++
9595
INCLUDES := -I$(FSM_SRC)
96-
INCLUDES += -I$(FSM_SRC)/xqd-world
96+
INCLUDES += -I$(FSM_SRC)/c-at-e-world
9797
INCLUDES += -I$(SM_SRC)/include
9898
INCLUDES += -I$(BUILD)/openssl/include
9999

@@ -139,7 +139,7 @@ $(BUILD):
139139
$(OBJ_DIR):
140140
$(call cmd,mkdir,$@)
141141

142-
$(OBJ_DIR)/xqd-world:
142+
$(OBJ_DIR)/c-at-e-world:
143143
$(call cmd,mkdir,$@)
144144

145145
$(OBJ_DIR)/builtins:
@@ -244,7 +244,7 @@ regenerate-world:
244244
@exit 1
245245
else
246246
regenerate-world:
247-
$(WIT_BINDGEN) c xqd.wit --no-helpers --out-dir xqd-world
247+
$(WIT_BINDGEN) c c-at-e.wit --no-helpers --out-dir c-at-e-world
248248
endif
249249

250250

@@ -259,29 +259,29 @@ FSM_OBJ := $(patsubst $(FSM_SRC)/%.cpp,$(OBJ_DIR)/%.o,$(FSM_CPP))
259259

260260
# Build all the above object files
261261
$(foreach source,$(FSM_CPP),$(eval $(call compile_cxx,$(source))))
262-
$(eval $(call compile_cxx,$(FSM_SRC)/xqd-world/xqd_world_adapter.cpp))
263-
$(eval $(call compile_c,$(FSM_SRC)/xqd-world/xqd_world.c))
262+
$(eval $(call compile_cxx,$(FSM_SRC)/c-at-e-world/c_at_e_world_adapter.cpp))
263+
$(eval $(call compile_c,$(FSM_SRC)/c-at-e-world/c_at_e_world.c))
264264

265-
# Special build of xqd_world_adapter.cpp for the component model.
266-
$(OBJ_DIR)/xqd-world/xqd_world_adapter_component.o: $(FSM_SRC)/xqd-world/xqd_world_adapter.cpp
267-
$(OBJ_DIR)/xqd-world/xqd_world_adapter_component.o: DEFINES += -DCOMPONENT
268-
$(OBJ_DIR)/xqd-world/xqd_world_adapter_component.o: | $(OBJ_DIR)/xqd-world
265+
# Special build of c_at_e_world_adapter.cpp for the component model.
266+
$(OBJ_DIR)/c-at-e-world/c_at_e_world_adapter_component.o: $(FSM_SRC)/c-at-e-world/c_at_e_world_adapter.cpp
267+
$(OBJ_DIR)/c-at-e-world/c_at_e_world_adapter_component.o: DEFINES += -DCOMPONENT
268+
$(OBJ_DIR)/c-at-e-world/c_at_e_world_adapter_component.o: | $(OBJ_DIR)/c-at-e-world
269269
$(call cmd,wasi_cxx,$@)
270270

271271
# NOTE: we shadow wasm-opt by adding $(FSM_SRC)/scripts to the path, which
272272
# includes a script called wasm-opt that immediately exits successfully. See
273273
# that script for more information about why we do this.
274274

275275
$(OBJ_DIR)/js-compute-runtime.wasm: $(FSM_OBJ) $(SM_OBJ) $(RUST_URL_LIB)
276-
$(OBJ_DIR)/js-compute-runtime.wasm: $(OBJ_DIR)/xqd-world/xqd_world.o
277-
$(OBJ_DIR)/js-compute-runtime.wasm: $(OBJ_DIR)/xqd-world/xqd_world_adapter.o
276+
$(OBJ_DIR)/js-compute-runtime.wasm: $(OBJ_DIR)/c-at-e-world/c_at_e_world.o
277+
$(OBJ_DIR)/js-compute-runtime.wasm: $(OBJ_DIR)/c-at-e-world/c_at_e_world_adapter.o
278278
$(call cmd_format,WASI_LD,$@) PATH="$(FSM_SRC)/scripts:$$PATH" \
279279
$(WASI_CXX) $(LD_FLAGS) $(OPENSSL_LIBS) -o $@ $^
280280
$(call cmd_format,WASM_STRIP,$@) $(call WASM_STRIP,$@)
281281

282282
$(OBJ_DIR)/js-compute-runtime-component.wasm: $(FSM_OBJ) $(SM_OBJ) $(RUST_URL_LIB)
283-
$(OBJ_DIR)/js-compute-runtime-component.wasm: $(OBJ_DIR)/xqd-world/xqd_world.o
284-
$(OBJ_DIR)/js-compute-runtime-component.wasm: $(OBJ_DIR)/xqd-world/xqd_world_adapter_component.o
283+
$(OBJ_DIR)/js-compute-runtime-component.wasm: $(OBJ_DIR)/c-at-e-world/c_at_e_world.o
284+
$(OBJ_DIR)/js-compute-runtime-component.wasm: $(OBJ_DIR)/c-at-e-world/c_at_e_world_adapter_component.o
285285
$(call cmd_format,WASI_LD,$@) PATH="$(FSM_SRC)/scripts:$$PATH" \
286286
$(WASI_CXX) $(LD_FLAGS) $(OPENSSL_LIBS) -o $@ $^
287287
$(call cmd_format,WASM_STRIP,$@) $(call WASM_STRIP,$@)

c-dependencies/js-compute-runtime/builtins/backend.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -712,12 +712,12 @@ bool Backend::isCipherSuiteSupportedByFastly(std::string_view cipherSpec) {
712712
JS::Result<mozilla::Ok> Backend::register_dynamic_backend(JSContext *cx, JS::HandleObject backend) {
713713
MOZ_ASSERT(is_instance(backend));
714714

715-
xqd_world_string_t name_str;
715+
c_at_e_world_string_t name_str;
716716
JS::RootedString name(cx, JS::GetReservedSlot(backend, Backend::Slots::Name).toString());
717717
JS::UniqueChars nameChars = encode(cx, name, &name_str.len);
718718
name_str.ptr = nameChars.get();
719719

720-
xqd_world_string_t target_str;
720+
c_at_e_world_string_t target_str;
721721
JS::RootedString target(cx, JS::GetReservedSlot(backend, Backend::Slots::Target).toString());
722722
JS::UniqueChars targetChars = encode(cx, target, &target_str.len);
723723
target_str.ptr = targetChars.get();
@@ -813,8 +813,8 @@ JS::Result<mozilla::Ok> Backend::register_dynamic_backend(JSContext *cx, JS::Han
813813
}
814814

815815
fastly_error_t err;
816-
if (!xqd_fastly_http_req_register_dynamic_backend(&name_str, &target_str, &backend_config,
817-
&err)) {
816+
if (!c_at_e_fastly_http_req_register_dynamic_backend(&name_str, &target_str, &backend_config,
817+
&err)) {
818818
HANDLE_ERROR(cx, err);
819819
return JS::Result<mozilla::Ok>(JS::Error());
820820
}

c-dependencies/js-compute-runtime/builtins/cache-override.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CacheOverride : public BuiltinImpl<CacheOverride> {
1313
static const int ctor_length = 1;
1414

1515
// The values stored in these slots are ultimately passed to the host
16-
// via the xqd_req_cache_override_v2_set hostcall.
16+
// via the c_at_e_req_cache_override_v2_set hostcall.
1717
//
1818
// If `Mode` is not `Override`, all other values are ignored.
1919
//

c-dependencies/js-compute-runtime/builtins/client-info.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "builtins/client-info.h"
2+
#include "c-at-e-world/c_at_e_world_adapter.h"
23
#include "core/geo_ip.h"
3-
#include "xqd-world/xqd_world_adapter.h"
44

55
#include "js/JSON.h"
66
#include <arpa/inet.h>
@@ -24,7 +24,7 @@ static JSString *retrieve_address(JSContext *cx, JS::HandleObject self) {
2424

2525
fastly_list_u8_t octets;
2626
fastly_error_t err;
27-
if (!xqd_fastly_http_req_downstream_client_ip_addr(&octets, &err)) {
27+
if (!c_at_e_fastly_http_req_downstream_client_ip_addr(&octets, &err)) {
2828
HANDLE_ERROR(cx, err);
2929
return nullptr;
3030
}

c-dependencies/js-compute-runtime/builtins/config-store.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fastly_dictionary_handle_t ConfigStore::config_store_handle(JSObject *obj) {
1111
bool ConfigStore::get(JSContext *cx, unsigned argc, JS::Value *vp) {
1212
METHOD_HEADER(1)
1313

14-
xqd_world_string_t key_str;
14+
c_at_e_world_string_t key_str;
1515
JS::UniqueChars key = encode(cx, args[0], &key_str.len);
1616
// If the converted string has a length of 0 then we throw an Error
1717
// because Dictionary keys have to be at-least 1 character.
@@ -30,7 +30,7 @@ bool ConfigStore::get(JSContext *cx, unsigned argc, JS::Value *vp) {
3030
fastly_option_string_t ret;
3131
fastly_error_t err;
3232
// Ensure that we throw an exception for all unexpected host errors.
33-
if (!xqd_fastly_dictionary_get(ConfigStore::config_store_handle(self), &key_str, &ret, &err)) {
33+
if (!c_at_e_fastly_dictionary_get(ConfigStore::config_store_handle(self), &key_str, &ret, &err)) {
3434
HANDLE_ERROR(cx, err);
3535
return false;
3636
}
@@ -58,7 +58,7 @@ bool ConfigStore::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
5858
REQUEST_HANDLER_ONLY("The ConfigStore builtin");
5959
CTOR_HEADER("ConfigStore", 1);
6060

61-
xqd_world_string_t name_str;
61+
c_at_e_world_string_t name_str;
6262
JS::UniqueChars name_chars = encode(cx, args[0], &name_str.len);
6363
name_str.ptr = name_chars.get();
6464

@@ -99,7 +99,7 @@ bool ConfigStore::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
9999
JS::RootedObject config_store(cx, JS_NewObjectForConstructor(cx, &class_, args));
100100
fastly_dictionary_handle_t dict_handle = INVALID_HANDLE;
101101
fastly_error_t err;
102-
if (!xqd_fastly_dictionary_open(&name_str, &dict_handle, &err)) {
102+
if (!c_at_e_fastly_dictionary_open(&name_str, &dict_handle, &err)) {
103103
if (err == FASTLY_ERROR_BAD_HANDLE) {
104104
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CONFIG_STORE_DOES_NOT_EXIST,
105105
name.data());

c-dependencies/js-compute-runtime/builtins/crypto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#pragma clang diagnostic pop
77

88
#include "crypto.h"
9-
#include "host_interface/xqd.h"
9+
#include "host_interface/c-at-e.h"
1010
#include "subtle-crypto.h"
1111

1212
bool is_int_typed_array(JSObject *obj) {

0 commit comments

Comments
 (0)