From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50E3834DB6D for ; Fri, 17 Apr 2026 11:32:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776425578; cv=none; b=BLw/bJZLj9BOOKBmeE9H9+oS6PUbXIcJ19WdRdknM4fUgylcEAR6zN2jV0tf/g6WAEJPdeUUJ1HyhIUq0/kQGDinb2HGRgBJIeWLEhDoMDr785NpuIHW9Be2bfw4ItKMze3LbWQOlaU8Hw3FVPs77VE8JRXzC4uBADB606umIQM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776425578; c=relaxed/simple; bh=1MLbXPE06SDad6v8rlI+y7wq+rnQo7dINrAfqUW4a8M=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=f2UShi0cnc/fA4nnP0+UBlN4NXPOnO4IRKARQv5yojVI33DhWn5xFjBqBG7wIhCHJch6vTJyrq8X84P+DOA6B0kPEmiyxyPLLfxS8wi+YtKzU4KBda4odwAlr/7t0oFSszbMv50ZJl4HKKTdtyxGC8/AMBYa40mUPCRwTv3XPRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vfRHm7Lz; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vfRHm7Lz" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-43d03db814eso929632f8f.2 for ; Fri, 17 Apr 2026 04:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1776425575; x=1777030375; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=W4Ws3Fp0j5FbcqNDEVXW7kBezGoH6rxWa1ymfwLTzi8=; b=vfRHm7LzZPeyndSTwWaZvjqvfXobGyQFP8tfSYAENVxDyWRUTxInqgI/+G9ltjyYjg WnZbWgvKfgO7ZUkYM6qrrEGMNjOsUyxRkMQFtdow9BtSOvOzUmMfZ1Xn0aMYIlosOK/3 MPpEWIaeYE46Xcd8v/9PwgKPd0Igegcb62buzGX0IbV8mNpe/8E5UAIglmIEOqdZud/D Le4uCFQX7ijSmBFYWxQnwKoiEsgaRwMZACWi6CA8/9dWU3Mca8Ey5Rhy5FauYvKDWSBY tIRhbEyYTVXGqr2Tubo6ZrABSFVlty6ZiLCN9Pwy0qt5IzfRbcauw+sx0lqN3lBCdyI8 2ocg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776425575; x=1777030375; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W4Ws3Fp0j5FbcqNDEVXW7kBezGoH6rxWa1ymfwLTzi8=; b=HDcatpOMEcD7x0tCvESSgg/yp8luuPTDBPznmtJECkGyrPVLaxeA58CLxCE925HUtF Xfw/Hx+2G4o0Q/Y9HbBpvZs/B2j8KYm76lr45s5G3oTzstHEiF4jCkmA8T8nW4eN46f6 hqEjTaQ6FXFk+pCGgiGWTVUcgUJBc41ix62MdKYBFDfWlU6jMCgIC28wX+UZu/yl6ojC f840IeKPYQUDik6LUj6YuYSsTKzOdU48r0j5n9/WxrWsRGx71q2EMSlo87Y39yZVaHCQ o2AJXySgmTtEDml7lFGrOk8C3cChcaU1W54fMywCXtAZM4pn2LfodR9rNXJVhmhPdgli CQfw== X-Forwarded-Encrypted: i=1; AFNElJ8aE4eGrXzB/KDc7PZrWRNcDo02scDmkWZb5NJC25L1DYP4SYX6/MGZrIF+SF4mFrdhJNFBNHY=@vger.kernel.org X-Gm-Message-State: AOJu0YyQO1i7NHMQDd7/0W0dYF/q2/u/WVyU3rWk37ZTSD0XwSiEhy4j O8q4BULarkTlQ3Ybm5+U+m+0F2LJ6NGvafNiifcn8qkjNdPQyR322xuNuinH2NwroAarQlVxaNn YlMd16dO6XScQjRZVyA== X-Received: from wruf17.prod.google.com ([2002:a5d:4dd1:0:b0:43d:8896:b950]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2f83:b0:43c:fd7e:72eb with SMTP id ffacd0b85a97d-43fe3e144b5mr3941450f8f.41.1776425574579; Fri, 17 Apr 2026 04:32:54 -0700 (PDT) Date: Fri, 17 Apr 2026 11:32:53 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260415-binder-netlink-v3-0-84be9ba63ee2@google.com> <20260415-binder-netlink-v3-2-84be9ba63ee2@google.com> Message-ID: Subject: Re: [PATCH v3 2/4] ynl_gen: generate Rust files from yaml files From: Alice Ryhl To: Donald Hunter Cc: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Greg Kroah-Hartman , "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Christian Brauner , Carlos Llamas , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Fri, Apr 17, 2026 at 11:54:05AM +0100, Donald Hunter wrote: > On Wed, 15 Apr 2026 at 10:39, Alice Ryhl wrote: > > > > To generate netlink frames from Rust code easily, generate Rust > > libraries with methods for generating different netlink messages as > > appropriate. > > > > The new 'rust' type corresponds to a Rust version of the C target > > 'kernel'. There is no Rust version of the 'uapi' target since Rust code > > exports its uapi via C headers - choice of language is opaque to > > userspace. > > > > This logic is kept in the existing ynl_gen_c.py file to reuse CodeWriter > > and other shared pieces of logic in the existing python file. This has > > the disadvantage that the gen_c part of the name is now wrong, as it > > also generates Rust. One possible solution to this could be to rename > > the file. > > Hi Alice, > > I started a rough refactor of ynl_gen_c a while ago, so that I could > reuse CodeWriter and the gentypes in a code generator for strace > decoders. I just rebased the work to net-next/main here: > > https://github.com/donaldh/linux/tree/ynl-gen-strace > > If that looks workable for a ynl_gen_rst then I'd be happy to help > tidy it up into a patch series. That sounds convenient! Alice