From nobody Sat Apr 5 00:27:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1739310443; cv=none; d=zohomail.com; s=zohoarc; b=cbpRalLbVxJhGouyfgGDgfhEZ5aSfEImTKyVVkjqa7FIRaPT1wI3nKg3yFUe0jAenx7mh6pqwOSmAfo8taXBBIXx5EszdtoVpRhpdTN+ZbEsTosvQaqETNvqvnTuwofRJu85LGV4IMvnyvKoO7LCDWb7QPACkVuQxUOHIPiPZ3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739310443; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=51SymC/HU+zgawyXNtMurq2f2giRy+7dnTCif234KJc=; b=G38G1DSNfXxzh3EmL6aasd9XKJttZOQ5kjBjOhM8iTk1Z/qHZj5n/jexJM9Ifk8VuzYex3dQpy8sGNilIF3DpnU5f12GR1ynNuc8id9tuizUD9Xd6E0eU5ddPt+PsyiqOZenMs6TKssroocH+P4jZevJ0z8Zt2u7sMxxsRPRwuE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739310443280425.49329659343937; Tue, 11 Feb 2025 13:47:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1thy5c-0001AI-UD; Tue, 11 Feb 2025 16:46:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1thy3Q-000818-RJ for qemu-devel@nongnu.org; Tue, 11 Feb 2025 16:44:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1thy3P-0005Gr-3W for qemu-devel@nongnu.org; Tue, 11 Feb 2025 16:44:28 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-141-KFfcg90-NtaxrhZ6VhsdyQ-1; Tue, 11 Feb 2025 16:44:21 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C53E31800873; Tue, 11 Feb 2025 21:44:20 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.44.32.210]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 72B8B195608D; Tue, 11 Feb 2025 21:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739310265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=51SymC/HU+zgawyXNtMurq2f2giRy+7dnTCif234KJc=; b=cppTBfq+0GZTSxZ5tWE8MfYQ2jvLIW3vV9g3JJ7SmbB9G2QsI9cG6WDKGUrErI5dO0UZUl rTwyZVYFZ7Y+9dTtMiVKB61Qsx9jz0Ido6vgIDQXBCE0xZBLBWVlXGUeYcZakcFDMwqpEG PQsY9840qbzxDgB3BXvbEtvGt2/pReI= X-MC-Unique: KFfcg90-NtaxrhZ6VhsdyQ-1 X-Mimecast-MFC-AGG-ID: KFfcg90-NtaxrhZ6VhsdyQ_1739310260 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, hreitz@redhat.com, pbonzini@redhat.com, manos.pitsidianakis@linaro.org, qemu-devel@nongnu.org, qemu-rust@nongnu.org Subject: [PATCH 05/11] rust/block: Add empty crate Date: Tue, 11 Feb 2025 22:43:22 +0100 Message-ID: <20250211214328.640374-6-kwolf@redhat.com> In-Reply-To: <20250211214328.640374-1-kwolf@redhat.com> References: <20250211214328.640374-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1739310444064019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Kevin Wolf --- rust/Cargo.lock | 7 +++++++ rust/Cargo.toml | 1 + rust/block/Cargo.toml | 15 +++++++++++++++ rust/block/README.md | 3 +++ rust/block/meson.build | 19 +++++++++++++++++++ rust/block/src/lib.rs | 1 + rust/meson.build | 1 + 7 files changed, 47 insertions(+) create mode 100644 rust/block/Cargo.toml create mode 100644 rust/block/README.md create mode 100644 rust/block/meson.build create mode 100644 rust/block/src/lib.rs diff --git a/rust/Cargo.lock b/rust/Cargo.lock index c0c6069247..b6af988a03 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -31,6 +31,13 @@ dependencies =3D [ "syn", ] =20 +[[package]] +name =3D "block" +version =3D "0.1.0" +dependencies =3D [ + "qemu_api", +] + [[package]] name =3D "either" version =3D "1.12.0" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 5b0cb55928..777a2e9157 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -3,6 +3,7 @@ resolver =3D "2" members =3D [ "qemu-api-macros", "qemu-api", + "block", "hw/char/pl011", ] =20 diff --git a/rust/block/Cargo.toml b/rust/block/Cargo.toml new file mode 100644 index 0000000000..70ee02f429 --- /dev/null +++ b/rust/block/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name =3D "block" +version =3D "0.1.0" +edition =3D "2021" +authors =3D ["Kevin Wolf "] +license =3D "GPL-2.0-or-later" +readme =3D "README.md" +description =3D "Block backends for QEMU" +repository =3D "https://gitlab.com/qemu-project/qemu/" +publish =3D false +keywords =3D [] +categories =3D [] + +[dependencies] +qemu_api =3D { path =3D "../qemu-api" } diff --git a/rust/block/README.md b/rust/block/README.md new file mode 100644 index 0000000000..debcc9d815 --- /dev/null +++ b/rust/block/README.md @@ -0,0 +1,3 @@ +# QEMU block backends + +This library implements block drivers for QEMU. diff --git a/rust/block/meson.build b/rust/block/meson.build new file mode 100644 index 0000000000..b13c037b2f --- /dev/null +++ b/rust/block/meson.build @@ -0,0 +1,19 @@ +_block_rs =3D static_library( + 'block', + files('src/lib.rs'), + override_options: ['rust_std=3D2021', 'build.rust_std=3D2021'], + rust_abi: 'rust', + dependencies: [ + qemu_api_tools, + qemu_api_macros, + ], + rust_dependency_map: {'qemu_api_tools': 'qemu_api'}, +) + +rust_block_ss.add(if_true: [declare_dependency( + link_whole: [_block_rs], + # Putting proc macro crates in `dependencies` is necessary for Meson to = find + # them when compiling the root per-target static rust lib. + dependencies: [qemu_api_macros], + variables: {'crate': 'block'}, +)]) diff --git a/rust/block/src/lib.rs b/rust/block/src/lib.rs new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/rust/block/src/lib.rs @@ -0,0 +1 @@ + diff --git a/rust/meson.build b/rust/meson.build index 50eb23b072..d959809fda 100644 --- a/rust/meson.build +++ b/rust/meson.build @@ -1,6 +1,7 @@ subdir('qemu-api-macros') subdir('qemu-api') =20 +subdir('block') subdir('hw') =20 cargo =3D find_program('cargo', required: false) --=20 2.48.1