Documentation
Kurogane docs
Kurogane embeds Chromium in your Rust application and leaves your application in charge. These docs cover how it works, how to do each task and every command, key and API item.
- IntroductionWhat Kurogane is, what it's for and when another tool fits better.
- InstallInstall the kurogane CLI and the tools your apps build with.
- First appCreate a project, run it, call Rust from the page and bundle it.
Start
Install Kurogane, build a first app and learn how a project is laid out.
- IntroductionWhat Kurogane is, what it's for and when another tool fits better.
- InstallInstall the kurogane CLI and the tools your apps build with.
- First appCreate a project, run it, call Rust from the page and bundle it.
- Project layoutWhat each file in a Kurogane project does and how kurogane.toml ties them together.
Concepts
How Kurogane runs Chromium inside your app and what holds while it does.
- Process modelWhich processes a Kurogane app runs and which of your code runs in each.
- Runtime and event loopWho drives Chromium's message loop and who owns the windows.
- Windows and browsersWhat a window and a browser are, who opens them and how your app reaches them.
- Lifecycle and shutdownHow a browser closes, when your app ends and how Chromium shuts down.
- app:// and your frontendWhere your app's page comes from and how Kurogane serves it from disk.
- IPCCommands, events and streams between your Rust code and your page.
- Capabilities and permissionsWhat a page may reach and who decides it.
- SandboxRun Chromium's helper processes in the operating system's sandbox.
Guides
One task per page, from windows and links to commands, events and streams.
- Load a dev server or bundled assetsPoint your app at a dev server during development and at its built frontend in release builds.
- Open windows and remember their placementShape the start window, open more windows and reopen each where the user left it.
- Control links, popups and navigationDecide which windows a page may open and where it may take its window.
- Keyboard shortcuts and Chromium commandsDecide which keys your app takes, which the page gets and which of Chromium's commands run.
- DownloadsDecide where the files a page downloads are saved.
- PermissionsAllow a camera, a microphone, the location and Chromium's other permissions, or ask the user first.
- The context menuEdit the menu a right-click opens, add items of your own or let the page draw its own.
- File choosersAnswer the file choosers a page opens with the system's dialog, files of your choosing or a picker of your own.
- Drags into embedded browsersDecide what another application may drag into a browser embedded in your own window.
- Follow the page's title and fullscreenKeep a window's title and fullscreen state in step with its page and hear when they change.
- One instance per profileHandle a second launch in the running app, run separate copies and choose where the profile lives.
- Commands in depthSynchronous, async and binary commands, their errors and how much data they carry.
- EventsSend named messages from your Rust code to every page subscribed to them.
- StreamsMove chunks both ways between a page and a Rust handler until one side ends.
- WebAssemblyBuild a WebAssembly module and load it in your page.
- GPU modeChoose how Chromium renders your page and check what the GPU does on a machine.
- Credential storageChoose how Chromium protects cookies and saved passwords at rest and stop Keychain prompts.
- Chromium flags and preferencesPass Chromium switches, set its preferences and turn back on what Kurogane turns off.
- LoggingSee what Kurogane and Chromium do and read the errors your app reports when it can't start.
- Browser and renderer delegatesTake part in Chromium's browser and renderer process lifecycles without replacing Kurogane's own.
Embedding
Drive Chromium from your own event loop and place it in your own windows.
- Drive Chromium from winitRun Kurogane's windows from a winit event loop and pump Chromium when it asks.
- Embed a browser in your windowPlace Chromium browsers inside windows your app owns, keep them laid out and close them cleanly.
Shipping
Bundle, sign and ship your app on Linux, Windows and macOS.
- Bundle your appPackage your app with its frontend and the Chromium runtime for Linux, Windows and macOS.
- Bundle layoutsWhat each bundle format holds, how a bundled app finds its Chromium and how that runtime is verified.
- Code signingSign your Windows binaries and installer or your macOS app as part of kurogane bundle.
- Platforms and requirementsWhat each platform needs and what behaves differently on Linux, Windows, macOS and Nix.
- TemplatesStart projects from the official starters or a template of your own. Write templates others can use.
Reference
Generated from Kurogane 0.0.6-beta.1 itself.
For agents
Every page is also served as Markdown at its URL plus .md.
- llms.txtAn index of every page with its description.
- llms-full.txtEvery page and the whole reference in one file.