Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajatjindal/wasm-console
a very (x 10) basic wasm console
https://github.com/rajatjindal/wasm-console
console debug golang shell tinygo wasi wasip2 webassembly
Last synced: 21 days ago
JSON representation
a very (x 10) basic wasm console
- Host: GitHub
- URL: https://github.com/rajatjindal/wasm-console
- Owner: rajatjindal
- Created: 2024-07-06T14:50:06.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T06:18:57.000Z (4 months ago)
- Last Synced: 2024-10-14T21:58:17.621Z (about 1 month ago)
- Topics: console, debug, golang, shell, tinygo, wasi, wasip2, webassembly
- Language: Go
- Homepage:
- Size: 13.5 MB
- Stars: 19
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Experimental wasm-console, because why not?
### Show me aleady
```
$ /usr/local/bin/wasmtime run --dir testme --dir pkg -Shttp --env ABC=XYZ main.wasm
starting wasm-console. Enter 'exit' to quit the shell.
wasm-console > printenv
ABC=XYZ
wasm-console > pwd
/
wasm-console > ls
testme
pkg
wasm-console > cd testme
wasm-console testme> ls
some-dir
some-file
wasm-console testme> cd some-dir
wasm-console testme/some-dir> ls
some-other-file
wasm-console testme/some-dir> cat some-other-file
contents of some-other-file
wasm-console testme/some-dir> cd ../
wasm-console testme> ls
some-dir
some-file
wasm-console testme> cat some-file
some - content
wasm-console testme> curl https://google.com
HTTP/0.0 301 Moved Permanently301 Moved
301 Moved
The document has moved
here.wasm-console testme> history
1* printenv
2* pwd
3* ls
4* cd testme
5* ls
6* cd some-dir
7* ls
8* cat some-other-file
9* cd ../
10* ls
11* cat some-file
12* curl https://google.com
13* history
wasm-console > ^D
goodbye !
```
## As a gif
![using wasm-console](demo/usage.gif)## Building
```
$ ls
README.md build.sh go.mod go.sum internal main.go pkg testme wit## build wasm component
$ ./build.sh## ls, notice main.wasm file is created
$ ls
README.md build.sh go.mod go.sum internal main.go main.wasm pkg testme wit
```