this mod add wasm support for CC: Tweaked.
this mod uses chicory runtime, and includes wasi support
- put
.wasmfile inwasmfolder(.minecraft/wasm/). - running:
-
- in computercraft shell, run
exec_wasm
- in computercraft shell, run
-
- in lua in computer craft, run
wasm.load_wasmfunction to load a module. Note that the argument does not contains a.wasmextend name.
- in lua in computer craft, run
use this crate
see the examples here
-
download this file and put it in
.minecraft/wasm/ -
place a monitor on top of a computer
-
in computer craft's shell run
exec_wasm minesweeper
-
download this file and put it in
.minecraft/wasm/ -
place a monitor on top of a computer
-
in computer craft's shell run
exec_wasm pic_display [path to picture file(in cc's fs)]
python interpreter example,
download this file and put it in ./wasm/, and then in computer craft lua run:
py = wasm.load_wasm("python", false) -- disable aot, compile may take too long time
py.init()
py.exec("import time as t")
print(py.eval("t.time()"))