GNU bug report logs - #61586
[PATCH RFC 0/2] Add BinaryEn

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Fri, 17 Feb 2023 20:51:02 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Thompson, David" <dthompson2 <at> worcester.edu>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 61586 <at> debbugs.gnu.org
Subject: [bug#61586] [PATCH RFC 2/2] gnu: Add binaryen.
Date: Thu, 6 Apr 2023 17:38:23 -0400
Hi Liliana,

On Fri, Feb 17, 2023 at 6:00 PM Liliana Marie Prikler
<liliana.prikler <at> gmail.com> wrote:
>
> * gnu/packages/web.scm (binaryen): New variable.
> ---
>  gnu/packages/web.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 7e49f798ea..0b509fa34c 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -1558,6 +1558,51 @@ (define-public wabt
>  other systems that want to manipulate WebAssembly files.")
>      (license license:asl2.0)))
>
> +(define-public binaryen
> +  (package
> +   (name "binaryen")
> +   (version "112")
> +   (source (origin
> +            (method git-fetch)
> +            (uri (git-reference
> +                  (url "https://github.com/WebAssembly/binaryen")
> +                  (commit (string-append "version_" version))))
> +            (file-name (git-file-name name version))
> +            (sha256
> +             (base32
> +              "0970iz22yjxgi27d67kwmrx4zq7hig3i6b92vmlp4c4bd1bacny5"))
> +            (modules '((guix build utils)))
> +            (snippet #~(begin
> +                         (substitute* "CMakeLists.txt"
> +                           (("add_subdirectory\\(third_party\\)")
> +                            "find_package(GTest)"))
> +                         (substitute* "test/gtest/CMakeLists.txt"
> +                           (("include_directory\\(.*third_pary.*\\)") ""))
> +                         (delete-file-recursively "third_party")))))
> +   (build-system cmake-build-system)
> +   (arguments
> +    (list #:out-of-source? #f ; for tests
> +          #:configure-flags #~(list "-DBUILD_LLVM_DWARF=OFF")
> +          #:phases
> +          #~(modify-phases %standard-phases
> +              (add-before 'check 'delete-failing-tests
> +                (lambda _
> +                  ;; DWARF support relies on bundling LLVM, so don't
> +                  (for-each delete-file
> +                            (find-files "test/passes"
> +                                        ".*dwarf.*\\.(bin\\.txt\|wasm)"))
> +                  (delete-file "test/unit/test_dwarf.py")))
> +              (replace 'check
> +                (lambda* (#:key tests? #:allow-other-keys)
> +                  (invoke "python" "check.py"))))))
> +   (native-inputs (list googletest node-lts python-wrapper
> +                        python-lit python-filecheck))
> +   (home-page "https://github.com/WebAssembly/binaryen")
> +   (synopsis "WebAssembly compiler")
> +   (description "Binaryen is a compiler and toolchain infrastructure library
> +written in C++, with a single-header C API as well as a Javascript API.")
> +   (license license:asl2.0)))
> +
>  (define-public wasm3
>    (package
>      (name "wasm3")
> --
> 2.39.1

This looks good to me!  We are currently using a hackier package
recipe with tests disabled in the Guile Hoot (Guile -> WASM compiler)
project: https://gitlab.com/spritely/guile-hoot-updates/-/blob/main/examples/manifest.scm#L18

Nice job getting the tests working!

- Dave




This bug report was last modified 1 year and 349 days ago.

Previous Next


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