JsEngine
A JavaScript engine a KiteJs can run on. Each engine module has one, an object you pass to KiteJs: Rhino from kitejs-rhino, QuickJs from kitejs-quickjs. C is the engine's own configuration, which has everything KiteJsConfig has plus what only that engine can do.
KiteJs(Rhino) { timeZone = TimeZone.UTC }.use { js -> js.evaluate("1 + 1") }
KiteJs(QuickJs) { memoryLimit = 64L shl 20 }.use { js -> js.evaluate("1 + 1") }Content copied to clipboard
Properties
Functions
Link copied to clipboard
Gets the engine ready, where that takes work before the first KiteJs can open. QuickJS in a browser compiles its WebAssembly here, which a browser will not do synchronously on its main thread for a module that size. Everywhere else this returns at once. Calling it again once it is done costs nothing.