wasmerio / webassembly.sh

Open-source and installable PWA terminal powered by WebAssembly, WAPM, and Wasmer-JS 🖥
https://webassembly.sh
MIT License
291 stars 32 forks source link

Make uploading wasm (and other) files more convenient #64

Closed vshymanskyy closed 4 years ago

vshymanskyy commented 4 years ago

When working on https://wapm.io/package/vshymanskyy/wasm3 , I found that drag'n'dropping wasm files will just install the wasm file to wapm, but it seems that the file is not accessible through filesystem.

If I rename the file to .bin, the shell says it's available through /tmp/, but I don't see it there using ls. This is probably a bug.

The only way to do it (for me), was using curl command as described in the Readme. But in this case the file has to be hosted somewhere.

vshymanskyy commented 4 years ago

Some ideas.

  1. implement upload command - this will just "upload" any file as is to the fs
  2. when using drag'n'drop or wapm upload, copy the wasm file to fs (along with installing it)
syrusakbary commented 4 years ago

This is related to two issues:

  1. In Wasmer-JS, empty-dirs are serialized / deserialized badly
  2. When uploading the wasm file, we should upload it as well to the /tmp dir.
syrusakbary commented 4 years ago

The first issue is just fixed with the commit: https://github.com/wasmerio/wasmer-js/commit/c88101f5ab1d340b723ca76c55cfecee10d369c0

I will push a fix for 2. now.

Then, we will publish a new version of WebAssembly.sh

vshymanskyy commented 4 years ago

Thanks for a quick response. You guys rock ;)