Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5942604rwr; Mon, 1 May 2023 13:26:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4NrUu/CyIF1A/RwIjMns0CFa60OUexE311C1ubXSld8vc3S0YYmvbuYfHtAVBn+yW4+jlx X-Received: by 2002:a17:902:e5cf:b0:1a8:11d3:6b93 with SMTP id u15-20020a170902e5cf00b001a811d36b93mr17472511plf.66.1682972760790; Mon, 01 May 2023 13:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682972760; cv=none; d=google.com; s=arc-20160816; b=nE+OwCqCorWcLkF4Rt77FOvCUf9K/RZ07RTE/cDUVmUkM78pvWX12r9HcU5ebBnofD 6XTiEWNxQoHM6JR6I6MtIGz4qcZanxEqH5bHhERX2Kg8iXYaN8XLcA59gVpsJfbXjYdL ASrArU3tz5F7Dl8hk55dpecCdxs+hlX/rSq5faNfCwZQGHpTusuk7rNjVotkrVJkP3Ac +Xj/8ELB3N7kmQGJNGwp2Faa++zoTUBLceTJDrPikUV5QIt/nmepdA8UdveRcJjJSwi/ Cb4X5zaW4pY52TwG8O+AxV/7oTOKu+gmU8miRBL9Y7e2Kwa43JaSYUFisi5U2ws2Hr2P oHcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=pbrESEfekhsjMPolhasTcArmhhrFw3yLtkwB4eep2Ek=; b=GyS1nfUIJmBIaCEyd2g7Z2BFqaBPN74/qgVvapgPz36JuPJiFNIWHHfNPFpuizblwf EB5iLoC1Kf//wFv1V9QNPu4pOmSfB6E8noNS/h+6Hi096mcnIgTUjHChBQbl8rBIevQj 1nJ+XBoDfsQkydpx+rrz5Hwtnn7EBV7aRmzQR8B+KwTa1UdpsdDHAqDqRH3bA5BLkX3m 4llBbciREJurBTREze2W1TLD32WrexQQdSj5ARaZitMC0jwe1VwWvSvDuqRYucSdzW7q yEy58lc1kKKQuk6xkoILMMgiusUbqjV4iQuNNaaeq6mxPtLr1ygzA7x29Sn8Zgipc9gD VdYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RMZMcaTl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020a170902c61200b001a6825fe670si26531609plr.6.2023.05.01.13.25.49; Mon, 01 May 2023 13:26:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RMZMcaTl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232785AbjEAUTt (ORCPT + 99 others); Mon, 1 May 2023 16:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232402AbjEAUTr (ORCPT ); Mon, 1 May 2023 16:19:47 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D1B810F8; Mon, 1 May 2023 13:19:46 -0700 (PDT) Received: from nicolas-tpx395.localdomain (unknown [IPv6:2606:6d00:15:199e::7a9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: nicolas) by madras.collabora.co.uk (Postfix) with ESMTPSA id CAF8366031D1; Mon, 1 May 2023 21:19:43 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1682972385; bh=pbrESEfekhsjMPolhasTcArmhhrFw3yLtkwB4eep2Ek=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=RMZMcaTlhP2lDPfA/lTZbV/PM/UFX+xtS+iOz+gSZmo2XFfEBRQIevK2tEX1ASUxX ANv85eA8Bh+NAN8bpFuD+E2BuszL4xqToCqLbtCEyvsnfrmeG9+e9LJHI/MzFz7LTK uMt831pr7IIBUYFMQHC9qlDuhAkR5uApJ6wpwilHe8m4hDB9SUght+LLs+txr/Y966 0JjSFzZZF/wNa/mBB03zKrf1h5kQLraG56XMBLMeiwiIF5J2qaThG1FmXKVF3LYvC6 oz4erpCGrDc92fPnE6U6TpjEhgO/DYpS6zYQKacwVZFPPU6AvbSv4lIz7E1m8eN7LC Q/IYe4zMhY9Kw== Message-ID: <75d9d50fd0e6858ee05a3f2799028b8dc846ec93.camel@collabora.com> Subject: Re: [PATCH 0/6] Initial Rust V4L2 support From: Nicolas Dufresne To: Asahi Lina , Laurent Pinchart , Daniel Almeida Cc: Miguel Ojeda , Hans Verkuil , wedsonaf@gmail.com, ojeda@kernel.org, mchehab@kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, kernel@collabora.com, Sakari Ailus Date: Mon, 01 May 2023 16:19:35 -0400 In-Reply-To: References: <20230406215615.122099-1-daniel.almeida@collabora.com> <136035a4-26df-1c14-e51e-406b4ee5fe33@xs4all.nl> <20230426003210.GA31260@pendragon.ideasonboard.com> <20230426163512.GE18120@pendragon.ideasonboard.com> <7b4ea4fc-7d73-d229-4645-366b1ea574fb@collabora.com> <20230426172539.GD2326@pendragon.ideasonboard.com> <9cf10a4d7a9eec237f5d18f79f6ae4bd031489bb.camel@collabora.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.1 (3.48.1-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mardi 02 mai 2023 =C3=A0 05:17 +0900, Asahi Lina a =C3=A9crit=C2=A0: > On 02/05/2023 05.10, Nicolas Dufresne wrote: > > Le mercredi 26 avril 2023 =C3=A0 20:25 +0300, Laurent Pinchart a =C3=A9= crit=C2=A0: > > > Hi Daniel, > > >=20 > > > On Wed, Apr 26, 2023 at 06:14:33PM +0100, Daniel Almeida wrote: > > > > Hi, > > > >=20 > > > > As I said higher up on this thread, I can maintain the Rust bits an= d > > > > help out with the issues around it. > > > >=20 > > > > IMHO, we should at least try this. Who knows, it might work out :) > > > >=20 > > > > Laurent, maybe we can take a piecemeal approach? Right now there ar= e no > > > > bindings for MC, but I wouldn't complain about fixing some of the C= code > > > > when the time comes. > > >=20 > > > The lifetime issues affect plain V4L2 video nodes too I'm afraid :-) > >=20 > > Everything under the bindings is unsafe code, so it does not prevent do= ing upper > > implementation and have other things be memory safe. It just make Rust = less > > helpful in some cases (I guess everything across ops). > >=20 > > There is low hanging fruit if some folks are interested. I see legitima= te > > benefit in rewriting in rust the JPEG parser, the H.264 reference list > > generator, and maybe VP9 probability update lib. AV1 driver will need a= lib to > > reduce duplicates, this could be done straight in Rust (offering a C in= terface > > of course, so it does not matter if the users are written in rust or C)= . >=20 > Unfortunately I don't think actually replacing the C implementations=20 > will be possible until Rust architecture support is on par with C, which= =20 > probably means waiting until gccrs is ready... >=20 > We could have both implementations until then (and only use the C one=20 > where Rust doesn't work), but the code duplication has an extra=20 > maintenance cost so it's not free. That's why people are mostly focusing= =20 > on drivers first instead of core code. Didn't know that, let's postpone this idea then. thanks, Nicolas >=20 > ~~ Lina >=20 >=20