torch2424 / wasm-matrix

A Matrix effect in your terminal using AssemblyScript 🚀 and WASI 🧩 . Deployed to WAPM 📦 .
Apache License 2.0
70 stars 5 forks source link

wasm-matrix does not run on WebAssembly.sh #13

Open rajsite opened 4 years ago

rajsite commented 4 years ago

Repro: Go to WebAssembly.sh Run command wapm install torch2424/wasm-matrix Run command wasm-matrix Notice the following error:

$ wapm install torch2424/wasm-matrix
Package torch2424/wasm-matrix@0.0.2 installed successfully!
→ Installed commands: wasm-matrix
$ wasm-matrix
[INFO] Fetching the command wasm-matrix ...
wasm shell: parse error (Error: The module /_wasmer/wapm_packages/torch2424/wasm-matrix@0.0.2/build/optimized.wasm doesn't exist)

Workaround: After the command is installed run:

./_wasmer/wapm_packages/torch2424/wasm-matrix@0.0.2/optimized.wasm -l 20 -c 40
torch2424 commented 4 years ago

Ah this seems like it might be an issue with WebAssembly.sh instead of wasm-matrix :hushed: But then again, wasm-matrix uses a realllyyyyy old version of AssemblyScript :upside_down_face:

cc @syrusakbary as they might know :smile:

syrusakbary commented 4 years ago

Yeah, this seems to be a bug inside wasmer-js / webassembly.sh!

@rajsite could you report it in the wasmer-js repo so we don't forget? Thanks!

rajsite commented 4 years ago

It looks like the package is fetched from: https://registry-cdn.wapm.io/packages/torch2424/wasm-matrix/wasm-matrix-0.0.2.tar.gz

The contents of the package look like the following:

./wasm-matrix-0.0.2:
LICENSE  optimized.wasm  README.md  wapm.toml

And the contents of the wapm.toml:

[package]
name = "torch2424/wasm-matrix"
version = "0.0.2"
description = "A Matrix effect in your terminal using AssemblyScript 🚀 and WASI 🧩 . Deployed to WAPM 📦 ."
readme = "README.md"
repository = "https://github.com/torch2424/wasm-matrix"

[[module]]
name = "wasm-matrix"
source = "build/optimized.wasm"
abi = "none"

[[command]]
name = "wasm-matrix"
module = "wasm-matrix"

Do you think that could be a misconfiguration of the wapm.toml (the [[module]] source should be source = "optimized.wasm")?