Files
nginx-unit/src
Andrew Clayton 07a0c9a348 Wasm-wc: Wire up the language module to the config system
This exposes the various WebAssembly Component Model language module
specific options.

The application type is "wasm-wasi-component".

There is a "component" option that is required, this specifies the full
path to the WebAssembly component to be run. This component should be in
binary format, i.e a .wasm file.

There is also currently one optional option

"access"

Due to the sandboxed nature of WebAssembly, by default Wasm
modules/components don't have any access to the underlying filesystem.

There is however a capabilities based mechanism[0] for allowing such
access.

This adds a config option to the 'wasm-wasi-component' application type
(same as for 'wasm');
'access.filesystem' which takes an array of
directory paths that are then made available to the wasm
module/component. This access works recursively, i.e everything under a
specific path is allowed access to.

Example config might look like

  "applications": {
      "my-wasm-component": {
          "type": "wasm-wasi-component",
          "component": "/path/to/component.wasm",
          "access" {
              "filesystem": [
                  "/tmp",
                  "/var/tmp"
              ]
          }
      }
  }

The actual mechanism used allows directories to be mapped differently in
the guest. But at the moment we don't support that and just map say /tmp
to /tmp. This can be revisited if it's something users clamour for.

[0]: <https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-capabilities.md>

Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-21 16:20:32 +00:00
..
2024-01-16 15:37:07 +00:00
2024-02-20 16:08:36 +00:00
2020-08-13 02:46:54 +03:00
2022-05-03 12:11:14 +02:00
2023-11-10 02:59:49 +00:00
2022-05-03 12:11:14 +02:00
2021-08-03 13:59:27 +03:00
2022-05-03 12:11:14 +02:00
2020-05-28 14:57:41 +01:00
2020-03-09 16:28:25 +00:00
2022-05-03 12:11:14 +02:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2022-05-03 12:11:14 +02:00
2021-08-03 13:59:27 +03:00
2022-05-03 12:11:14 +02:00
2022-05-03 12:11:14 +02:00
2024-02-19 12:59:29 +00:00
2024-02-19 12:59:29 +00:00
2017-01-17 20:00:00 +03:00
2022-04-26 12:38:48 +02:00
2017-01-17 20:00:00 +03:00
2019-03-11 17:31:59 +03:00
2022-05-03 12:11:14 +02:00
2019-11-14 16:39:54 +03:00
2024-02-20 06:09:23 +08:00
2022-11-20 23:16:51 +08:00
2022-08-18 15:43:03 +02:00
2022-05-03 12:11:14 +02:00
2024-02-20 06:09:23 +08:00
2023-05-08 16:00:25 +08:00
2022-05-03 12:11:14 +02:00
2022-05-03 12:11:14 +02:00
2021-03-24 08:05:07 +03:00
2022-05-03 12:11:14 +02:00
2022-05-03 12:11:14 +02:00
2022-05-03 12:11:14 +02:00
2023-06-19 16:29:22 +08:00
2022-05-03 12:11:14 +02:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2022-05-03 12:11:14 +02:00
2020-08-13 02:46:54 +03:00
2017-01-17 20:00:00 +03:00
2022-07-18 19:09:30 +02:00
2022-07-18 19:09:30 +02:00
2024-01-16 15:37:07 +00:00
2017-01-17 20:00:00 +03:00
2019-03-11 17:31:59 +03:00
2022-10-28 03:18:33 +01:00
2023-05-08 16:00:25 +08:00
2017-03-14 19:03:49 +03:00
2023-04-11 19:08:32 +01:00
2023-05-08 16:00:25 +08:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2017-01-17 20:00:00 +03:00
2017-01-17 20:00:00 +03:00
2023-05-08 16:00:25 +08:00
2023-05-08 16:00:25 +08:00
2017-01-17 20:00:00 +03:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2023-09-07 23:13:34 +01:00
2022-05-03 12:11:14 +02:00
2022-08-11 18:43:12 +02:00
2024-01-16 15:37:07 +00:00
2022-05-03 12:11:14 +02:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2023-10-10 14:30:02 +08:00
2017-01-17 20:00:00 +03:00
2022-08-29 14:32:20 +08:00
2017-01-17 20:00:00 +03:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2017-01-27 11:35:11 +03:00
2022-05-03 12:11:14 +02:00
2022-05-03 12:11:14 +02:00
2017-01-17 20:00:00 +03:00
2022-05-03 12:11:14 +02:00
2019-03-11 17:31:59 +03:00
2023-06-30 14:38:34 +02:00
2023-06-19 16:29:22 +08:00
2018-06-25 16:51:47 +03:00
2019-03-11 17:31:59 +03:00
2019-11-14 16:39:54 +03:00
2018-08-06 17:27:33 +03:00
2018-08-06 17:27:33 +03:00
2023-11-14 16:48:16 +00:00
2020-03-06 18:28:54 +03:00
2024-02-20 06:09:23 +08:00
2024-02-20 06:09:23 +08:00
2022-05-03 12:11:14 +02:00
2019-10-10 19:42:41 +03:00
2018-02-07 15:34:42 +03:00
2022-05-03 12:11:14 +02:00
2023-08-01 10:16:17 -07:00