Skip to content

Configuration

Kyushu works out of the box. Each command uses defaults but supports its own optional config file to override them.

The build config typically lives on your local machine and in CI, while the run config lives where you serve your worker.

Controls how kyu build bundles and pre-initializes your worker.

FieldTypeDefaultDescription
input.srcstringsrc/index.tsPath to your TypeScript or JavaScript entry point
output.dirstringworkerOutput directory for the built worker
output.filestring__kyushu_worker.wasmOutput filename for the built worker
[input]
src = "src/server.ts"
[output]
dir = "dist"

Controls how kyu run loads and serves your worker.

FieldTypeDefaultDescription
run.wasmstringworker/__kyushu_worker.wasmPath to the built worker .wasm file
run.portnumber5987Port to listen on
worker.mountsarrayFilesystem mounts to expose to the worker
worker.mounts[].hoststringPath on the host filesystem
worker.mounts[].gueststringPath inside the worker sandbox
worker.mounts[].writableboolfalseWhether the mount is writable
worker.envarrayEnvironment variables to expose to the worker
worker.env[].keystringEnvironment variable name
worker.env[].valuestringEnvironment variable value
[run]
wasm = "build/__custom_kyushu_worker.wasm"
port = 8080
[[worker.mounts]]
host = "./public"
guest = "/public"
[[worker.mounts]]
host = "./data"
guest = "/data"
writable = true
[[worker.env]]
key = "API_KEY"
value = "secret"

Controls how kyu dev serves your worker during development with live-reload.

[dev]
port = 5987 # default
FieldTypeDefaultDescription
dev.portnumber5987Port to listen on
dev.watchbooltrueWatch for file changes and reload automatically

A custom [input] or [worker] configuration can also be applied; the details are omitted for brevity but follow the same options documented above.