GNU bug report logs - #68910
[PATCH] gnu: Add wasmedge.

Previous Next

Package: guix-patches;

Reported by: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>

Date: Sat, 3 Feb 2024 17:28:01 UTC

Severity: normal

Tags: moreinfo, patch

Full log


View this message in rfc822 format

From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
To: 68910 <at> debbugs.gnu.org
Subject: [bug#68910] [PATCH v2] gnu: Add wasmedge.
Date: Fri,  1 Mar 2024 22:04:58 +0800
* gnu/packages/web.scm (wasmedge): New variable.

Change-Id: I62a5bbe0e228f0b743bee4d55c4948c61bbfc969
---
 gnu/packages/web.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 9ded719e71..fae562d3e8 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -66,6 +66,7 @@
 ;;; Copyright © 2023 Felix Lechner <felix.lechner <at> lease-up.com>
 ;;; Copyright © 2023 Evgeny Pisemsky <evgeny <at> pisemsky.com>
 ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2024 Zheng Junjie <873216071 <at> qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -171,6 +172,8 @@ (define-module (gnu packages web)
   #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages lsof)
   #:use-module (gnu packages lua)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages logging)
   #:use-module (gnu packages mail)
   #:use-module (gnu packages man)
   #:use-module (gnu packages markup)
@@ -1782,6 +1785,61 @@ (define-public wasm-micro-runtime
 features.")
     (license license:asl2.0)))
 
+
+(define wasmedge-unittest
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/second-state/WasmEdge-unittest")
+          (commit "wasm-dev-0.13.0")))
+    (file-name
+     (git-file-name "WasmEdge-unittest" "wasm-dev-0.13.0"))
+    (sha256
+     (base32
+      "05nbwci836g0fr7p90v0p94166j7hbxhcw996xv20pywwblf73vl"))))
+
+(define-public wasmedge
+  (package
+    (name "wasmedge")
+    (version "0.13.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/WasmEdge/WasmEdge")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1l5rr0rma6n17d2khgac79azqjc9sl3r0vljjzc1aw9hhalmm895"))))
+    (build-system cmake-build-system)
+    (native-inputs (list googletest simdjson))
+    (inputs (list llvm-17 lld-17 spdlog))
+    (arguments
+     (list
+      #:configure-flags #~(list "-DWASMEDGE_BUILD_TESTS=ON")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'unpack-unittest
+            (lambda _
+              (substitute* "test/spec/CMakeLists.txt"
+                (("GIT_REPOSITORY https://github.com/second-state/WasmEdge-unittest")
+                 (string-append "URL file://" #$wasmedge-unittest))
+                (("GIT_TAG.*") ""))))
+          (add-before 'configure 'disable-test
+            (lambda _
+              ;; this test require network
+              (substitute* "test/host/socket/CMakeLists.txt"
+                (("add_test\\(wasiSocketTests wasiSocketTests\\)")
+                 "")))))))
+    (home-page "https://wasmedge.org/")
+    (synopsis "High performance WebAssembly Virtual Machine")
+    (description
+     "WasmEdge is a lightweight, high-performance, and extensible
+WebAssembly runtime for cloud native, edge, and decentralized applications.
+It powers serverless apps, embedded functions, microservices, smart contracts,
+and IoT devices.")
+    (license (list license:asl2.0 license:cc0))))
+
 (define-public websocketpp
   (package
     (name "websocketpp")

base-commit: aeaa390b71a15335bef03f83bd9dc946fa535398
-- 
2.41.0





This bug report was last modified 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.