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=0.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,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 31582C433F5 for ; Wed, 8 Sep 2021 16:37:00 +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 E725C60F45 for ; Wed, 8 Sep 2021 16:36:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E725C60F45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:55452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO0ZG-0001sx-Uu for qemu-devel@archiver.kernel.org; Wed, 08 Sep 2021 12:36:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO0X8-00086L-9D for qemu-devel@nongnu.org; Wed, 08 Sep 2021 12:34:46 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:45816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mO0X6-0006Qr-J1 for qemu-devel@nongnu.org; Wed, 08 Sep 2021 12:34:46 -0400 Received: by mail-wr1-x436.google.com with SMTP id n5so4165361wro.12 for ; Wed, 08 Sep 2021 09:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=05fHryxNsibzZ+BllvJWHTThc31B5HdDLqQV5pACex8=; b=QTO193MgSgBrTkmaNMfnTmnGXylQANe34FS+gK25M57qXwhAwBhV12lgvm19CUfkpy gt7uG8uyZZAaZa2LAoy6NLR1b1RJWYFzQuKIU8wc5Z9RiX4AFhKliRfFYZxHTl5VIii3 CXYpmUEDyZJr+ayFJRmcNbVEYBRgqNonEeW6Or4YhleqG6WPtKx12xXq3TwEzgqVhpbq PP0Ps3brt28OqzPcYZOTxpuJ/Ymq9x9drxPzhI7KSq0LZagAIFIOAVDgo2Aa5FSxClOl l0OYTUD70xszKfH9VMQFrhVYgcUPUsM30op60ZZM3klJ2vNUakanTpzakCyEeMi7iGmr F3nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=05fHryxNsibzZ+BllvJWHTThc31B5HdDLqQV5pACex8=; b=EjQ+FTmYAHd0kSwpejUkdd/APSMIcknX/x6gNzYIvCxMI5171PwnW72RpaxWSqbzee 23jHFrzcAfvXxv8ArMzftddnazPq9GdHRu+AyVL70nZ7cLKJR0/O70gjdnyUFAkrG/zY aAXQysEgVsckvZH9nEq+LMnC6uCyLYD9oy0S8ukryjkFwKUbXKZ1qTOl0HFe1HXGU6A0 kCIxEFRA+GqCqKF28XtOyGhQBj1tdVqvTv/gDD7swXIMgRxvdNXVtYFUftcmvA6JMotj o6JVEAycuY83mjrTJ+WVNfCWVPdVn+b4HNE0r65/8NPaonc7/OmB94DHdalP/dLSgESZ Q08Q== X-Gm-Message-State: AOAM530QK9JucE/SPNdzq1HLq5QkE7ZoCgp1lxg3wbeEcAHiSetVei4H 1VuhHi8w0s7kJk+Sorbt8UqPutWZgp/LkxDhET4= X-Google-Smtp-Source: ABdhPJxC+wx+5hpqsZeU05aAYhzPHCGz3ar8HUnGX/qhPKCH+vBv9vQcJVFIB6N/XO9KgJ4/HlteMengFSWvcL4U6Uw= X-Received: by 2002:adf:c542:: with SMTP id s2mr5201827wrf.374.1631118882950; Wed, 08 Sep 2021 09:34:42 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <24888.58624.549030.64132@mariner.uk.xensource.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 8 Sep 2021 20:34:31 +0400 Message-ID: Subject: Re: [RFC v3 13/32] rust: use vendored-sources To: Ian Jackson Content-Type: multipart/alternative; boundary="0000000000009ad15a05cb7e7544" Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=marcandre.lureau@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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" --0000000000009ad15a05cb7e7544 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Wed, Sep 8, 2021 at 8:29 PM Ian Jackson wrote: > Marc-Andr=C3=A9 Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sou= rces"): > > You can start by reading `cargo doc -p common --open`. The generated > > code needs some environment variables set, so `cargo doc -p qga` > > will fail unless you set the environment variable > > > > MESON_BUILD_ROOT=3D`pwd` cargo doc -p qga --open --document-private-ite= ms > > Thanks. I did this (and your rune from bofere) and I have the docs > open. > > I wasn't quite sure where to start. I didn't see where the > entrypoints were. I did find > > .../target/doc/qga/qmp/fn.qmp_guest_set_vcpus.html > > which err, doesn't look like the kind of safe api I was hoping to > find. > 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. --=20 Marc-Andr=C3=A9 Lureau --0000000000009ad15a05cb7e7544 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Wed, Sep 8, 2021 at 8:29 PM Ian = Jackson <iwj@xenproject.org>= ; wrote:
Marc-An= dr=C3=A9 Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources= "):
> You can start by reading `cargo doc -p common --open`. The generated > code needs some environment variables set, so `cargo doc -p qga`
> will fail unless you set the environment variable
>
> MESON_BUILD_ROOT=3D`pwd` cargo doc -p qga --open --document-private-it= ems

Thanks.=C2=A0 I did this (and your rune from bofere) and I have the docs open.

I wasn't quite sure where to start.=C2=A0 I didn't see where the entrypoints were.=C2=A0 I did find

=C2=A0.../target/doc/qga/qmp/fn.qmp_guest_set_vcpus.html

which err, doesn't look like the kind of safe api I was hoping to
find.

Yes, this is the shim to provide = a C ABI QMP handler from Rust. This is where all the FFI<->Rust conve= rsion takes place.

The "safe" code i= s qga/qmp/vcpus.rs. However, there is no do= cumentation there, since it's not meant to be the public interface. It&= #39;s documented with the QAPI schema.

--
Marc-Andr=C3=A9 Lureau
--0000000000009ad15a05cb7e7544--