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 X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA025C433EF for ; Wed, 8 Sep 2021 16:52:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50E1561157 for ; Wed, 8 Sep 2021 16:52:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 50E1561157 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:43052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO0oV-0004XM-4m for qemu-devel@archiver.kernel.org; Wed, 08 Sep 2021 12:52:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO0mz-0003qE-91 for qemu-devel@nongnu.org; Wed, 08 Sep 2021 12:51:09 -0400 Received: from mail.xenproject.org ([104.130.215.37]:37888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO0mx-0001fq-41 for qemu-devel@nongnu.org; Wed, 08 Sep 2021 12:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=References:In-Reply-To:Subject:Cc:To:Date :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:From; bh=p37dfBTAcVhiILFHJqKiJhySpuHQhXsAwEqNhniGVKc=; b=zT903LfnbZIogvNbqwZrKUgZEY z9tQ/5u2gTkElRzeOt7Ecvah0vCnax/gGmjUIu2v+idFbgi4iY0yYumtAVR51EakLMTjmwue6GOBD e4sXXKlc3u2gFbYNyZ/2DdugI5mdgUt+Y7omQxEiPfhrEd+7FkdkUxXb8nipxy5D5d8c=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mO0mv-0001Ro-Iz for qemu-devel@nongnu.org; Wed, 08 Sep 2021 16:51:05 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1mO0mv-0006cv-I1 for qemu-devel@nongnu.org; Wed, 08 Sep 2021 16:51:05 +0000 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.89) (envelope-from ) id 1mO0mp-0003uK-9I; Wed, 08 Sep 2021 17:50:59 +0100 From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <24888.59891.24033.552735@mariner.uk.xensource.com> Date: Wed, 8 Sep 2021 17:50:59 +0100 To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Subject: Re: [RFC v3 13/32] rust: use vendored-sources In-Reply-To: References: <20210907121943.3498701-1-marcandre.lureau@redhat.com> <20210907121943.3498701-14-marcandre.lureau@redhat.com> <24888.55565.53378.616422@mariner.uk.xensource.com> <24888.58624.549030.64132@mariner.uk.xensource.com> X-Mailer: VM 8.2.0b under 24.5.1 (i686-pc-linux-gnu) Received-SPF: pass client-ip=104.130.215.37; envelope-from=iwj@xenproject.org; helo=mail.xenproject.org X-Spam_score_int: -62 X-Spam_score: -6.3 X-Spam_bar: ------ X-Spam_report: (-6.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.922, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , "Daniel P. Berrange" , QEMU , Stefan Hajnoczi , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > Yes, this is the shim to provide a C ABI QMP handler from Rust. This is where > all the FFI<->Rust conversion takes place. > > The "safe" code is qga/qmp/vcpus.rs. However, there is no > documentation there, since it's not meant to be the public > interface. It's documented with the QAPI schema. Right, thanks. That does look like a PoC of a Rust API. I wanted the rustdoc output because I find it provides a very uniform and readable presentation even of an API with no doc comments. I think maybe a thing I am missing is how you expect this to be used. Which parts of the system are going to be in Rust. etc. And that would help explain what "public" means. I think the answer is probably in this example: https://patchew.org/QEMU/20210907121943.3498701-1-marcandre.lureau@redhat.com/20210907121943.3498701-30-marcandre.lureau@redhat.com/ but although my C and Rust are both fine, I don't understand qemu well enough to make sense of it. ... wait, qga is "qemu guest agent" ? I think I am sort of seeing this use case now. But presuambly there are other use cases for this QMP/QAPI type bridge stuff. Sorry to be asking such stupid questions. Thanks, Ian.