From f2e6447567eef6eeafa833adae0ef155568ec20f Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Mon, 5 Feb 2024 21:32:00 +0000 Subject: Wasm-wc: Register a new Wasm component model language module type This is the first commit in adding WebAssembly Component Model language module support. This just adds a new NXT_APP_WASM_WC type, required by subsequent commits. The WC stands for WASI_COMPONENT This new module will have a type of 'wasm-wasi-component'. Link: Signed-off-by: Andrew Clayton --- src/nxt_application.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nxt_application.h') diff --git a/src/nxt_application.h b/src/nxt_application.h index 64866db6..f526c20d 100644 --- a/src/nxt_application.h +++ b/src/nxt_application.h @@ -22,6 +22,7 @@ typedef enum { NXT_APP_RUBY, NXT_APP_JAVA, NXT_APP_WASM, + NXT_APP_WASM_WC, NXT_APP_UNKNOWN, } nxt_app_type_t; -- cgit From f0782722654158c38193183e4c9b74925a0c52ef Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Mon, 5 Feb 2024 21:43:14 +0000 Subject: Wasm-wc: Add core configuration data structure This is required to actually _build_ the 'wasm-wasi-componet' language module. The nxt_wasm_wc_app_conf_t structure consists of the component name, e.g my_component.wasm, this is required. It also consists of an object to store the directories that are allowed access to by the component, this is optional. The bulk of the configuration infrastructure will be added in a subsequent commit. Signed-off-by: Andrew Clayton --- src/nxt_application.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nxt_application.h') diff --git a/src/nxt_application.h b/src/nxt_application.h index f526c20d..f5d7a9df 100644 --- a/src/nxt_application.h +++ b/src/nxt_application.h @@ -105,6 +105,13 @@ typedef struct { } nxt_wasm_app_conf_t; +typedef struct { + const char *component; + + nxt_conf_value_t *access; +} nxt_wasm_wc_app_conf_t; + + struct nxt_common_app_conf_s { nxt_str_t name; nxt_str_t type; @@ -134,6 +141,7 @@ struct nxt_common_app_conf_s { nxt_ruby_app_conf_t ruby; nxt_java_app_conf_t java; nxt_wasm_app_conf_t wasm; + nxt_wasm_wc_app_conf_t wasm_wc; } u; nxt_conf_value_t *self; -- cgit