@remix_labs/machine-starter 2.3185.0-dev → 2.3187.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/common.js CHANGED
@@ -11,13 +11,13 @@ let blobs = {};
11
11
  let blobsLoops = {};
12
12
 
13
13
  function terminateAll() {
14
- console.log("[groovebox-starter] terminate all VMs");
14
+ console.log("[machine-starter] terminate all VMs");
15
15
  for (let [vmID, worker] of Object.entries(workers)) {
16
16
  worker.terminate();
17
17
  };
18
18
  for (let [vmID, blist] of Object.entries(blobs)) {
19
19
  for (let blob_url of blist) {
20
- console.log("[groovebox-starter] revoke ", blob_url);
20
+ console.log("[machine-starter] revoke ", blob_url);
21
21
  URL.revokeObjectURL(blob_url);
22
22
  }
23
23
  };
@@ -35,7 +35,7 @@ function terminateAll() {
35
35
  }
36
36
 
37
37
  function terminateVM(vmID) {
38
- console.log("[groovebox-starter] terminate VM", vmID);
38
+ console.log("[machine-starter] terminate VM", vmID);
39
39
  let worker = workers[vmID];
40
40
  if (worker) {
41
41
  let vmChildren = children[vmID];
@@ -52,7 +52,7 @@ function terminateVM(vmID) {
52
52
  blobsLoop.terminate();
53
53
  }
54
54
  for (let blob_url of blobList) {
55
- console.log("[groovebox-starter] revoke ", blob_url);
55
+ console.log("[machine-starter] revoke ", blob_url);
56
56
  URL.revokeObjectURL(blob_url);
57
57
  };
58
58
  if (vmChildren) {
@@ -65,7 +65,6 @@ function terminateVM(vmID) {
65
65
 
66
66
  if (globalThis.Process) {
67
67
  Process.on("exit", () => {
68
- console.log("terminating machine workers");
69
68
  terminateAll()
70
69
  })
71
70
  };
@@ -95,7 +94,7 @@ function StartWASM(hub, baseURL, org, workspace, vmID, user, token, noOutputViaM
95
94
  }
96
95
 
97
96
  async function StartWASM2(hub, config) {
98
- console.log("[groovebox-starter] start VM", GROOVEBOX_BUILD, config.vmID, config.mixcore);
97
+ console.log("[machine-starter] start VM", GROOVEBOX_BUILD, config.vmID, config.mixcore);
99
98
  console.debug("Debug levels (call MixSetMask to change, or set the _rmx_mask URL parameter):");
100
99
  console.debug("DEBUG_MEMORY 1");
101
100
  console.debug("DEBUG_SCHEDULER 2");
@@ -120,7 +119,7 @@ async function StartWASM2(hub, config) {
120
119
  let localFFIs = config.localFFIs || {};
121
120
  let mixcoreFFIs = await getMixcoreFFIs(config.mixcore);
122
121
  if (mixcoreFFIs) {
123
- console.log("[groovebox-starter] mixcore FFIs", Object.keys(mixcoreFFIs));
122
+ console.log("[machine-starter] mixcore FFIs", Object.keys(mixcoreFFIs));
124
123
  // merge the ffis and store them back into the config so sub vms also get them
125
124
  config.localFFIs = Object.assign(localFFIs, mixcoreFFIs);
126
125
  // delete the mixcore config to avoid being handled further by the worker
@@ -147,11 +146,11 @@ async function StartWASM2(hub, config) {
147
146
  // for the desktop only: precompile the mixrt module to get faster
148
147
  // startup times
149
148
  if (globalThis.mixrtCodeModule && globalThis.mixrtCodeURL == mixrtCode) {
150
- console.log("[groovebox-starter] reusing mixrt");
149
+ console.log("[machine-starter] reusing mixrt");
151
150
  mixrtCode = globalThis.mixrtCodeModule;
152
151
  } else {
153
152
  let url = mixrtCode;
154
- console.log("[groovebox-starter] pre-compiling mixrt");
153
+ console.log("[machine-starter] pre-compiling mixrt");
155
154
  mixrtCode = await WebAssembly.compileStreaming(fetch(url));
156
155
  globalThis.mixrtCodeURL = url;
157
156
  globalThis.mixrtCodeModule = mixrtCode;
@@ -186,6 +185,7 @@ async function StartWASM2(hub, config) {
186
185
 
187
186
  async function ffi_vm_start(conn, args) {
188
187
  let vm_id = "embedded." + nanoid();
188
+ console.log("[machine-starter] starting VM: ", vm_id);
189
189
  let config = {};
190
190
  for (const [k, v] of Object.entries(conn.config)) {
191
191
  config[k] = v;
@@ -348,14 +348,14 @@ async function localFFIsMessageLoop(hub, config, localFFIs, terminate) {
348
348
  terminate.then(() => ({terminated: true})),
349
349
  ]);
350
350
  if (terminated) {
351
- console.log("[groovebox-starter] terminate FFI loop", vmID);
351
+ // console.log("[machine-starter] terminate FFI loop", vmID);
352
352
  return;
353
353
  }
354
354
  let name = msg.payload.name;
355
355
  let call_id = msg.payload.call_id;
356
356
  let args = decode(msg.payload.args);
357
357
  let fun = localFFIs[name];
358
- console.log("[groovebox-starter] local FFI call", vmID, call_id, name);
358
+ // console.log("[machine-starter] local FFI call", vmID, call_id, name);
359
359
  try {
360
360
  if (!fun) throw new Error("No such local FFI in groovebox starter: " + name);
361
361
  let connector =
@@ -397,7 +397,7 @@ async function blobsMessageLoop(hub, config, terminate) {
397
397
  terminate.then(() => ({terminated: true})),
398
398
  ]);
399
399
  if (terminated) {
400
- console.log("[groovebox-starter] terminate blobs loop", vmID);
400
+ // console.log("[machine-starter] terminate blobs loop", vmID);
401
401
  return;
402
402
  }
403
403
  let name = msg.payload.name;
@@ -1,2 +1,2 @@
1
- var GROOVEBOX_BUILD = "3546";
1
+ var GROOVEBOX_BUILD = "3548";
2
2
  export { GROOVEBOX_BUILD }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix_labs/machine-starter",
3
- "version": "2.3185.0-dev",
3
+ "version": "2.3187.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.3185.0-dev",
14
+ "@remix_labs/hub-client": "2.3187.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },