Runtime
We can’t assume users have any JS runtime installed on their machine.
@kksh/api
package provides tools to detect if there is NodeJS, Bun, Deno installed on the machine.
You can also check if other language runtimes/interpreters are installed.
If no JS runtime is installed and your extension really needs it.
@kksh/api
provides API to auto-install Bun runtime (not globally, not added to PATH
).
You can get Bun
path. Bun is lighter, faster, supports TypeScript (so you can ship .ts
files directly),
supports WASM. As a drop-in replacement for NodeJS, it’s a good choice for extensions.
Deno
runtime may be supported in the future as it supports sandbox. It’s safer if extensions really need to
run code directly on the machine rather than within Kunkun app sandbox.