Loading...
Loading...
ossido dev runs one process that compiles the Rust server, bundles the client,
generates types, and serves the app with hot reloading. Edits to React apply
through Vite HMR (proxied by the dev server) without a full reload; changes to
routes, Rust handlers, or types trigger the relevant regeneration and recompile.
See The CLI.
Fast Refresh - hot-swapping a React component while keeping its state - works at the module level, and only when a module exports nothing but components. If a file also exports a non-component (a helper, a constant, a hook), edits to it can't be fast-refreshed and force a full page reload instead.
So keep components in files that export only components (a plain constant export is
allowed), and move shared helpers or hooks into their own modules. The
react-refresh/only-export-components lint rule flags violations.
Ossido lints with oxlint, plus @ossido-labs/ossido-eslint-plugin for
framework-specific rules. Register the plugin under jsPlugins in .oxlintrc.json:
oxlint loads JS plugins through @oxlint/plugins, and that package must be the
same version as oxlint for the editor's LSP to load your rules - pin them
together (for example, both 1.77.0).
Backend and frontend share one log format: single-line entries tagged [BE] or
[FE], coloured in development, with the browser's console.* forwarded to the
dev-server console. In production you can switch to structured JSON. It's all
configured under logging in ossido.config.ts - see
Configuration.
Ossido has a typed environment system: declare an Environment struct in Rust and
it becomes the single source of truth. Fields are parsed and validated at startup,
read with get_env! in Rust and getEnv on the frontend, and only the fields you
mark #[public] reach the client. .env files (.env, .env.local,
.env.<mode>, .env.<mode>.local) are loaded automatically, with real system
environment variables taking precedence.
See Environment Variables for the full
schema, the reading APIs, and .env loading.
Your own Vite configuration - plugins, optimizeDeps, css, aliases - goes under
vite in ossido.config.ts and is merged with the framework's own setup. See
Configuration.
Back to Package ecosystem · Configuration