@remix_labs/machine-starter 2.2279.0-dev → 2.2281.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix_labs/machine-starter",
3
- "version": "2.2279.0-dev",
3
+ "version": "2.2281.0-dev",
4
4
  "description": "start the groove",
5
5
  "main": "node.js",
6
6
  "browser": "index.js",
@@ -11,7 +11,7 @@
11
11
  "author": "Remixlabs staff",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@remix_labs/hub-client": "2.2279.0-dev",
14
+ "@remix_labs/hub-client": "2.2281.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },
package/start.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import Process from "process";
2
2
  import { StartWASM2, Hub } from "./node.js";
3
3
  import { StartMixCompiler, WaitForMixCompiler } from "@remix_labs/mixc-starter";
4
+ import { MiniWASI } from "@remix_labs/hub-client/miniwasi.js";
4
5
  import { MixcoreWasm, MixcoreWasmApi } from './mixcore-main.js';
5
- import { mixcoreWasmCode } from './mixcore-wasm-main.js';
6
- import { WASI, File, Directory, PreopenDirectory, ConsoleStdout } from "@bjorn3/browser_wasi_shim";
6
+ import { mixcoreWasmCode } from './mixcore_mini-main.js';
7
7
  function importCode(base64) {
8
8
  let binstr = atob(base64);
9
9
  let code = new Uint8Array(binstr.length);
@@ -47,16 +47,9 @@ let wasm_base = Process.env["MIX_WASM_BASE"] || "file://" + protoquery + "/wasm-
47
47
  let w = new Hub.Worker();
48
48
  globalThis.GROOVEBOX_ALLOW_INSECURE_HTTP = true;
49
49
 
50
- let DB_DIR = "db";
51
- let wasi = new WASI([], [], [
52
- new File([]),
53
- ConsoleStdout.lineBuffered(msg => console.log(`[WASI stdout] ${msg}`)),
54
- ConsoleStdout.lineBuffered(msg => console.warn(`[WASI stderr] ${msg}`)),
55
- new PreopenDirectory(".", {[DB_DIR]: new Directory({})}),
56
- ]);
57
- MixcoreWasmApi.create(mixcoreWasm, wasi).then(mixcoreWasmApi => {
58
- let mixcore = MixcoreWasm.create(DB_DIR, "compiler-testing", "test@user", mixcoreWasmApi);
59
- let mixcoreConfig = { kind: "mixcore", mixcore };
50
+ MixcoreWasmApi.create(mixcoreWasm, new MiniWASI()).then(mixcoreWasmApi => {
51
+ let mixcore = MixcoreWasm.create(null, null, null, mixcoreWasmApi);
52
+ let mixcoreConfig = { kind: "mixcore", mixcore, enableFFIs: ["$decodeError"] };
60
53
  w.configure({wsURL: mqttURL, user:mqttUser, token:mqttToken}).then(resp => {
61
54
  if (variant == "BYTE") variant = "QCODE";
62
55
  switch(variant) {