{"id":2174143,"url":"http://patchwork.ozlabs.org/api/covers/2174143/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/cover/20251215075000.335043-1-pbonzini@redhat.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20251215075000.335043-1-pbonzini@redhat.com>","list_archive_url":null,"date":"2025-12-15T07:49:49","name":"[for,11.0,00/11] First batch of Meson/Rust build system changes","submitter":{"id":2701,"url":"http://patchwork.ozlabs.org/api/people/2701/?format=json","name":"Paolo Bonzini","email":"pbonzini@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/cover/20251215075000.335043-1-pbonzini@redhat.com/mbox/","series":[{"id":485356,"url":"http://patchwork.ozlabs.org/api/series/485356/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=485356","date":"2025-12-15T07:49:50","name":"First batch of Meson/Rust build system changes","version":1,"mbox":"http://patchwork.ozlabs.org/series/485356/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2174143/comments/","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=KDfGDX3w;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=cUDfn6CB;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dVC1n2dh3z1y15\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 15 Dec 2025 18:51:41 +1100 (AEDT)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vV3LR-0000VB-BG; Mon, 15 Dec 2025 02:50:13 -0500","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1vV3LP-0000Rs-IB\n for qemu-devel@nongnu.org; Mon, 15 Dec 2025 02:50:11 -0500","from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1vV3LN-0000iA-5d\n for qemu-devel@nongnu.org; Mon, 15 Dec 2025 02:50:11 -0500","from mail-wr1-f69.google.com (mail-wr1-f69.google.com\n [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-414-dzlsENvMMma6GIavcsQ4SQ-1; Mon, 15 Dec 2025 02:50:04 -0500","by mail-wr1-f69.google.com with SMTP id\n ffacd0b85a97d-430fcf10280so408712f8f.0\n for <qemu-devel@nongnu.org>; Sun, 14 Dec 2025 23:50:04 -0800 (PST)","from [192.168.10.48] ([151.95.145.106])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-42fa8b9b26fsm29771952f8f.40.2025.12.14.23.50.01\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 14 Dec 2025 23:50:01 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1765785008;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=rhRgZBDZXKiwx46WkvcU17DF2Qqr8XZ4jHsnYPyyOuY=;\n b=KDfGDX3w34ZW4Ako+PcrjoYHLHb+m7ORtcDhZ3PBO9mOHL5GtyAyY2lh9v/9Q7o63nL5jA\n +yfluBW7qvD6nU3XNunHIFb/+nop5P3BHBiqY+HphW4p/IJ0N9toJ85I2KoZ2P/CX0AFh9\n yn28M2Nu1dv6ASS4Vg9DfB4OArx2QC8=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1765785003; x=1766389803; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=rhRgZBDZXKiwx46WkvcU17DF2Qqr8XZ4jHsnYPyyOuY=;\n b=cUDfn6CB92rlH6mWTiOPYEItAqP2SzVBDjy5Gw/YhIj+cEoZ0OAraF+iNbbW7RdrEW\n Z25yFI6OnQgdBC/kWDp2c43As0jiVAqX8AL+32goMDQ/H7fvjrJFzstn5VTiBiIUUwKl\n YanjBnQax1J5FjnZ9ugVuZupZblL5xPNwE3fXXKe5t2e0L1KR7kmohN2C9Jhjyv4/B2K\n 6AJzpNpG7ougv+asCPGAB5lzvwS2T8f+xCj54ILzxM3G9/pGhlZvPaS14HEZg97u6AyM\n F2MbksZTaM620Y1MK7qvEh2c0mKVv+JGJFZpwJqylxOOFJ3lhLb8OKO2k0YsSeafwJtn\n oN1g=="],"X-MC-Unique":"dzlsENvMMma6GIavcsQ4SQ-1","X-Mimecast-MFC-AGG-ID":"dzlsENvMMma6GIavcsQ4SQ_1765785004","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1765785003; x=1766389803;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=rhRgZBDZXKiwx46WkvcU17DF2Qqr8XZ4jHsnYPyyOuY=;\n b=PDnrGiz9Tllr3FWEIQUhACRwyEhYLNEsrAFxchWUP9xtTF/ynwmuGrNpcZOJhjwdXz\n 8/6lNBo/0DWT3tkL8QUoIFmOaCWIGqtJEqlRfoOvZ8az1hUFlyIH3yDS/9oSMyR0dTYS\n LRMbA0g2Bnk9UxM4txvvUvUnKWU49EdMLIPAVdmeIxKM//xqPM8IZrFfcb/ybqQfC4Cr\n 7GESfaTZEqBUNnvuHZXELYJIV953sE0vlJ2Rp/VgSny3e2JhBD/L6m17HH7qu176MPm2\n UIlBgbk6CKHFHr+1DrRRbK+mGTIIUETE+MzMTzV3OfHuVFDhv4zzdRyDCHRai1QbQ6Xy\n 87SQ==","X-Gm-Message-State":"AOJu0Yzm1MknHI+A1Te0V/z4/qmoc6sf8xr0g8u/h815xD7WfNnAS8Zg\n CdlWVN/3utsLluZxcnQJuVSdPMB0xPkqjSs+YgJQHIQ30e98fKh98auGfFi/7012ilr4x2AVUV1\n eWxN9maeWA8xyGbGO4EPQRWTHoPD+cTEe6mqFOxlRMzYCykwniBMgXGqBGXeXCg9mvg+S0q9DSq\n SRGIoFjcPVT3tOpiPBb6C44NMkuzA/yAwv+vLvc2Tu","X-Gm-Gg":"AY/fxX49uEsd/jiyfrMw9nljGsqv7jnuQBOewBxbfi4+W8s15k47KM2ejphNyHXkZie\n sp1teiCy6395DUBZZMN64uRvTygMvW2A2etLbJX+gf87ZjIZONyZraZteTqoNCGAya7i9wu83s0\n 967LX37Bf17OUXDztZECum2kxCKyjUeiLbD1wdKn00mhvH82+DijFyCuVpLjoqCNHw00GWAxPRV\n i9fiFhRC+44iFpIkCihtS4h146Ira00QRHF0glHmmmS71Ry/wxhtHZ4LeLgd0ah0+7uiieX9jBM\n Ax1PcX3cbA9Tlf/hRPQxcg2rDBBUx/5dzP5LU9vL/KNdjS5vFH7BgEiWXKbwOO4vloqRrxZD58N\n QixXCBDbrEdA7T+XwxuJZCzH436M1TXG8YTQ7rkJYO/5tzvbGvR+y6k+swTWalIX+/6l+zvgP32\n +tcG+OxsmrZb8W7QQ=","X-Received":["by 2002:a05:6000:1848:b0:430:f97a:6f43 with SMTP id\n ffacd0b85a97d-430f97a7049mr3814573f8f.53.1765785002653;\n Sun, 14 Dec 2025 23:50:02 -0800 (PST)","by 2002:a05:6000:1848:b0:430:f97a:6f43 with SMTP id\n ffacd0b85a97d-430f97a7049mr3814541f8f.53.1765785002097;\n Sun, 14 Dec 2025 23:50:02 -0800 (PST)"],"X-Google-Smtp-Source":"\n AGHT+IHqzWkYCtIQMI05pCrS1XC2FNK/o+lp8XHVZDoel7bKB7gBh1YsDB/HKtBXjnGc+4FKCfjVyg==","From":"Paolo Bonzini <pbonzini@redhat.com>","To":"qemu-devel@nongnu.org","Cc":"qemu-rust@nongnu.org,\n\tmarcandre.lureau@redhat.com","Subject":"[PATCH for 11.0 00/11] First batch of Meson/Rust build system changes","Date":"Mon, 15 Dec 2025 08:49:49 +0100","Message-ID":"<20251215075000.335043-1-pbonzini@redhat.com>","X-Mailer":"git-send-email 2.52.0","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=170.10.133.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n SPF_HELO_PASS=-0.001,\n 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":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"By bumping the minimum supported version of Meson to 1.10.0 (at least\nwhen --enable-rust is used), C objects can be passed to Rust targets.\nThis allows to simplify the build process, and possibly also to link\nthe executables dynamically linking to Rust's libstd which makes them\nsmaller.\n\nThe major snag here is that QEMU wants to be very explicit about the order\nof libraries on the command line.  rustc has a normally useful feature\nwhere it records dependent static libraries and adds them to the linker\nautomatically, but for us it messes up libqemuutil.a's stubs mechanism.\nThis is fixed (or worked around depending on how you see it) by patches\n4 and 5.\n\nMeson 1.10.0 also contains some bugfixes such that Rust can now also be\nadded to the Windows and macOS CI jobs.  This reveals a few more bugs,\nsuch as the ones fixed in patch 1 and 8.\n\nFinally, Meson 1.10.0 improves Meson's embedded Cargo.toml/Cargo.lock\ninterpreter, but those changes are still mostly internal and the\ninterpreter cannot be used yet.  The required changes are planned for\n1.11.0; Marc-André already played with them for his GStreamer audio\nbackend, and a couple more users are hanging out and helping on the\n#meson IRC channel, too.  Once this functionality is merged, it will\nreplace a few hundreds lines of meson.build code and will make it simpler\nto add new devices.\n\nI still expect that the --enable-rust option will require bleeding\nedge Meson for a good part of next year.  However, as was the case for\nthe original switch to Meson, this will smooth out and Meson will have\nimproved much for the whole ecosystem.\n\nPaolo\n\nMarc-André Lureau (2):\n  cirrus/macos: enable Rust\n  gitlab-ci: enable rust for msys2-64bit\n\nMartin Kletzander (1):\n  rust: Do not link qemuutil into Rust rlibs\n\nPaolo Bonzini (8):\n  build: do not include @block.syms/@qemu.sys with modules disabled\n  tests/meson: do not reuse migration_files variable\n  bump meson wheel to 1.10.0\n  rust: only link the Rust part of the code into devices\n  rust: Meson now adds -Cdefault-linker-libraries\n  meson: let Meson handle mixed-language linking of Rust and C objects\n  rust: skip compilation if there are no system emulators\n  lcitool: enable Rust for Windows cross targets\n\n configure                                     |   4 +-\n meson.build                                   |  36 +++++++-----------\n .gitlab-ci.d/cirrus.yml                       |   2 +-\n .gitlab-ci.d/windows.yml                      |   7 +++-\n python/scripts/vendor.py                      |   4 +-\n python/wheels/meson-1.10.0-py3-none-any.whl   | Bin 0 -> 1057029 bytes\n pythondeps.toml                               |   4 +-\n rust/chardev/meson.build                      |   2 +-\n rust/hw/char/pl011/meson.build                |  18 +++++----\n rust/hw/timer/hpet/meson.build                |  18 ++++-----\n rust/meson.build                              |   7 ++++\n rust/qom/meson.build                          |   2 +-\n rust/util/meson.build                         |   4 +-\n scripts/rust/rust_root_crate.sh               |   1 +\n .../dockerfiles/fedora-win64-cross.docker     |   2 +\n tests/lcitool/refresh                         |   5 +--\n tests/qtest/meson.build                       |   6 +--\n 17 files changed, 64 insertions(+), 58 deletions(-)\n create mode 100644 python/wheels/meson-1.10.0-py3-none-any.whl"}