-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from terracatta/jem_add_bun
Add Bun as an available runtime
- Loading branch information
Showing
6 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(function(program, execJS) { (function() {execJS(program) }).call({}); })(function(self, global, process, module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { #{source} | ||
}, function(program) { | ||
// Force BunJS to use sloppy mode see https://github.com/oven-sh/bun/issues/4527#issuecomment-1709520894 | ||
exports.abc = function(){} | ||
var __process__ = process; | ||
var printFinal = function(string) { | ||
process.stdout.write('' + string, function() { | ||
__process__.exit(0); | ||
}); | ||
}; | ||
try { | ||
delete this.process; | ||
delete this.console; | ||
result = program(); | ||
process = __process__; | ||
if (typeof result == 'undefined' && result !== null) { | ||
printFinal('["ok"]'); | ||
} else { | ||
try { | ||
printFinal(JSON.stringify(['ok', result])); | ||
} catch (err) { | ||
printFinal(JSON.stringify(['err', '' + err, err.stack])); | ||
} | ||
} | ||
} catch (err) { | ||
process = __process__; | ||
printFinal(JSON.stringify(['err', '' + err, err.stack])); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters