stable

Clone or download

Read-only

refactor: pass arguments to wasmtime-wrapper-lib through JSON

The main exposed function of wasmtime-wrapper-lib (callWasmModule) now take only two JSON strings as input. - `config_json` where all the information required by the lib are stored (read_only_dir is optional !) Ex: { "wasm_module_path": "/var/lib/tuleap/untrusted-code/git/pre-receive-hook/1.wasm", "read_only_dir": { "host_path": "./test-wasm-modules/TryToReadWriteHere", "guest_path": "/git-dir-7331/" }, "limits": { "max_exec_time_in_ms": 10, "max_memory_size_in_bytes": 4194304 } } - `module_input_json` the JSON input for the WASM module Part of story #32630 create WebAssembly modules that have access to a preopened read-only copy of the git repository I am configuring Change-Id: I090003f23cd4dc5242da4662f45cbe35acfa79a6

Modified Files

Name
M plugins/git/include/Hook/PreReceive/PreReceiveHookData.php +1 −1 Go to diff View file
M plugins/git/include/Hook/PreReceive/PreReceiveHookDataWithoutTechnicalReference.php +2 −2 Go to diff View file
M src/additional-packages/wasmtime-wrapper-lib/src/lib.rs +59 −58 Go to diff View file
M src/additional-packages/wasmtime-wrapper-lib/src/preview1.rs +1 −3 Go to diff View file
M src/additional-packages/wasmtime-wrapper-lib/src/test.rs +171 −197 Go to diff View file
M src/additional-packages/wasmtime-wrapper-lib/src/wire.rs +26 −2 Go to diff View file
M src/common/WebAssembly/EmptyWASMCaller.php +1 −1 Go to diff View file
M src/common/WebAssembly/FFIWASMCaller.php +16 −2 Go to diff View file
M src/common/WebAssembly/FFIWASMCallerStub.php +1 −5 Go to diff View file
M src/common/WebAssembly/WASMCaller.php +1 −1 Go to diff View file