Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp812619lqb; Fri, 15 Mar 2024 07:12:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNI0wHS3VX4U7gZi8OGkFKbk0EjTSvDaaNjwLRS4S3TiJHYz6PDJ/p9LXAOyHpT54JTOF1jarH4elRfhJcaNG1QhH9DUtsZjPwyk8qfg== X-Google-Smtp-Source: AGHT+IH2HDn6K6ISFtLK3Gd/lYX1BjlacXHZ3wyqnXOL9CXjVB4BQhZlu1qPw2GhACim5kV+J6au X-Received: by 2002:a5d:8902:0:b0:7c8:b470:74af with SMTP id b2-20020a5d8902000000b007c8b47074afmr3579977ion.8.1710511946611; Fri, 15 Mar 2024 07:12:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710511946; cv=pass; d=google.com; s=arc-20160816; b=jx6l10BQvRlQm7rUzG4oXRAPl43CdvNLBXWGoD7A6wwvAUQx70ghNa+37HdLjlItTr IGK1z/lCe87GAbk8yXlgx+J0fDk1N0Gk6sQWacpTK6/FTE0Q+3/Znq0fOcgm1WctI3e9 /npOLHLZcHDFyNwnKlg6WGERoFQnRdYAMBwdGQosqJ7KFPIn86aKHPYGCgCZMklHFyFO 0FRHINa3bPph63AJtsvZe20IVJFJ+XWZmLkHJC23L3jDuJlOUqPH67cyi+gqScT63k1j LXC2C4MkAfLcJO/hVR+/y3Lznh95+ipdk5mwpKYL6RBzSymMkFCIIT5jzDdd7VDvanqg V9Ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=PyFfX2uCch2/EAvx8/2qfWz35TKluRnYnWc6BnNUd0I=; fh=oUeFJyoW8GxP50XeYuqfkkodmgnHolGyPAlNEwwBFKE=; b=zkCFMnEfWu2e79hBQj0uVh5Mp+OKRA16MnHjPdpPX+Uy/YDRqZrFbgxWxPkEqV8z0G 1NTLy0XmNpK78EW4xHHD8sbczVj6ZClw6qSWPP4HoU8tZsz7Jl01iREhAjOZ89bJCfQW A67IAbQoux8/BGXQRw3poyoKws+6OLXiIvq68/CvKAAH16xOCEE4I4HE2B2dAw/rPb/v lDfEJ2pPs3y3BoRmiF3zEhXQPHS8x/fKpwuNh5MRHs0dpEV8tVAa0WvGfNDrXovl76Rs 6LJzvFLBhyfapADf11U7oMNE3Nx+dMy6ouo0n98Zz+/IjChNmTb2XwM9bJPu1JVOJOOA 7KMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=yFl2fyCm; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-104485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w2-20020a056638138200b0047732f46e65si1189313jad.128.2024.03.15.07.12.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 07:12:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=yFl2fyCm; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-104485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3D87328270A for ; Fri, 15 Mar 2024 14:12:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DB8C376F7; Fri, 15 Mar 2024 14:12:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="yFl2fyCm" Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1056637167; Fri, 15 Mar 2024 14:12:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710511937; cv=none; b=I9cHPRsXJuXbkEUzlUYHwxG/7oj8gcvV1SfQd+YhWkTwXzNQSiX7CMPOW9V9sVceveNUga6yp58B+HpF59Kqx0w3m7EMKti6EcN9FQF9+uXmHJVzLmoS59JGYEUtSlFzAUCZ6zxIXF/K0uO0N7XRXYrwFOFmT/fxfah+A0M6/Xg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710511937; c=relaxed/simple; bh=lDggbsGVPM1jhhJN1V2iUjTn/te3NkJhRIw7wWD1fBw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=E/SkCXJa/rKSEGZlmLFE5agDU+U0tmEQFAElyCmAe2hK0FUTyrjmws8UCGROTw9GivrcT0OSJhgP7vF0ydx5eDxnyqU1YRNavP5uVFDjZkQQpOzn1j2cstje7HFqx/K/GspUEUNf4nR9JS1Iw7z0rgu7LHoMrllmKf/GL5NR1oA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=yFl2fyCm; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=PyFfX2uCch2/EAvx8/2qfWz35TKluRnYnWc6BnNUd0I=; t=1710511935; x=1711721535; b=yFl2fyCmK7OeTFI4awpLGOED4bf6dhznOM8Pl5YG0rEzNxd CBNYd1pG6fHq36KF61FgiPMEEWATPF3c9E0mmU+2lxWHLUpCgtsTlRkXn9mWYEGfMVr1X+lqjWH2w XzvL+7vGCH3REdt2qHCv8knwr4YnIEqcJhlKUVgx/ZTDNnXB//YJoQLfbmNMayiEojLO28K6pNBus pwuIkJs/x4gCvkfgHswdRnHc/7Zp90uNIui7lZrcPpMA4ReCEDaaTuFgcQ+9B+GueHKTabFlFjI7n BlW6VbcL5VxOP4a0YUK8Rz1oq+82eAAWm4Jb3kWiWrz3mRllLZMpgtoh7GHmMq4Q==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rl7r8-00000000LJF-0jgH; Fri, 15 Mar 2024 14:44:18 +0100 Message-ID: <66994d628df70a5ff535908efc16568d3a5a4c80.camel@sipsolutions.net> Subject: Re: [RFC PATCH v3 0/2] rust: crates in other kernel directories From: Johannes Berg To: Martin Rodriguez Reboredo , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?ISO-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Date: Fri, 15 Mar 2024 14:44:16 +0100 In-Reply-To: <20231104211213.225891-1-yakoyoku@gmail.com> References: <20231104211213.225891-1-yakoyoku@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned Hi, So I realize this is an old patch, but I didn't find another version, and discussions seemed ongoing at least a month ago. I also came across it pretty randomly. Anyway, question: > If you want to use a crate with your Rust module just add a `rust-libs` > variable in your Makefile with a value of the relative directory of > said crate plus its name, e.g. >=20 > # Link with the foo crate > rust-libs +=3D ../path/to/foo Should this perhaps be relative to the kernel's root dir instead?=C2=A0 If I'm reading this correctly, then a hypothetical rust wireless driver that lives in drivers/net/wireless/// using some wireless rust infrastructure would probably end up with something like rust-libs +=3D ../../../../../net/mac80211/rust/ or whatever, which seems rather odd vs. rust-libs +=3D net/mac80211/rust/ Seems to me that chances are that subsystems/drivers that have rust infrastructure will not necessarily have them close to each other, like in this example? You have this in the sample too: +rust-libs :=3D ../../drivers/usb/core/usb but it's less pronounced since it's just samples/rust/ :) johannes