GioJSdocs
On this page

Contributing

Help build the Rust-powered React framework.

GioJS is an open project. The monorepo holds the Rust crates (the server hot path) and the Node packages (the SSR bridge and React components).

The repository

PathWhat
crates/giojs-serverThe HTTP server: routing, security, the page cache, rules, the IPC client and worker supervision, gio.toml parsing.
crates/giojs-*Focused crates the server uses: router, cache, image, CSS, fonts, i18n, rate limiter, prefetch budget, assets, plugins.
packages/giojs-core@gio.js/core: the Node worker (SSR, route handlers, actions, the client build) and the server-side API.
packages/giojs-react@gio.js/react: components and hooks that run in the browser.
packages/giojs@gio.js/server: the gio CLI and the giojs-server launcher.
packages/giojs-clicreate-giojs: the scaffolder, its templates, add and migrate.
tests/integrationEnd-to-end tests against the real server binary and worker.
docs-siteThis site, a GioJS app exported to static HTML.

Setting up

You need Node.js 20 or newer, pnpm, and Rust 1.89 or newer (the workspace's rust-version).

bash
git clone https://github.com/Ggaming5005/GioJS
cd GioJS
pnpm install

cargo test --workspace --locked                      # Rust crates
cargo clippy --workspace --locked -- -D warnings
pnpm -r --filter "./packages/*" test                 # Node packages (vitest, node:test)

# The Rust <-> Node integration suite: the real server binary and worker
cargo build -p giojs-server
GIO_SERVER_BIN=target/debug/giojs-server node tests/integration/run.mjs

# Docs site: typecheck, dead links and nav, tests, and the static build
cd docs-site && npm ci && npm run typecheck && npm run check-links && npm test && npm run export

Apps in the workspace - the examples, and apps scaffolded inside the monorepo - resolve @gio.js/react through its build (dist/) and the @gio.js/core types through its declarations (dist/types). Build both before running or typechecking such an app. Rebuild after changing their sources too: a stale dist/types keeps serving the old types to every package that imports @gio.js/core by name.

bash
pnpm --filter @gio.js/core --filter @gio.js/react run build

Changing the configuration

A new gio.toml key goes into the config structs in crates/giojs-server/src/config.rs, and its section into SECTIONS if it is new: unknown keys stop the server, so a key the structs do not know cannot be used. Then:

  • regenerate the editor schema that ships with @gio.js/server:
    bash
    GIO_UPDATE_SCHEMA=1 cargo test -p giojs-server json_schema
  • a switch that turns a protection off or loosens a limit adds its warning to protections_off_warnings in config_check.rs, so startup and --check-config say the same thing;
  • follow the conventions every section uses: enabled = true for a feature, 0 for unlimited or no timeout;
  • update the full reference on gio.toml, the section's page, and the CHANGELOG.md entry.

Writing docs

Every docs page lives under docs-site/app/docs/ and must be listed in the nav file of its area under docs-site/components/nav/ - the link checker fails on pages nobody can navigate to and on links to pages that do not exist. docs-site/AGENTS.md is the guide to writing a page: the template, the components, heading ids and metadata. Every default, status code and header a page states comes from the source; facts that could drift get a check in docs-site/scripts/docs-content.test.mjs.

Pull requests

  • CI runs the Rust tests and clippy on Linux and Windows, the MSRV check, cargo-deny, the Node tests and typechecks, the integration suite and the docs site; the Node tests and the integration suite run again on Node 24.
  • Behavior changes get a test that fails without them, and an entry in CHANGELOG.md; a change in meaning also gets an upgrade note.
  • Every published package shares one version, set by packages/giojs: node scripts/sync-versions.mjs stamps it everywhere and --check verifies it in CI.

Report security issues as described in SECURITY.md, not in public issues.