Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/wasm/nxt_rt_wasmtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,13 @@ nxt_wasmtime_wasi_init(const nxt_wasm_ctx_t *ctx)
wasi_config_inherit_stderr(wasi_config);

for (dir = ctx->dirs; dir != NULL && *dir != NULL; dir++) {
#if defined(WASMTIME_VERSION_MAJOR) && (WASMTIME_VERSION_MAJOR >= 27)
wasi_config_preopen_dir(wasi_config, *dir, *dir,
WASMTIME_WASI_DIR_PERMS_READ|WASMTIME_WASI_DIR_PERMS_WRITE,
WASMTIME_WASI_FILE_PERMS_READ|WASMTIME_WASI_FILE_PERMS_WRITE);
#else
wasi_config_preopen_dir(wasi_config, *dir, *dir);
#endif
}

error = wasmtime_context_set_wasi(rt_ctx->ctx, wasi_config);
Expand Down
Loading