Oro Runtime Docs
Oro Runtime is a cross-platform runtime for building native applications as web applications: HTML/CSS for UI, JavaScript for behavior, and a small native core for OS integration.
Your app runs inside the platform WebView. When you need native capabilities, you import them explicitly as ES modules
under the oro:* namespace.
This documentation is organized into:
- Guides — the programming model, “hello world”, and common workflows.
- CLI —
oroccommands, flags, and environment variables. - Configuration —
oro.toml,.ororc, andcopy_map. - JavaScript APIs —
oro:*modules likeoro:application,oro:window, andoro:hooks.
CLI input forms#
The CLI accepts three common inputs:
- a project directory containing
oro.toml - a single HTML entry point
- a single JavaScript module
That means you can start with a full project or point oroc run / oroc build at one source file while the CLI infers a minimal configuration.
For command discovery, start with oroc help <query>.
A native “hello world”#
Project layout:
hello/
oro.toml
copy-map.toml
src/
index.html
details.html
main.js
oro.toml:
[meta]
bundle_identifier = "com.example.hello"
version = "0.1.0"
[build]
name = "hello"
copy_map = "copy-map.toml"
copy-map.toml:
"./src/index.html" = "index.html"
"./src/details.html" = "details.html"
"./src/main.js" = "main.js"
src/index.html:
<!doctype html>
<html lang="en">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Hello · Oro Runtime</title>
<main>
<h1>Oro Runtime</h1>
<p id="status">Starting native runtime demo…</p>
<button id="open-details" type="button">Open details window</button>
</main>
<script type="module" src="./main.js"></script>
</html>
src/details.html:
<!doctype html>
<html lang="en">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Details window · Oro Runtime</title>
<main>
<h1>Details window</h1>
<p>This window was created with <code>oro:application</code>.</p>
</main>
</html>
src/main.js:
import application from 'oro:application'
import { showNotification } from 'oro:notification'
const status = document.getElementById('status')
const openDetails = document.getElementById('open-details')
const currentWindow = await application.getCurrentWindow()
const { width, height } = await application.getScreenSize()
await currentWindow.setTitle(`Oro Runtime · ${width}×${height}`)
status.textContent = `Runtime ${application.runtimeVersion} · screen ${width}×${height}`
openDetails.addEventListener('click', async () => {
const detailsWindow = await application.getWindow(1)
if (detailsWindow) {
await detailsWindow.focus()
} else {
await application.createWindow({
index: 1,
path: 'details.html',
title: 'Details window',
width: 420,
height: 320,
})
}
await showNotification('Hello from Oro Runtime', {
body: 'Opened a details window from web code.',
})
})
Run it:
oroc run .
Build an installable bundle/package:
oroc build .
Recommended reading path#
- Start from nothing — From zero to first run → Hello world → Project layout
- Shape the app — Configure your runtime project → Files and sandboxing → Desktop integrations
- Add real app value — Local data with SQLite → Secure storage and sessions → Calling HTTP APIs
- Scale the runtime model — Windows and messaging → Worker threads for heavy work → Shared workers across windows
- Ship a resilient app — Offline-first with service workers → Custom protocols and routing → Lifecycle hooks and deep links
- Production workflows — Frontend build pipeline → Build and package → Mobile targets and device installs
- Operate and automate — Release packaging and signed updates → Testing and diagnostics → MCP and agent automation
- Reference — oroc → help → run → build → update
- Configuration — Overview → copy_map → reference
- JavaScript APIs — Overview → specifier reference → application → window → hooks
Source repository · Edit this page · View Markdown