Skip to content

SteamAutomata/ccwasm

 
 

Repository files navigation

CC: WASM Reforged

This mod is ported from wefcdse/ccwasm to NeoForge 1.21.1.

The original source code is licensed GPL3.0, please reach out SteamAutomata for any issues regarding licensing.

The following is the original README:

Description

this mod add wasm support for CC: Tweaked.

this mod uses chicory runtime, and includes wasi support

Usage

  • put .wasm file in wasm folder(.minecraft/wasm/).
  • running:
    • in computercraft shell, run exec_wasm
    • in lua in computer craft, run wasm.load_wasm function to load a module. Note that the argument does not contains a .wasm extend name.

Wasm development

use this crate

see the examples here

Example

minesweeper example

  • 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

picture display example

  • 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()"))

About

Port of CC:WASM to 1.21.1 NeoForge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 65.9%
  • Rust 26.3%
  • Lua 5.3%
  • Batchfile 2.4%
  • Python 0.1%