From nobody Sun Dec 14 05:52:16 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1754569048; cv=none; d=zohomail.com; s=zohoarc; b=Beb4PoM4MdldbNW4QFeGCLN0vN7iwBDfc0AZmXF5zlIRqtCP9IDs6sEnsJ0EJSz0sCJvvHjsdxEjkutfwHeCMZQ3FpJ5+sQAtOxUDP7b1JqWFWrOO0ItKI0xNk6D4QsWJbyOAN9SDJBe8lEg1SPHuSdZlMwNSrAOOjcKQUt5ZNU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1754569048; 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=NkzQ0nQZi6jzjIYuY/uNNXq9hXgJSR6Kl4jyPabow/A=; b=AoUtf1Nr6+gT0HLor1yKLoxVKLWrLSBUQqn78mAVnUy9wcGmg7a/urOFmqY747K2YxgpXG2iYra6wJD+2Gr5bLXoW/XfzD/miszDjcesSjbxKEU5j1cfFPPaeKZiuEVVhrXFfLy7cFXtIN3IPBIUdNVax2mus/Uo9mOnW/Nh2FU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1754569048373622.4878726248326; Thu, 7 Aug 2025 05:17:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ujzRr-0001UP-S2; Thu, 07 Aug 2025 08:10:20 -0400 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 1ujzR1-0007g0-KG; Thu, 07 Aug 2025 08:09:33 -0400 Received: from mgamail.intel.com ([192.198.163.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujzQz-000545-7L; Thu, 07 Aug 2025 08:09:27 -0400 Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2025 05:09:24 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by orviesa009.jf.intel.com with ESMTP; 07 Aug 2025 05:09:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1754568565; x=1786104565; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yIyWt4frlWBRZfRYC5czZ1MuxO6aMa3aYBG309ggo+g=; b=AKT0nR7/6KF+lZnCFSEYmDi8KsyfYgSzk6NaChS70ROQBPsh4S/WRfaC +tZsxMIHuorf7wJx7/M1CJvzPXsGN8ZYQXAYG4JCgEdMTI3odI9Cd12by 5ZVXo7R0NSpFUBkA48Uh9THpe+bo6JRt5HzadpQfMfchKQcyMct1VpNY8 sWWM7+WPfCyn9vqaOb59aUU35RSSsgV+J3hrbqPlnpZCAi6AqFXSS8Uxj LUPy7ZC5j9ikKuBS0P371+TrBG1avS/rhD/Esy9UU4V0fcQMN69TQmas+ AasZROKOX0rUS458RkpW/rKmwKXS+tWULLsgGHaxiJm3WvA4ar3dPg/JL A==; X-CSE-ConnectionGUID: pbSJd+QqQ5unHkP1IUFxfw== X-CSE-MsgGUID: KgXoTuIYRiWU/UbualkHNQ== X-IronPort-AV: E=McAfee;i="6800,10657,11514"; a="57036750" X-IronPort-AV: E=Sophos;i="6.17,271,1747724400"; d="scan'208";a="57036750" X-CSE-ConnectionGUID: 0O4Z1IR6SNC7izHb9utTTA== X-CSE-MsgGUID: sGZdusAiQvOhxX02QszuTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,271,1747724400"; d="scan'208";a="164701086" From: Zhao Liu To: Paolo Bonzini , Peter Xu , David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Junjie Mao Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org, Dapeng Mi , Chuanxiao Dong , Zhao Liu Subject: [RFC 07/26] subprojects: Add winapi crate Date: Thu, 7 Aug 2025 20:30:08 +0800 Message-Id: <20250807123027.2910950-8-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250807123027.2910950-1-zhao1.liu@intel.com> References: <20250807123027.2910950-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=192.198.163.15; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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.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 @intel.com) X-ZM-MESSAGEID: 1754569049234116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Zhao Liu --- scripts/archive-source.sh | 3 +- scripts/make-release | 3 +- subprojects/.gitignore | 1 + .../packagefiles/winapi-0.3-rs/meson.build | 46 +++++++++++++++++++ subprojects/winapi-0.3-rs.wrap | 10 ++++ 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 subprojects/packagefiles/winapi-0.3-rs/meson.build create mode 100644 subprojects/winapi-0.3-rs.wrap diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 4caf6078f1ac..99d0d898d010 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -32,7 +32,8 @@ subprojects=3D"keycodemapdb libvfio-user berkeley-softflo= at-3 libc-0.2-rs proc-macro2-1-rs proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs syn-2-rs thiserror-1-rs thiserror-impl-1-rs unicode-ident-1-rs - winapi-i686-pc-windows-gnu-0.4-rs winapi-x86_64-pc-windows-gnu-0.4-rs" + winapi-0.3-rs winapi-i686-pc-windows-gnu-0.4-rs + winapi-x86_64-pc-windows-gnu-0.4-rs" sub_deinit=3D"" =20 function cleanup() { diff --git a/scripts/make-release b/scripts/make-release index eb8b2446ad3a..c53dfa0a7f4f 100755 --- a/scripts/make-release +++ b/scripts/make-release @@ -45,7 +45,8 @@ SUBPROJECTS=3D"libvfio-user keycodemapdb berkeley-softflo= at-3 libc-0.2-rs proc-macro2-1-rs proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs syn-2-rs thiserror-1-rs thiserror-impl-1-rs unicode-ident-1-rs - winapi-i686-pc-windows-gnu-0.4-rs winapi-x86_64-pc-windows-gnu-0.4-rs" + winapi-0.3-rs winapi-i686-pc-windows-gnu-0.4-rs + winapi-x86_64-pc-windows-gnu-0.4-rs" =20 src=3D"$1" version=3D"$2" diff --git a/subprojects/.gitignore b/subprojects/.gitignore index ed51f2012e2c..c42adaa928ec 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -22,5 +22,6 @@ /thiserror-1.0.65 /thiserror-impl-1.0.65 /unicode-ident-1.0.12 +/winapi-0.3.9 /winapi-i686-pc-windows-gnu-0.4.0 /winapi-x86_64-pc-windows-gnu-0.4.0 diff --git a/subprojects/packagefiles/winapi-0.3-rs/meson.build b/subprojec= ts/packagefiles/winapi-0.3-rs/meson.build new file mode 100644 index 000000000000..e2cee17ec2d5 --- /dev/null +++ b/subprojects/packagefiles/winapi-0.3-rs/meson.build @@ -0,0 +1,46 @@ +project('winapi-0.3-rs', 'rust', + meson_version: '>=3D1.5.0', + version: '0.3.9', + license: 'MIT OR Apache-2.0' +) + +if host_machine.cpu_family() =3D=3D 'x86_64' + winapi_arch =3D 'winapi-x86_64-pc-windows-gnu-0.4-rs' +elif host_machine.cpu_family() =3D=3D 'x86' + winapi_arch =3D 'winapi-i686-pc-windows-gnu-0.4-rs' +else + error('Unsupported CPU family for winapi: ' + host_machine.cpu_family()) +endif + +subproject(winapi_arch, required: true) +winapi_arch_dep =3D dependency(winapi_arch) + +winapi_features =3D [ + '--cfg', 'feature=3D"errhandlingapi"', + '--cfg', 'feature=3D"sysinfoapi"', + '--cfg', 'feature=3D"excpt"', + '--cfg', 'feature=3D"minwinbase"', + '--cfg', 'feature=3D"ntstatus"', + '--cfg', 'feature=3D"winnt"', + '--cfg', 'feature=3D"basetsd"', + '--cfg', 'feature=3D"ktmtypes"', + '--cfg', 'feature=3D"minwindef"', + '--cfg', 'feature=3D"ntdef"', + '--cfg', 'feature=3D"guiddef"', + '--cfg', 'feature=3D"vcruntime"' +] + +lib =3D static_library( + 'winapi', + 'src/lib.rs', + override_options : ['rust_std=3D2021'], + rust_abi : 'rust', + rust_args: ['--cap-lints', 'allow'] + winapi_features, + dependencies: [winapi_arch_dep] +) + +dep =3D declare_dependency( + link_with: lib, +) + +meson.override_dependency('winapi-0.3-rs', dep) diff --git a/subprojects/winapi-0.3-rs.wrap b/subprojects/winapi-0.3-rs.wrap new file mode 100644 index 000000000000..49a5954ec225 --- /dev/null +++ b/subprojects/winapi-0.3-rs.wrap @@ -0,0 +1,10 @@ +[wrap-file] +directory =3D winapi-0.3.9 +source_url =3D https://crates.io/api/v1/crates/winapi/0.3.9/download +source_filename =3D winapi-0.3.9.tar.gz +source_hash =3D 5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b= 00f419 +#method =3D cargo +patch_directory =3D winapi-0.3-rs + +# bump this version number on every change to meson.build or the patches: +# v2 --=20 2.34.1