Bug 272195

Summary: [NEW PORT] devel/wasmer WebAssembly Runtime supporting WASIX, WASI and Emscripten
Product: Ports & Packages Reporter: Krešimir Jozić <kjozic>
Component: Individual Port(s)Assignee: Mikael Urankar <mikael>
Status: Closed FIXED    
Severity: Affects Many People CC: mikael
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for new port devel/wasmer
none
Patch for new port devel/wasmer
none
[NEW PORT] devel/wasmer
none
v0
none
[NEW PORT] devel/wasmer
none
devel/wasmer: update to v4.1.1 none

Description Krešimir Jozić 2023-06-25 00:22:01 UTC
Created attachment 242980 [details]
Patch for new port devel/wasmer

Add new port devel/wasmer
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2023-07-18 09:02:38 UTC
This won't work in our builder. There is no network access during the build phase, you have to follow the porters handbook and use cargo:
6.5.6. Building Rust Applications with cargo
https://docs.freebsd.org/en/books/porters-handbook/book/#using-cargo

Can you fix the issue reported by portlint?
Comment 2 Krešimir Jozić 2023-07-23 08:00:18 UTC
Created attachment 243561 [details]
Patch for new port devel/wasmer
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2023-07-24 14:19:46 UTC
(In reply to Krešimir Jozić from comment #2)
It doesn't build:
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building for wasmer-4.0.0
gmake[1]: Entering directory '/wrkdirs/usr/ports/devel/wasmer/work/wasmer-4.0.0'
env: bash: No such file or directory
Makefile:72: *** Unrecognized platform, expect `Darwin`, `Linux` or `Windows_NT`.  Stop.
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/wasmer/work/wasmer-4.0.0'
*** Error code 1


dependency on rust at build time is not needed, USES=cargo will handle it.

pkg-plist is not needed (as reported by portlint)
Comment 4 Krešimir Jozić 2023-07-24 19:28:37 UTC
Created attachment 243595 [details]
[NEW PORT] devel/wasmer
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2023-07-25 07:45:18 UTC
same error:
===>  Building for wasmer-4.0.0
gmake[1]: Entering directory '/wrkdirs/usr/ports/devel/wasmer/work/wasmer-4.0.0'
env: bash: No such file or directory
Makefile:72: *** Unrecognized platform, expect `Darwin`, `Linux` or `Windows_NT`.  Stop.
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/wasmer/work/wasmer-4.0.0'
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2023-07-28 09:08:18 UTC
Created attachment 243664 [details]
v0

Do you know if bash is a runtime dependency?
Comment 7 Krešimir Jozić 2023-07-28 12:37:19 UTC
I use fish shell and it works well, so I think that does not matter from which shell you start it.

I run compile successfully on my machine. I'll try to setup poudriere and compile wasmer under it.
Comment 8 Krešimir Jozić 2023-07-30 20:45:35 UTC
Poudriere build fails with the same error message.

I'll have to investigate what causes gmake to fail.
Comment 9 Krešimir Jozić 2023-08-07 17:52:07 UTC
Created attachment 243942 [details]
[NEW PORT] devel/wasmer

It now compiles under poudriere.
Comment 10 commit-hook freebsd_committer freebsd_triage 2023-08-16 17:11:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f523e58dac79ce15ae4ab83b8b08b8a76139e10e

commit f523e58dac79ce15ae4ab83b8b08b8a76139e10e
Author:     Krešimir Jozić <kjozic@gmail.com>
AuthorDate: 2023-07-24 19:26:25 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-08-16 17:10:41 +0000

    devel/wasmer: Add new port

    Wasmer is a fast and secure WebAssembly runtime that enables super lightweight
    containers to run anywhere: from Desktop to the Cloud, Edge and IoT devices.

    Features:
     - Secure by default. No file, network, or environment access, unless explicitly
       enabled.
     - Supports WASIX, WASI and Emscripten out of the box.
     - Fast. Run WebAssembly at near-native speeds.
     - Embeddable in multiple programming languages
     - Compliant with latest WebAssembly Proposals (SIMD, Reference Types, Threads,

    PR:             272195

 devel/Makefile                          |    1 +
 devel/wasmer/Makefile (new)             |   32 +
 devel/wasmer/Makefile.crates (new)      |  621 +++++++++++++++
 devel/wasmer/distinfo (new)             | 1245 +++++++++++++++++++++++++++++++
 devel/wasmer/files/patch-Makefile (new) |   11 +
 devel/wasmer/pkg-descr (new)            |   11 +
 6 files changed, 1921 insertions(+)
Comment 11 Mikael Urankar freebsd_committer freebsd_triage 2023-08-16 17:12:27 UTC
Thanks!

There is a new version available, do you plan to update it?
Comment 12 Krešimir Jozić 2023-08-17 08:00:23 UTC
I made a commit there that reduces the number of build dependencies. I have to check how it works, so I'll make a patch for the new version when I'm sure it works well.
Comment 13 Krešimir Jozić 2023-08-18 19:00:05 UTC
Created attachment 244198 [details]
devel/wasmer: update to v4.1.1

devel/wasmer: update to v4.1.1
Comment 14 commit-hook freebsd_committer freebsd_triage 2023-08-21 11:38:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f53287f2fcee891223b6b95d5e69ca4999363e61

commit f53287f2fcee891223b6b95d5e69ca4999363e61
Author:     Krešimir Jozić <kjozic@gmail.com>
AuthorDate: 2023-08-18 18:57:53 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-08-21 11:30:30 +0000

    devel/wasmer: update to v4.1.1

    Changes:
      https://github.com/wasmerio/wasmer/blob/master/CHANGELOG.md#410---24072023
      https://github.com/wasmerio/wasmer/blob/master/CHANGELOG.md#411---03082023

    PR:             272195

 devel/wasmer/Makefile                    |   2 +-
 devel/wasmer/Makefile.crates             | 302 ++++++++-------
 devel/wasmer/distinfo                    | 610 +++++++++++++++----------------
 devel/wasmer/files/patch-Makefile (gone) |  11 -
 4 files changed, 448 insertions(+), 477 deletions(-)
Comment 15 Mikael Urankar freebsd_committer freebsd_triage 2023-08-21 11:40:56 UTC
Thanks!