From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 512F0C77B7C for ; Fri, 12 May 2023 03:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239685AbjELDbo (ORCPT ); Thu, 11 May 2023 23:31:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239880AbjELDb2 (ORCPT ); Thu, 11 May 2023 23:31:28 -0400 Received: from out-50.mta0.migadu.com (out-50.mta0.migadu.com [91.218.175.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEE5F4EEC for ; Thu, 11 May 2023 20:31:27 -0700 (PDT) Date: Thu, 11 May 2023 23:31:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1683862285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mLH228QMkQsaguoaCAYbLYfCNiFUYk+oUiOp1dugLmI=; b=ncepDTUrWLJW3rAs0tp0ZjhSs16UBijk3YPBk6+YHRfkIvYgHNU8c+YfEtKVqbThTjjQYO 6e73O4BwxhdaBfBsov+RMu2/bm09Rwr8P7TAg1Puwql7EnaroPd2Qf9gAdEOlc4cbCKGfV B1B49ZNid0muK44L1q+7sqlME1wvvXo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: TruongSinh Tran-Nguyen Cc: Miguel Ojeda , rust-for-linux@vger.kernel.org, Wedson Almeida Filho , linux-bcachefs@vger.kernel.org, Andreas Hindborg Subject: Re: [PATCH] chore(util): minimal Rust build example Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: rust-for-linux@vger.kernel.org On Thu, May 11, 2023 at 04:54:34PM -0700, TruongSinh Tran-Nguyen wrote: > > If you mean UAPI in "native" Rust, then we don't provide Rust ones > > yet. We may need to wait until Rust is not an experiment anymore > > within the kernel to do something like that. > > Yes I mean UAPI in "native" Rust. If its not provided right now, and > there is a kernel module written fully in Rust, then is it recommended > to have it have `repr(c)/[no_mangle]` and use cbindgen to generate > UAPI in C (linux/*.h)? This doesn't sound like a uapi question, it sounds more like - how do we expose C interfaces from Rust? That's a good question. Do we have a sort of reverse-bindgen, that can emit a C header file for repr(c) functions?