From: Zhao Liu <zhao1.liu@intel.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Junjie Mao" <junjie.mao@hotmail.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org,
Dapeng Mi <dapeng1.mi@linux.intel.com>,
Chuanxiao Dong <chuanxiao.dong@intel.com>,
Zhao Liu <zhao1.liu@intel.com>
Subject: [RFC 07/26] subprojects: Add winapi crate
Date: Thu, 7 Aug 2025 20:30:08 +0800 [thread overview]
Message-ID: <20250807123027.2910950-8-zhao1.liu@intel.com> (raw)
In-Reply-To: <20250807123027.2910950-1-zhao1.liu@intel.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
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="keycodemapdb libvfio-user berkeley-softfloat-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=""
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="libvfio-user keycodemapdb berkeley-softfloat-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"
src="$1"
version="$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/subprojects/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: '>=1.5.0',
+ version: '0.3.9',
+ license: 'MIT OR Apache-2.0'
+)
+
+if host_machine.cpu_family() == 'x86_64'
+ winapi_arch = 'winapi-x86_64-pc-windows-gnu-0.4-rs'
+elif host_machine.cpu_family() == 'x86'
+ winapi_arch = '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 = dependency(winapi_arch)
+
+winapi_features = [
+ '--cfg', 'feature="errhandlingapi"',
+ '--cfg', 'feature="sysinfoapi"',
+ '--cfg', 'feature="excpt"',
+ '--cfg', 'feature="minwinbase"',
+ '--cfg', 'feature="ntstatus"',
+ '--cfg', 'feature="winnt"',
+ '--cfg', 'feature="basetsd"',
+ '--cfg', 'feature="ktmtypes"',
+ '--cfg', 'feature="minwindef"',
+ '--cfg', 'feature="ntdef"',
+ '--cfg', 'feature="guiddef"',
+ '--cfg', 'feature="vcruntime"'
+]
+
+lib = static_library(
+ 'winapi',
+ 'src/lib.rs',
+ override_options : ['rust_std=2021'],
+ rust_abi : 'rust',
+ rust_args: ['--cap-lints', 'allow'] + winapi_features,
+ dependencies: [winapi_arch_dep]
+)
+
+dep = 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 = winapi-0.3.9
+source_url = https://crates.io/api/v1/crates/winapi/0.3.9/download
+source_filename = winapi-0.3.9.tar.gz
+source_hash = 5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419
+#method = cargo
+patch_directory = winapi-0.3-rs
+
+# bump this version number on every change to meson.build or the patches:
+# v2
--
2.34.1
next prev parent reply other threads:[~2025-08-07 12:14 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 12:30 [RFC 00/26] rust/memory: Integrate the vm-memory API from rust-vmm Zhao Liu
2025-08-07 12:30 ` [RFC 01/26] rust/hpet: Fix the error caused by vm-memory Zhao Liu
2025-08-07 13:52 ` Paolo Bonzini
2025-08-08 7:27 ` Zhao Liu
2025-08-07 12:30 ` [RFC 02/26] rust/cargo: Add the support for vm-memory Zhao Liu
2025-08-07 12:30 ` [RFC 03/26] subprojects: Add thiserror-impl crate Zhao Liu
2025-08-07 12:30 ` [RFC 04/26] subprojects: Add thiserror crate Zhao Liu
2025-08-07 12:30 ` [RFC 05/26] subprojects: Add winapi-i686-pc-windows-gnu crate Zhao Liu
2025-08-07 12:30 ` [RFC 06/26] subprojects: Add winapi-x86_64-pc-windows-gnu crate Zhao Liu
2025-08-07 12:30 ` Zhao Liu [this message]
2025-08-07 13:17 ` [RFC 07/26] subprojects: Add winapi crate Paolo Bonzini
2025-08-08 7:33 ` Zhao Liu
2025-08-07 12:30 ` [RFC 08/26] subprojects: Add vm-memory crate Zhao Liu
2025-08-07 12:30 ` [RFC 09/26] rust: Add vm-memory in meson Zhao Liu
2025-08-07 12:30 ` [RFC 10/26] subprojects/vm-memory: Patch vm-memory for QEMU memory backend Zhao Liu
2025-08-07 13:59 ` Paolo Bonzini
2025-08-08 8:17 ` Zhao Liu
2025-08-08 8:17 ` Paolo Bonzini
2025-08-08 8:51 ` Zhao Liu
2025-08-07 12:30 ` [RFC 11/26] rust/cargo: Specify the patched vm-memory crate Zhao Liu
2025-08-07 12:30 ` [RFC 12/26] rcu: Make rcu_read_lock & rcu_read_unlock not inline Zhao Liu
2025-08-07 13:54 ` Paolo Bonzini
2025-08-08 8:19 ` Zhao Liu
2025-08-07 12:30 ` [RFC 13/26] rust: Add RCU bindings Zhao Liu
2025-08-07 12:29 ` Manos Pitsidianakis
2025-08-07 13:38 ` Paolo Bonzini
2025-08-09 7:21 ` Zhao Liu
2025-08-09 9:13 ` Paolo Bonzini
2025-08-09 9:26 ` Manos Pitsidianakis
2025-08-12 10:43 ` Zhao Liu
2025-08-12 10:31 ` Zhao Liu
2025-08-07 12:30 ` [RFC 14/26] memory: Expose interfaces about Flatview reference count to Rust side Zhao Liu
2025-08-07 12:30 ` [RFC 15/26] memory: Rename address_space_lookup_region and expose it " Zhao Liu
2025-08-07 12:30 ` [RFC 16/26] memory: Make flatview_do_translate() return a pointer to MemoryRegionSection Zhao Liu
2025-08-07 13:57 ` Paolo Bonzini
2025-08-12 15:39 ` Zhao Liu
2025-08-12 15:42 ` Manos Pitsidianakis
2025-08-13 15:12 ` Zhao Liu
2025-08-12 19:23 ` Paolo Bonzini
2025-08-13 15:10 ` Zhao Liu
2025-08-07 12:30 ` [RFC 17/26] memory: Add a translation helper to return MemoryRegionSection Zhao Liu
2025-08-07 12:30 ` [RFC 18/26] memory: Rename flatview_access_allowed() to memory_region_access_allowed() Zhao Liu
2025-08-07 12:41 ` Manos Pitsidianakis
2025-08-07 12:30 ` [RFC 19/26] memory: Add MemoryRegionSection based misc helpers Zhao Liu
2025-08-07 12:30 ` [RFC 20/26] memory: Add wrappers of intermediate steps for read/write Zhao Liu
2025-08-07 12:30 ` [RFC 21/26] memory: Add store/load interfaces for Rust side Zhao Liu
2025-08-07 12:30 ` [RFC 22/26] rust/memory: Implement vm_memory::GuestMemoryRegion for MemoryRegionSection Zhao Liu
2025-08-07 12:30 ` [RFC 23/26] rust/memory: Implement vm_memory::GuestMemory for FlatView Zhao Liu
2025-08-07 12:30 ` [RFC 24/26] rust/memory: Provide AddressSpace bindings Zhao Liu
2025-08-07 13:50 ` Paolo Bonzini
2025-08-13 14:47 ` Zhao Liu
2025-08-07 12:30 ` [RFC 25/26] rust/memory: Add binding to check target endian Zhao Liu
2025-08-07 12:44 ` Manos Pitsidianakis
2025-08-13 14:48 ` Zhao Liu
2025-08-07 12:30 ` [RFC 26/26] rust/hpet: Use safe binding to access address space Zhao Liu
2025-08-07 12:42 ` [RFC 00/26] rust/memory: Integrate the vm-memory API from rust-vmm Zhao Liu
2025-08-07 14:13 ` Paolo Bonzini
2025-08-13 14:56 ` Zhao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250807123027.2910950-8-zhao1.liu@intel.com \
--to=zhao1.liu@intel.com \
--cc=alex.bennee@linaro.org \
--cc=chuanxiao.dong@intel.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=david@redhat.com \
--cc=junjie.mao@hotmail.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).