Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5941380rwr; Mon, 1 May 2023 13:24:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4y7qdoeBPdSIIA84/C+HZGvGWduOuADhzJxS4lPBL77UBtYy6M3/Ej6TODrODicW/kbX8Q X-Received: by 2002:a17:902:d2d0:b0:1a9:5e33:72db with SMTP id n16-20020a170902d2d000b001a95e3372dbmr18929121plc.28.1682972661644; Mon, 01 May 2023 13:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682972661; cv=none; d=google.com; s=arc-20160816; b=K7jU56Yt9RyRtncxgVzuJvMECXRvjpffThfypeS0D/IMy7gdfiNq7zl49xMk0sxd2b yZi4o0AQSkLbRX/jn829zq8qXko97kNtQ2pZ+vcr84vzW6OstfF0Dv9if0uAUJRnzCsk oOsPyc26/tOVY3MlaQjTeHR6Q1+WsowZcgchXx/jbZSTIubitbEfHkGPfFCEwBxX1SkM 3pW/yM3TtFGOjoUgwAnhvqaMsHlVFj3GnfvoaSJFETstmmSHcPESjpecqv+s8kQTs+QN 17lqscNCIMVoNziVomOqtvKqsnAmKNtjImB7TX2WiAYOM7tgz0OPHzB0ah6EXNXqzFfL szrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=x0YWuq3rZPZQCDmWe5Bp6ftLqtBj/EGxJTpV1lAgRRA=; b=FkrSFwyT3+r/d9/Jan08G/W5ORSi9DI+Oc9rq36jvwhz5FOfbfxjkbSWcc7yaFLj/1 iuaF2rSgf8ekxroAGa92UoxhRubSoOxHJHQP8nHtBe92WmEXpcum1SNjN5w0/Dd0r59e 99raeMeX2+R1B5ffR9pI/imB2OVRryaI9t7d1jQ6ZFi1nLPf1IwRAq0xQLItJJYZUWj0 +PG2DbtO3itbItXxz+VeGdmKTWsqDoAnftuUU9AgR/h+ExtBuqOKUFweU70DkL/BJ1XY MbXNYmQ+ia7tv5cGYC4IWRlQ0iFGlenul6YPV9/HgmjdhYbSLLAgYsI4wtNBe/eerAlT Nohw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@asahilina.net header.s=default header.b=lS2wxGL2; 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=asahilina.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a170902f68d00b0019953ab9cf2si31437951plg.138.2023.05.01.13.24.09; Mon, 01 May 2023 13:24:21 -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=@asahilina.net header.s=default header.b=lS2wxGL2; 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=asahilina.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232759AbjEAURT (ORCPT + 99 others); Mon, 1 May 2023 16:17:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbjEAURS (ORCPT ); Mon, 1 May 2023 16:17:18 -0400 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA6D910F8; Mon, 1 May 2023 13:17:16 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: lina@asahilina.net) by mail.marcansoft.com (Postfix) with ESMTPSA id BFC6B426E1; Mon, 1 May 2023 20:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=asahilina.net; s=default; t=1682972234; bh=uKSNjoWR62IesN09W0W5izEEL9wBxHLTpo5DpHXnyDo=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=lS2wxGL2s0hO8Q/ngJw91j8PNukyIUEuxJD4i4MROKEYYBb69yB+LyA59TDnXjFoB RI9fTeB0GHVusEXQMjNRzHQ6ddTm4HmZT57UIdPZD8W+/CmnTJJpZ78o+qhMiaup6U WmI8nISvY29/sW0nxeKDFzmvmYmhXZI5KiKgKt1XfmW/MgicUUY7YXTGAuitHOY9+a Jj9CckpukZGu54o3Lj025ywoqoiejTVhB3RXqbWwlZMQoBRFueAegF62O9Gi+VbaR4 qERtK/QdiLm86oCcu26/ggyFkE/531xdbPrRKyPxHcR3eh1qPc2aHkDy1T+1Dg7FzK IJHg3ULEhFrrA== Message-ID: Date: Tue, 2 May 2023 05:17:08 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 0/6] Initial Rust V4L2 support To: Nicolas Dufresne , 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 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-Language: en-US From: Asahi Lina In-Reply-To: <9cf10a4d7a9eec237f5d18f79f6ae4bd031489bb.camel@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 02/05/2023 05.10, Nicolas Dufresne wrote: > Le mercredi 26 avril 2023 à 20:25 +0300, Laurent Pinchart a écrit : >> Hi Daniel, >> >> On Wed, Apr 26, 2023 at 06:14:33PM +0100, Daniel Almeida wrote: >>> Hi, >>> >>> As I said higher up on this thread, I can maintain the Rust bits and >>> help out with the issues around it. >>> >>> IMHO, we should at least try this. Who knows, it might work out :) >>> >>> Laurent, maybe we can take a piecemeal approach? Right now there are no >>> bindings for MC, but I wouldn't complain about fixing some of the C code >>> when the time comes. >> >> The lifetime issues affect plain V4L2 video nodes too I'm afraid :-) > > Everything under the bindings is unsafe code, so it does not prevent doing upper > implementation and have other things be memory safe. It just make Rust less > helpful in some cases (I guess everything across ops). > > There is low hanging fruit if some folks are interested. I see legitimate > 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 interface > of course, so it does not matter if the users are written in rust or C). Unfortunately I don't think actually replacing the C implementations will be possible until Rust architecture support is on par with C, which probably means waiting until gccrs is ready... We could have both implementations until then (and only use the C one where Rust doesn't work), but the code duplication has an extra maintenance cost so it's not free. That's why people are mostly focusing on drivers first instead of core code. ~~ Lina