Skip to content

Commit b1ed371

Browse files
committed
Wasm: Add core configuration data structure.
This is required to actually _build_ the Wasm language module. The nxt_wasm_app_conf_t structure consists of the modules name, e.g wasm, then the three required function handlers followed by the five optional function handlers. See the next commit for details of these function handlers. We also need to include the u.wasm union entry that provides access to the above structure. The bulk of the configuration infrastructure will be added in a subsequent commit. Signed-off-by: Andrew Clayton <[email protected]>
1 parent 52b334a commit b1ed371

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/nxt_application.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ typedef struct {
8787
} nxt_java_app_conf_t;
8888

8989

90+
typedef struct {
91+
const char *module;
92+
93+
const char *request_handler;
94+
const char *malloc_handler;
95+
const char *free_handler;
96+
97+
const char *module_init_handler;
98+
const char *module_end_handler;
99+
const char *request_init_handler;
100+
const char *request_end_handler;
101+
const char *response_end_handler;
102+
} nxt_wasm_app_conf_t;
103+
104+
90105
struct nxt_common_app_conf_s {
91106
nxt_str_t name;
92107
nxt_str_t type;
@@ -115,6 +130,7 @@ struct nxt_common_app_conf_s {
115130
nxt_perl_app_conf_t perl;
116131
nxt_ruby_app_conf_t ruby;
117132
nxt_java_app_conf_t java;
133+
nxt_wasm_app_conf_t wasm;
118134
} u;
119135

120136
nxt_conf_value_t *self;

0 commit comments

Comments
 (0)