From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sipsolutions.net (s3.sipsolutions.net [144.76.43.62]) (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 1ABC870 for ; Tue, 20 Jul 2021 07:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: 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=4mUT5rWlwn1kOb/3Tu1/H0isX2faAZyxrEyzWsb8lhA=; t=1626764974; x=1627974574; b=kskB9PcFwu/j3lx9Uf8C0cxxiSKmE3lU0lXUhQd4TVsq8v/ PNQXGKONwuaPGJiwSJ2hFu9D2uxyN+9/XGqVXFEDPScAXbuJaEbjQerm+w6uMZS4uOLRvyFBaMQXY x5BE0N3pO9vMFj72R0v0rlbcNngNWoofL7lYtbuv2N6lt9YS+zwIev/n8WgRh3PykOfXPV+97XcJS HzgA28hy4AnUQUqt12kgOgwBtBEyzsW7yaAsdBD8EtlkwwfGBdTrz2uvfXz9+F0dU6tWf3GH2Plvp l+AiVg15/5R5wWc071vzJI/MvDbbbispSlFtz+yGLFOPdZKXbNSSzaGdkw5mGpJQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1m5jTS-004gFn-9R; Tue, 20 Jul 2021 08:43:27 +0200 Message-ID: Subject: Re: [TECH TOPIC] Rust for Linux From: Johannes Berg To: Miguel Ojeda , Arnd Bergmann Cc: Linus Walleij , Wedson Almeida Filho , Greg KH , Bartosz Golaszewski , Kees Cook , Jan Kara , James Bottomley , Julia Lawall , Laurent Pinchart , Roland Dreier , ksummit@lists.linux.dev, Viresh Kumar Date: Tue, 20 Jul 2021 08:43:22 +0200 In-Reply-To: References: <20210707203827.GI18396@quack2.suse.cz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) Precedence: bulk X-Mailing-List: ksummit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned On Tue, 2021-07-20 at 03:46 +0200, Miguel Ojeda wrote: > On Mon, Jul 19, 2021 at 11:33 PM Arnd Bergmann wrote: > > > > I'm worried that this makes things harder to grep for, and to document, > > when the same structure is used in both Rust and C. > > For the former, by grepping you should find the Rust abstractions that > use the C structures, because binding generation does not change the > names or their case. Of course, the Rust abstractions on top of that > is a different matter, but those do not exist in C anyway. So, at > least for the use case of searching Rust abstractions that use a given > C structure or API, it should be fine. Keep in mind though that there are at least two different use cases for grep: 1) I need to change the API here, need to find all the users - I agree this is covered here. 2) I need to change the semantics (e.g. locking) and for this I need to find all the users and analyse their use (e.g. locking-wise), which now becomes an exercise in digging through the abstractions and doing a kind of "indirect" grep for the next level. Not that this doesn't exist today (e.g. some netlink APIs I changed in the past have some abstractions in some subsystems), but it does make it more complex. johannes