Service.create() from @zenbujs/core/runtime. It runs in the main process.
src/main/services/files.ts
rpc.<plugin>.<service>.<method>, so if this service belongs to a plugin named app, readFile is available as rpc.app.files.readFile(...).
Calling from React
Dependencies
Services declare dependencies on other services through thedeps field. The framework automatically figures out the right order to start them in, so each service’s dependencies are ready before it runs.
openWindow({}) boots a main window pointed at your uiEntrypoint. Pass injection: "<name>" to open a window whose entry route renders a specific injection instead.
By the time evaluate() runs, all dependencies in this.ctx are fully initialized.
Setups and cleanups
Insideevaluate(), anything that needs to be torn down on hot reload or shutdown should be wrapped in this.setup():

