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 B694E16363; Tue, 09 Dec 2025 11:02:09 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id E11D2163E5; Tue, 09 Dec 2025 11:02:06 +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 fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) by atuin.qyliss.net (Postfix) with ESMTPS id E71D6163E4 for ; Tue, 09 Dec 2025 11:02:05 +0000 (UTC) Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id B0169140008F; Tue, 9 Dec 2025 06:02:03 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Tue, 09 Dec 2025 06:02:03 -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=1765278123; x=1765364523; bh=6jxsx0yL9l UJxRKyZFiuTYl4Mbagskcwxn1A3aE9mng=; b=ISZ20md+Ug9JReb6DE5IWsZVeM 4tjzOyr10OChqGl4rqJol3W859RQFy+2reU/fv4Sigz25uS0Ovl7F4oO8nDXDztY Dg/9EdDPjow2w6xuT88qrUjpGy/edKq9/h6cHuVfyUtgz+SNVjfwDXJRyFVMvty1 3GtFKqosf0LP4J1nHKJNATbs1tZaGa1nw5ltFP1++nL3KYh+wTt4AUj0Dbzd/PRE RVXgCltySywoEwUnMQ5goEy0Ued2hmnNSPKbFjEurGxWCMzQHygCMkbWqcUnajUZ 2tZL2Yr2/VilkOSO3mqsl5r281k77KfcBACEbTUV9Shosyu/xyLXsECBi9GA== 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= 1765278123; x=1765364523; bh=6jxsx0yL9lUJxRKyZFiuTYl4Mbagskcwxn1 A3aE9mng=; b=wYjD9f7cKAFfgKdu0OmdqGX0y47L3I5pFl8jgwj1HRL2JSOG0Ds HxIGgO63PU56aoLCr80i5mBy5lIeqCcyYhjmgfbPartJq1kS9uwpFtOeqUZyZe71 8KDI8KEj/RC4CPkTQoXHJXY68bZp6yvxMphRiU65V/1i+hcYuryxAPQfvuZfS0yx IIJVNeCVu/MjNAK4VGjfnQJWGOMvwdcnZN/DRk29oDJIQZjRMtG8/vitOy8J+Ay5 EsbXR4zFXihaEyuU66EQLMdAn6M36ZvK2+eoGZgWFicuIOsXFsQMi1VH14caH8M6 Y3wZ86IEKQybIwtLd3Em/lJfgwS7mf/BGVw== 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:02:03 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 712AF5FCEA80; Tue, 09 Dec 2025 12:01:52 +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: <6546d65a-7ee7-4cef-a2da-0f278edec308@gmail.com> 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> Date: Tue, 09 Dec 2025 12:01:51 +0100 Message-ID: <87tsxzkjfk.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: 77WX2ESKGXGQ5EVM7SYZYUX6YGB2IFLM X-Message-ID-Hash: 77WX2ESKGXGQ5EVM7SYZYUX6YGB2IFLM 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/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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaTgBnwAKCRCZddwkt31p FXAIAP9vBtkwOqG44xZwn6QqQfopKavhwS/3DDP8O1AZF2kF2QD+IOhGmcoY4HE3 QeqzkCYVY2NIRpC1UDyWHFy/ovF+Lgc= =mwB9 -----END PGP SIGNATURE----- --=-=-=--