Files
cell/run_aot.ce
2026-02-16 00:35:23 -06:00

26 lines
484 B
Plaintext

// run_aot.ce — compile a .ce program to native dylib and run it
//
// Usage:
// cell run_aot <program.ce>
var shop = use('internal/shop')
var fd = use('fd')
if (length(args) < 1) {
print('usage: cell run_aot <program.ce>')
return
}
var file = args[0]
if (!fd.is_file(file)) {
if (!ends_with(file, '.ce') && fd.is_file(file + '.ce'))
file = file + '.ce'
else {
print('file not found: ' + file)
return
}
}
var abs = fd.realpath(file)
shop.use_native(abs)