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 C59AF16172; Tue, 09 Dec 2025 10:55:26 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 92CEB1616B; Tue, 09 Dec 2025 10:55:24 +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 D660D161A7 for ; Tue, 09 Dec 2025 10:55:23 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id BCF34EC0600; Tue, 9 Dec 2025 05:55:21 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 09 Dec 2025 05:55:21 -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=1765277721; x=1765364121; bh=cV7l+oC9Ab rjCFi44mk3X6idIxgP0K6QX+5A78stnjg=; b=eFU8m/PNNlPMRbhKDN3thihU/L Cx8ir3iaZ9dO+9BE91VMiJthQz8FE3k4kgfhi0CeR1rZplDlvxLyNPwmsIIpxO64 rxBh5+iEW9YztOvbnixic9YTPhWmyiGJrojIkRlfNiVnB4t57RxTImSqbqG1d8FH Jejitdj5Ju64MRY6f6vifiTPNDlcaTdTU9yJYPhPjYUd5h4hncULE73vh9h92MrT EVV2tvqAKn/8cy6hMNJu0VziH6tuoMKYeL/noEFdVKGKEId+EOh5zPl4eGp+8VrB ftc4HHHUJ9xXkrJtTOIRZ1zc0CybGPqxF+tfHB3+DAjvW0WtsJb7uhO3VI+A== 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= 1765277721; x=1765364121; bh=cV7l+oC9AbrjCFi44mk3X6idIxgP0K6QX+5 A78stnjg=; b=WWdtX+m+zXsijX6rtHWgwx2HINBffZRT1GWjSF2WBHtO5jlIKqQ mnpmcBsSX2fpgPl7/IO8YlwzGBdwrvWYreECio1N7CxI6yYuU9qPvQv9rNzbtW90 /K0Pn4t42JXeEPubuY3qk84nK6Buo3wmJv4+6s13c/kq57DIToKr6KHvRdaf1qxZ iPqqYe/NE+TPqCU3XqlUa/mvu+hCymcAM1/I1xqqqXvp/8jaLGM5k4ocdlG34OM0 Hrk5e3uNcGro/VLGLeDGQFcE3fBlH7X4arqynDVyshyJ9s8zCgviLn0Q6co8LjWK BdtYGtFli40RPe23CpcIgfmtICE64JvgX9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduleefjecutefuodetggdotefrod 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 05:55:21 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 66DD75FCE999; Tue, 09 Dec 2025 11:55:10 +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: <19d28a41-3016-40f0-aa2b-d7500798cec2@gmail.com> References: <20251209003813.553461-1-hi@alyssa.is> <19d28a41-3016-40f0-aa2b-d7500798cec2@gmail.com> Date: Tue, 09 Dec 2025 11:55:08 +0100 Message-ID: <87zf7rkjqr.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: FCS6VQVKGZ2J7R5KUQBDUD7IWA7KFWD3 X-Message-ID-Hash: FCS6VQVKGZ2J7R5KUQBDUD7IWA7KFWD3 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 Demi Marie Obenour writes: > 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. >>=20 >> 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! 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. 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaTgADAAKCRCZddwkt31p FQwqAP9jhLuIydsXMJKcX9CkEdWvQijLt6zW1Xx2QNECkJreOwD9F2d1WqEzgWT4 ZNKg1l9gDAgWAwWbgIwnz1hN5jTXDAk= =rXNR -----END PGP SIGNATURE----- --=-=-=--