get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2174145/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2174145,
    "url": "http://patchwork.ozlabs.org/api/patches/2174145/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20251215075000.335043-8-pbonzini@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "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-8-pbonzini@redhat.com>",
    "list_archive_url": null,
    "date": "2025-12-15T07:49:56",
    "name": "[07/11] meson: let Meson handle mixed-language linking of Rust and C objects",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b10abe3a6c7f6b0f77dc38bac5f1ad06cf506764",
    "submitter": {
        "id": 2701,
        "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api",
        "name": "Paolo Bonzini",
        "email": "pbonzini@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20251215075000.335043-8-pbonzini@redhat.com/mbox/",
    "series": [
        {
            "id": 485356,
            "url": "http://patchwork.ozlabs.org/api/series/485356/?format=api",
            "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/patches/2174145/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2174145/checks/",
    "tags": {},
    "related": [],
    "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=cgFS6HPz;\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=nxk3ved4;\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 4dVC281b9lz1y15\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 15 Dec 2025 18:52:00 +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 1vV3M4-0000gy-LZ; Mon, 15 Dec 2025 02:50:54 -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 1vV3Lh-0000d8-Dr\n for qemu-devel@nongnu.org; Mon, 15 Dec 2025 02:50:31 -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 1vV3Ld-0000nA-Rg\n for qemu-devel@nongnu.org; Mon, 15 Dec 2025 02:50:29 -0500",
            "from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-658-iCYGXL3uOUSwG6_2V11GZA-1; Mon, 15 Dec 2025 02:50:23 -0500",
            "by mail-wm1-f72.google.com with SMTP id\n 5b1f17b1804b1-4779d8fd4ecso15222345e9.1\n for <qemu-devel@nongnu.org>; Sun, 14 Dec 2025 23:50:23 -0800 (PST)",
            "from [192.168.10.48] ([151.95.145.106])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-47a8f4b6e43sm65092205e9.2.2025.12.14.23.50.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 14 Dec 2025 23:50:20 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1765785025;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=vEafbVoFGYyLMte4h/94bksiLJPMQ531LWBYvtDlkGg=;\n b=cgFS6HPzt/pBY6lV0O5+E2SckP+6hVqtTUXfaoYx5xAqIvwy40lKw09NWB/7Er1tNm12Y5\n 5FQhbCciAY4zs1DXwxKdjl8MP7kpIRFof8TYN7IQhzRqZrGrNDSZ5Xv4XG0hl9VKAQquj9\n ThEQETXu1F11kwwghkO4RDmArT57W/0=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1765785021; x=1766389821; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=vEafbVoFGYyLMte4h/94bksiLJPMQ531LWBYvtDlkGg=;\n b=nxk3ved4tLYMbSKS/AsrtXqR5fmCLzO1WuapSEbB87lWf8Emx1uL0te5vNrEw8RbWS\n QkSul2O3kAJpIDtKBNLzEx/I6SnW+fDsQZtu6Rr0NML6vdX74kZj1HGJ9WQzO3Z6JRG0\n QUxRztaaY+NwLFEb+YXkRt2mA03GZvhpeJmZx6HdRUtpjNhQTDGJi0wcuQUhb5rxAMWq\n IquRS4v5Q9//patGdQAmlV7q6zGtpWbJh/RKkhJyoGD1uHCEbFaAL2KAMJMTzo/56TAc\n RhK4HOuoVILK0QRA27SL/wSZooP25akC6ANexvpB22mXCGqUmjjLmqRjsdq3LgPbevkB\n OSJg=="
        ],
        "X-MC-Unique": "iCYGXL3uOUSwG6_2V11GZA-1",
        "X-Mimecast-MFC-AGG-ID": "iCYGXL3uOUSwG6_2V11GZA_1765785023",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1765785021; x=1766389821;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=vEafbVoFGYyLMte4h/94bksiLJPMQ531LWBYvtDlkGg=;\n b=JqkhPvwHQaWmpmsjNRu11hc0b39jo49gbZmYb2353FRhCW7wguImynFHYxLf7vg9/D\n Ptr8oAmEEbK5LRVYCJgiO7ZyHbnQm5qKRXDwTPABcPO1JlJXU7FBfdlL6hhKVaZ3Jg01\n M17AeJJ/zfenNk0kyNR3KI4zBMtzex2i2tqamPlfuq5RTuD4NH2QMezIIo0fosLDOyNg\n OFhBwgobmiroyblmEE7VGakMR99CBKaEFtSKfG2PHIX8T7WO3MCFembFdTgNKiTc4Zh1\n PDpqbCIpylQI3K5Z4qe+pYJQpDED5EpImQdOUGwN3hs+Cxe+jC9OtknHZVwE5hzHyWAe\n aSqA==",
        "X-Gm-Message-State": "AOJu0YxVpdNhih2OdFD0pXAmzmx4q5rq1Zesf23nKaSYrSIwomU4DtCe\n +0WB6avZF54Evc/HJt+oZvgI7miUUUaxBU0iiA8KeRUXu3wviqfn7MT8iQ+75fkxa5vadH81qrA\n d3r1hBjk27R7VsZcZNMB5hbk76lVVrQ0VHDwyCtVk807asHAgC17beDqWKN1m646Pa3uto7RdWH\n vcKtWfxuQTL6ueu3A1jiAfYEw6qAO2n8I5Sepf3aPk",
        "X-Gm-Gg": "AY/fxX5OuGWMJ1nJfwA+Oz5r+8pd0jcmsyO0VZE64UyUGLXk/8xl0avpezabNlayhC/\n PT9CtBXIqmEZK2zqYiH5n0O1gqjY0ylYnR2J9o+mqIWuCSUAKU10PIa+Cw0dyW0OvASFKoWDh+h\n 8NK1tf5wHoJClWPgohlKtrmBdsIaAA8KsI1zjLaIVjEByizglG2DTrWRZlAknbqwkJp9tzL5iak\n c4PEkdFJxKh7n8c8FEABscK1EmJTjD1LNvxka6EeInahPBOQmK6SW1zXkS6CzQ7ZGzy8YLJGmXr\n xEfibrlbOFSdrxQvlNlSF5Bw3MuYzc9zZmTGOIPdKOgJCe2hTyDFOQZ+GCvssC2BKu3OYTAEXhF\n oi43FuO9smG9Q5mJep2J8tnK8/njiRZenjDEOJBvshqksBa9ouUEt7MCX1Dd2LPXqH2FZHlAXRf\n VCW4JcrhxY4EOmDsg=",
        "X-Received": [
            "by 2002:a05:600c:444a:b0:46e:59bd:f7e2 with SMTP id\n 5b1f17b1804b1-47a8f1c20e1mr95104535e9.11.1765785021273;\n Sun, 14 Dec 2025 23:50:21 -0800 (PST)",
            "by 2002:a05:600c:444a:b0:46e:59bd:f7e2 with SMTP id\n 5b1f17b1804b1-47a8f1c20e1mr95104345e9.11.1765785020804;\n Sun, 14 Dec 2025 23:50:20 -0800 (PST)"
        ],
        "X-Google-Smtp-Source": "\n AGHT+IHSi3cGxhN7llzfl7EE+mi08VkIniHymThWSLQFh2kluklyUzbcMleDmeBHzbbDlZgxLo37Lw==",
        "From": "Paolo Bonzini <pbonzini@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "qemu-rust@nongnu.org,\n\tmarcandre.lureau@redhat.com",
        "Subject": "[PATCH 07/11] meson: let Meson handle mixed-language linking of Rust\n and C objects",
        "Date": "Mon, 15 Dec 2025 08:49:56 +0100",
        "Message-ID": "<20251215075000.335043-8-pbonzini@redhat.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20251215075000.335043-1-pbonzini@redhat.com>",
        "References": "<20251215075000.335043-1-pbonzini@redhat.com>",
        "MIME-Version": "1.0",
        "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": "With the bump to Meson 1.10.0, C objects can be passed to rust targets.\nThis way, the Rust libstd will be added by rustc itself in its final\nlinker invocation.  Use that to eliminate the staticlib and allow\ndynamic linking with libstd (also introduced by Meson 1.9.0, but not\nfor staticlib crates due to lack of support in rustc).\n\nThe main() function is still provided by C, which is possible by\ndeclaring the main source file of the Rust executable (which is\nstill created by scripts/rust/rust_root_crate.sh) as #![no_main].\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n meson.build                     | 19 ++++++++-----------\n scripts/rust/rust_root_crate.sh |  1 +\n 2 files changed, 9 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/meson.build b/meson.build\nindex e2de3832ac3..3790cf15f51 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -4352,25 +4352,22 @@ foreach target : target_dirs\n   arch_srcs += target_specific.sources()\n   arch_deps += target_specific.dependencies()\n \n+  main_rs = []\n+  crates = []\n   if have_rust and target_type == 'system'\n     target_rust = rust_devices_ss.apply(config_target, strict: false)\n-    crates = []\n+    arch_deps += target_rust.dependencies()\n     foreach dep : target_rust.dependencies()\n       crates += dep.get_variable('crate')\n     endforeach\n     if crates.length() > 0\n-      rlib_rs = custom_target('rust_' + target.underscorify() + '.rs',\n+      main_rs = custom_target('rust_' + target.underscorify() + '.rs',\n                               output: 'rust_' + target.underscorify() + '.rs',\n                               command: [rust_root_crate, crates],\n                               capture: true,\n                               build_by_default: true,\n                               build_always_stale: true)\n-      rlib = static_library('rust_' + target.underscorify(),\n-                            structured_sources([], {'.': rlib_rs}),\n-                            dependencies: target_rust.dependencies(),\n-                            override_options: ['rust_std=2021', 'build.rust_std=2021'],\n-                            rust_abi: 'c')\n-      arch_deps += declare_dependency(link_whole: [rlib])\n+      main_rs = structured_sources(main_rs)\n     endif\n   endif\n \n@@ -4394,14 +4391,14 @@ foreach target : target_dirs\n     execs = [{\n       'name': 'qemu-system-' + target_name,\n       'win_subsystem': 'console',\n-      'sources': files('system/main.c'),\n+      'sources': [main_rs, files('system/main.c')],\n       'dependencies': [sdl]\n     }]\n     if host_os == 'windows' and (sdl.found() or gtk.found())\n       execs += [{\n         'name': 'qemu-system-' + target_name + 'w',\n         'win_subsystem': 'windows',\n-        'sources': files('system/main.c'),\n+        'sources': [main_rs, files('system/main.c')],\n         'dependencies': [sdl]\n       }]\n     endif\n@@ -4410,7 +4407,7 @@ foreach target : target_dirs\n       execs += [{\n         'name': 'qemu-fuzz-' + target_name,\n         'win_subsystem': 'console',\n-        'sources': specific_fuzz.sources(),\n+        'sources': [main_rs, specific_fuzz.sources()],\n         'dependencies': specific_fuzz.dependencies(),\n       }]\n     endif\ndiff --git a/scripts/rust/rust_root_crate.sh b/scripts/rust/rust_root_crate.sh\nindex f05b8d02108..13ef7c1be5d 100755\n--- a/scripts/rust/rust_root_crate.sh\n+++ b/scripts/rust/rust_root_crate.sh\n@@ -6,6 +6,7 @@ cat <<EOF\n // @generated\n // This file is autogenerated by scripts/rust/rust_root_crate.sh\n \n+#![no_main]\n EOF\n \n for crate in $*; do\n",
    "prefixes": [
        "07/11"
    ]
}