Skip to content

Commit 66b5a5e

Browse files
committed
feat: add command line flag to use XS
1 parent 207d8d9 commit 66b5a5e

File tree

1 file changed

+10
-0
lines changed
  • packages/swingset-runner/src

1 file changed

+10
-0
lines changed

packages/swingset-runner/src/main.js

+10
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ FLAGS may be:
5151
--initonly - initialize the swingset but exit without running it
5252
--lmdb - runs using LMDB as the data store (default)
5353
--memdb - runs using the non-persistent in-memory data store
54+
--usexs - run vats using the the XS engine
5455
--dbdir DIR - specify where the data store should go (default BASEDIR)
5556
--dbsize SIZE - set the LMDB size limit to SIZE megabytes (default 2GB)
5657
--blockmode - run in block mode (checkpoint every BLOCKSIZE blocks)
@@ -180,6 +181,7 @@ export async function main() {
180181
let dbDir = null;
181182
let dbSize = 0;
182183
let initOnly = false;
184+
let useXS = false;
183185

184186
while (argv[0] && argv[0].startsWith('-')) {
185187
const flag = argv.shift();
@@ -273,6 +275,10 @@ export async function main() {
273275
case '--lmdb':
274276
dbMode = flag;
275277
break;
278+
case '--usexs':
279+
case '--useXS':
280+
useXS = true;
281+
break;
276282
case '-v':
277283
case '--verbose':
278284
verbose = true;
@@ -332,6 +338,9 @@ export async function main() {
332338
delete config.loopboxSenders;
333339
deviceEndowments.loopbox = { ...loopboxEndowments };
334340
}
341+
if (useXS) {
342+
config.defaultManagerType = 'xs-worker';
343+
}
335344
if (launchIndirectly) {
336345
config = generateIndirectConfig(config);
337346
}
@@ -530,6 +539,7 @@ export async function main() {
530539
if (statLogger) {
531540
statLogger.close();
532541
}
542+
controller.shutdown();
533543

534544
function getCrankNumber() {
535545
return Number(swingStore.kvStore.get('crankNumber'));

0 commit comments

Comments
 (0)