From patchwork Tue Apr 2 16:04:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Pierre De Jesus Diaz X-Patchwork-Id: 62557 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BEE5827BBE2; Tue, 2 Apr 2024 17:11:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D31FA27BBEA for ; Tue, 2 Apr 2024 17:11:44 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrgib-0006y5-GC; Tue, 02 Apr 2024 12:10:37 -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 1rrgiI-0006hW-U3 for guix-patches@gnu.org; Tue, 02 Apr 2024 12:10:21 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrgiH-0007Hw-8V for guix-patches@gnu.org; Tue, 02 Apr 2024 12:10:18 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrgiL-00076s-1f; Tue, 02 Apr 2024 12:10:21 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70146] [PATCH 095/147] gnu: Add rust-wasmtime-18. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Tue, 02 Apr 2024 16:10:21 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70146 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70146@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ , Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 70146-submit@debbugs.gnu.org id=B70146.171207421827278 (code B ref 70146); Tue, 02 Apr 2024 16:10:21 +0000 Received: (at 70146) by debbugs.gnu.org; 2 Apr 2024 16:10:18 +0000 Received: from localhost ([127.0.0.1]:55563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrgiF-000757-NN for submit@debbugs.gnu.org; Tue, 02 Apr 2024 12:10:17 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:47247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrggD-0006bh-Mn for 70146@debbugs.gnu.org; Tue, 02 Apr 2024 12:08:11 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-34339f01cd2so3186344f8f.2 for <70146@debbugs.gnu.org>; Tue, 02 Apr 2024 09:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundation.xyz; s=google; t=1712074080; x=1712678880; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T3VKV/wWYOvq6otV2O1DAOwKoMzivcBLwLGqtYbpfk4=; b=VpeuYL8XM0xHQtxkNdY0w9CbzNeVgoTSK99thumlydwS0gsnyFBlvj9U5BkuBC5Vfy pXq/AUlwsBChuXbHhfuIaqxdlYmGGpY/c2/lRHkDMowIABIXi+tm7caYuEpUTRWf8ZE0 /hUOU79YgAkgxykfuEGgS557/R7GrjZagueKRsGthinBvjpoXjss952wif3SdqnVRoPM n6apEWMIA6XmhUJbEoXLvRN5c00R/ZYKz54VAnwmMJVArFF28ICIGyZS/8ruqh0IS5pS C+G5V+jsfa3SdaYU2L1hUcI4cRVQ/ABr/exZCNuX4aC/1uJN0dneB7ILJKSG7HoHmhPp Goag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712074080; x=1712678880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T3VKV/wWYOvq6otV2O1DAOwKoMzivcBLwLGqtYbpfk4=; b=Y3rXspKX5+Fh73VYFWyaKFx1PJj/KGpyf/qh8a5c80YT0B4TnrhBGdieFVNph33MR1 fCun4yZid62EiYN5VCR5Xt/UONi9JRmnJE9L31C7G2udHF5YA11euwMEWlgsvLt4xxN7 BPeoz9LO/8cqxysr8zKXgAAKdc+adcwk9iRNuV8oXY2F8ur4PwfzRae03raOawmNu1nj j3U+CLKsEdNvYHZu17Ik5FFYBNdXD6mn8R5lm/nfPx7zyaSEFkUeAxRpKvT5hJbWFEjW Ud+/Uahh0/jkYk5+K+/lCbEp0xdETmfFQocF7ka1RIpSyLqyOM11PfE3wzQ39MwJAzw4 k+Wg== X-Gm-Message-State: AOJu0YzJFPW7OJHvroXJGnU5foIwmfa5Dbicm0XdPhAJMKY7S7icPN9e cNTonSIa+yMZVJLaNaf169xfrdL+7XqAZuIZbC1VnvMdT7rOSiUkF/wttCxQNte2NUnyj4ReP1g o X-Google-Smtp-Source: AGHT+IEPSM7kL5bhEvOnpAYzZGkswU9IAcbeXg1Rtah7buD/0NEA+Ce99xJtfIBXxvS3xM3sG2Z2kg== X-Received: by 2002:a5d:4e48:0:b0:343:354a:88f8 with SMTP id r8-20020a5d4e48000000b00343354a88f8mr135685wrt.67.1712074080036; Tue, 02 Apr 2024 09:08:00 -0700 (PDT) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id bh8-20020a05600005c800b0033e7a102cfesm8261928wrb.64.2024.04.02.09.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 09:07:59 -0700 (PDT) From: Jean-Pierre De Jesus DIAZ Date: Tue, 2 Apr 2024 18:04:47 +0200 Message-ID: <0627c13a59a7369a23f0d25db92411d6560e33e7.1712070308.git.jean@foundation.xyz> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch: New patch. * gnu/packages/crates-io.scm (rust-wasmtime-18): New variable. * gnu/local.mk (dist_patch_DATA): Add rust-wasmtime-18-remove-ittapi.patch. Change-Id: I359b25ceebdd2abf8b6589c1f715a7fdc5981c39 --- gnu/local.mk | 1 + gnu/packages/crates-io.scm | 59 +++++++++++++++++++ .../rust-wasmtime-18-remove-ittapi.patch | 46 +++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch diff --git a/gnu/local.mk b/gnu/local.mk index f2b480bded..dd505b0654 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2024,6 +2024,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-rspec-1-remove-clippy.patch \ %D%/packages/patches/rust-trash-2-update-windows.patch \ + %D%/packages/patches/rust-wasmtime-18-remove-ittapi.patch \ %D%/packages/patches/rust-webbrowser-remove-unsupported-os.patch \ %D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \ %D%/packages/patches/rw-igraph-0.10.patch \ diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 9724c4bd07..5cd8e0cd38 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -78571,6 +78571,65 @@ (define-public rust-wasmprinter-0.2 WebAssembly binary format to the text format.") (license license:asl2.0))) ;; With the LLVM exception. +(define-public rust-wasmtime-18 + (package + (name "rust-wasmtime") + (version "18.0.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "wasmtime" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0x4p8kwlix5qdixzvwmspz40yvz40dxwqbg282wvrlb35p9df1l1")) + (patches + (search-patches "rust-wasmtime-18-remove-ittapi.patch")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ;; use of undeclared crate or module `wasi_common`. + #:cargo-inputs + (("rust-addr2line" ,rust-addr2line-0.21) + ("rust-anyhow" ,rust-anyhow-1) + ("rust-async-trait" ,rust-async-trait-0.1) + ("rust-bincode" ,rust-bincode-1) + ("rust-bumpalo" ,rust-bumpalo-3) + ("rust-cfg-if" ,rust-cfg-if-1) + ("rust-encoding-rs" ,rust-encoding-rs-0.8) + ("rust-fxprof-processed-profile" ,rust-fxprof-processed-profile-0.6) + ("rust-gimli" ,rust-gimli-0.28) + ("rust-indexmap" ,rust-indexmap-2) + ("rust-libc" ,rust-libc-0.2) + ("rust-log" ,rust-log-0.4) + ("rust-object" ,rust-object-0.32) + ("rust-once-cell" ,rust-once-cell-1) + ("rust-paste" ,rust-paste-1) + ("rust-rayon" ,rust-rayon-1) + ("rust-rustix" ,rust-rustix-0.38) + ("rust-serde" ,rust-serde-1) + ("rust-serde-derive" ,rust-serde-derive-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-target-lexicon" ,rust-target-lexicon-0.12) + ("rust-wasm-encoder" ,rust-wasm-encoder-0.41) + ("rust-wasmparser" ,rust-wasmparser-0.121) + ("rust-wasmtime-cache" ,rust-wasmtime-cache-18) + ("rust-wasmtime-component-macro" ,rust-wasmtime-component-macro-18) + ("rust-wasmtime-component-util" ,rust-wasmtime-component-util-18) + ("rust-wasmtime-cranelift" ,rust-wasmtime-cranelift-18) + ("rust-wasmtime-environ" ,rust-wasmtime-environ-18) + ("rust-wasmtime-fiber" ,rust-wasmtime-fiber-18) + ("rust-wasmtime-jit-debug" ,rust-wasmtime-jit-debug-18) + ("rust-wasmtime-jit-icache-coherence" + ,rust-wasmtime-jit-icache-coherence-18) + ("rust-wasmtime-runtime" ,rust-wasmtime-runtime-18) + ("rust-wasmtime-winch" ,rust-wasmtime-winch-18) + ("rust-wat" ,rust-wat-1) + ("rust-windows-sys" ,rust-windows-sys-0.52)) + #:cargo-development-inputs (("rust-tempfile" ,rust-tempfile-3)))) + (home-page "https://github.com/bytecodealliance/wasmtime") + (synopsis "High-level API to expose the Wasmtime runtime") + (description "High-level API to expose the Wasmtime runtime") + (license license:asl2.0))) ;; With LLVM exception. + (define-public rust-wasmtime-asm-macros-18 (package (name "rust-wasmtime-asm-macros") diff --git a/gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch b/gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch new file mode 100644 index 0000000000..b6371dbb87 --- /dev/null +++ b/gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch @@ -0,0 +1,46 @@ +SPDX-FileCopyrightText: © 2024 Foundation Devices, Inc. +SPDX-License-Identifier: Apache-2.0 + +The Intel ITT API is a stub that doesn't provide functionality and requires a +closed source library in order to work. + +This patch removes the need for the dependency and disables the vtune module. +Index: wasmtime-18.0.3/Cargo.toml +=================================================================== +--- wasmtime-18.0.3.orig/Cargo.toml ++++ wasmtime-18.0.3/Cargo.toml +@@ -215,7 +215,6 @@ pooling-allocator = [ + profiling = [ + "dep:fxprof-processed-profile", + "dep:wasmtime-jit-debug", +- "dep:ittapi", + ] + runtime = [ + "dep:wasmtime-runtime", +@@ -227,10 +226,6 @@ wmemcheck = [ + "wasmtime-cranelift?/wmemcheck", + ] + +-[target."cfg(all(target_arch = \"x86_64\", not(target_os = \"android\")))".dependencies.ittapi] +-version = "0.4.0" +-optional = true +- + [target."cfg(target_os = \"linux\")".dependencies.rustix] + version = "0.38.21" + features = ["thread"] +Index: wasmtime-18.0.3/src/profiling_agent.rs +=================================================================== +--- wasmtime-18.0.3.orig/src/profiling_agent.rs ++++ wasmtime-18.0.3/src/profiling_agent.rs +@@ -31,8 +31,9 @@ cfg_if::cfg_if! { + // Note: VTune support is disabled on windows mingw because the ittapi crate doesn't compile + // there; see also https://github.com/bytecodealliance/wasmtime/pull/4003 for rationale. + if #[cfg(all(feature = "profiling", target_arch = "x86_64", not(any(target_os = "android", all(target_os = "windows", target_env = "gnu")))))] { +- mod vtune; +- pub use vtune::new as new_vtune; ++ pub fn new_vtune() -> Result> { ++ bail!("VTune support disabled at compile time."); ++ } + } else { + pub fn new_vtune() -> Result> { + if cfg!(feature = "vtune") {