From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 727071651A; Tue, 09 Dec 2025 11:05:06 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 8FDAB164FF; Tue, 09 Dec 2025 11:05:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) by atuin.qyliss.net (Postfix) with ESMTPS id D52FB16510 for ; Tue, 09 Dec 2025 11:05:02 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id D7C75EC048E; Tue, 9 Dec 2025 06:05:00 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 09 Dec 2025 06:05:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1765278300; x=1765364700; bh=l8Ms43JWXd b+1t0MonwWkbM/ARobNST2pye7ApyYSqg=; b=kIn9nw29mpKLd6QsblS4FDDh2T YYe8mwwPCaCn2FoKKQcuIG0hB/ihGwMe8HHNx4qujA39To0ZF6jkK9l4YDBuMjOh nMtbeOJNkr9axm0IQF55PwnPaFAPdakY78eoagmJl6EumGBy7u7xluwfhu2F3hYS tvYuP17iFHX6hhC+vszH0M+Zy7TgOqDi+4ijD5M8lyd0avP97Szif/g/VZzus39D 9PK6FlWotE9BYwSeYRup9nLKEjXTdek8+J1EAfNUWyOQN9ZqfJRwuGpgb0FX/+Bk M3kOBgudgnu+yOk+hE+dJgJKcyaW4mbcnhn0FNls1x5u4K/mdGLGih3s2EgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1765278300; x=1765364700; bh=l8Ms43JWXdb+1t0MonwWkbM/ARobNST2pye 7ApyYSqg=; b=gSA7KVCphKhilH2E1sLnPcxGWQoARExFPVm7ZxvrjmzLMXicIt2 izXMOyZwcgoAj06fYQAmEvgR5Adg7d7BbYNTVZaoqJCziaYIBvjuQJeqSlnjspKI //Qcmws7hmPXCz8mwenTdxcbKrgSFByxjdbS0AXAje7XNY6l9lyI40iyKeT1PWNu xFgsPBS7XnJkFndE130VhkZool4zIOzPShYEaNLL6oXCCUPsKtDYhV0B7o1a/g/n PwSIF3FLZnNeIMOGPYtkqhKiFkdKnrjMXvdTFGBGWAFxzy+DD3Q7VuBnzkJy2fn+ jnZYWeFo9MLJy76D3AUPimjT4RN/nedMq0A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduleeflecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeih uhhrvghkrgestgihsggvrhgthhgrohhsrdguvghvpdhrtghpthhtohepuggvmhhiohgsvg hnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlsehsphgvtghtrhhu mhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Dec 2025 06:05:00 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 5A1B85FCEADA; Tue, 09 Dec 2025 12:04:49 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour , devel@spectrum-os.org Subject: Re: [PATCH 1/3] tools/router: use socket activation In-Reply-To: <87tsxzkjfk.fsf@alyssa.is> References: <20251209003813.553461-1-hi@alyssa.is> <19d28a41-3016-40f0-aa2b-d7500798cec2@gmail.com> <87zf7rkjqr.fsf@alyssa.is> <6546d65a-7ee7-4cef-a2da-0f278edec308@gmail.com> <87tsxzkjfk.fsf@alyssa.is> Date: Tue, 09 Dec 2025 12:04:47 +0100 Message-ID: <87pl8nkjao.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: CNSN3YND42KTKOXNJNGZE7I5FKQETIRS X-Message-ID-Hash: CNSN3YND42KTKOXNJNGZE7I5FKQETIRS X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Yureka Lilian X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Alyssa Ross writes: > Demi Marie Obenour writes: > >> On 12/9/25 05:55, Alyssa Ross wrote: >>> Demi Marie Obenour writes: >>>=20 >>>> On 12/8/25 19:38, Alyssa Ross wrote: >>>>> This means we can use readiness notification to wait until the sockets >>>>> are created without having to add special functionality for that to >>>>> the router program, and also means we can do extra system-specific >>>>> setup to the sockets, like changing their owners, outside of the >>>>> router. >>>>> >>>>> Since the socket paths were the only arguments taken by the router, >>>>> this also lets us drop the clap dependency entirely. >>>> >>>> I strongly recommend open-coding the file descriptor stuff instead >>>> of using a third-party library for it. It's just a two calls to >>>> getsockopt() (SO_DOMAIN and SO_TYPE) per socket, and listenfd pulls >>>> in wasm-bindgen and js-sys! >>>=20 >>> It pulls in wasm-bindgen and js-sys if you're building for those >>> platforms, which we are not. An inert mention in Cargo.lock is not a >>> problem. The only dependency of listenfd in our context (checked via >>> cargo tree) is on libc, which is already a dependency of tokio. >>>=20 >>> I've implemented systemd socket activation in Rust before, and it's not >>> at all nice, even with libsystemd. listenfd adds 295 extra lines of >>> code in total. I think that's worth it. >> >> Ah, I didn't mean to actually implement the whole thing, but rather >> to open-code the specific case used here. >> >> If listenfd is a very popular crate, I'd go with it. Otherwise, >> I'd be too concerned about supply-chain risk. On the other hand, >> I might be too used to having to use Fedora and Debian packages for >> my Rust dependencies. > > "#28 in Unix APIs", ahead of landlock and just behind libseccomp. (And also packaged by both Fedora and Debian.) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaTgCTwAKCRCZddwkt31p FQ1GAQDci4+a5fcR9VMQWdV8fgblOD/xXycO3l871ii5+f/nhQD+OKOTRT97vTDW Xufk4tuEQIualrvq0OI/aVufs1h/BwI= =pxnP -----END PGP SIGNATURE----- --=-=-=--