wasmtime: add CLI options for pre-opened TCP listen sockets (#3729)

This patch  implements CLI options to insert pre-opened sockets.

`--listenfd` : Inherit environment variables and file descriptors following
               the systemd listen fd specification (UNIX only).

`--tcplisten <SOCKET ADDRESS>`: Grant access to the given TCP listen socket.

Signed-off-by: Harald Hoyer <harald@profian.com>
This commit is contained in:
Harald Hoyer
2022-02-07 23:26:38 +01:00
committed by GitHub
parent 88b53b12aa
commit fa889b4fd2
3 changed files with 93 additions and 1 deletions

12
Cargo.lock generated
View File

@@ -1585,6 +1585,17 @@ version = "0.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95f5690fef754d905294c56f7ac815836f2513af966aa47f2e07ac79be07827f"
[[package]]
name = "listenfd"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "809e514e2cb8a9624701346ea3e694c1766d76778e343e537d873c1c366e79a7"
dependencies = [
"libc",
"uuid",
"winapi",
]
[[package]]
name = "lock_api"
version = "0.4.4"
@@ -3472,6 +3483,7 @@ dependencies = [
"humantime 2.1.0",
"lazy_static",
"libc",
"listenfd",
"memchr",
"more-asserts",
"num_cpus",