@cyrene/core
v1.0.0-beta.2
Published
The next generation core runtime for Cyrene Framework.
Maintainers
Readme
@cyrene/core
The runtime for Cyrene — signals, the DOM renderer, stores, the scheduler, SSR, and the router primitives. This is the package you install first; most apps only ever import from here.
No virtual DOM. State is signal-based and updates are fine-grained: when a signal changes, only the exact text nodes and attributes that read it are touched, not a re-rendered tree.
npm install @cyrene/core@betaCurrently published under the
betatag while the 1.0 API settles — the@betatag is required. A plainnpm install @cyrene/coreresolveslatest, which still points at a stale, brokenbeta.0build until it is retagged at GA.
A quick component
You can write Cyrene entirely in .tsx — no .cyr toolchain required. h is
the JSX factory (configure jsxFactory: "h"), and a component returns a render
thunk:
import { h, createSignal, render } from "@cyrene/core";
function Counter() {
const [count, setCount] = createSignal(0);
return () => (
<button onclick={() => setCount(c => c + 1)}>
count is {count()}
</button>
);
}
render(() => <Counter />, document.getElementById("app")!);createSignal returns a [read, write] pair; calling count() inside a view
subscribes that spot to the signal. createMemo derives values lazily,
createEffect runs side effects, createStore / defineStore handle larger
state. Control flow is <For>, <Show>, <Switch>, <Suspense>,
<ErrorBoundary>.
Entry points
The barrel is intentionally split so browser bundles stay small — import from the subpath you need rather than the root in server/dev code:
| Import | For |
|---|---|
| @cyrene/core | client runtime (signals, render, h, control flow) |
| @cyrene/core/ssr | renderToString / streaming — server only, no DOM |
| @cyrene/core/server | SSR + middleware (Node/Bun) |
| @cyrene/core/labs | experimental primitives (API may change in 1.x) |
| @cyrene/core/jsx-runtime | automatic JSX runtime (no manual h import) |
| @cyrene/core/devtools | DevTools bridge |
| @cyrene/core/testing | test helpers |
Version
@cyrene/core exports version, buildNumber, and fullVersion if you want
to display or log which build you're on.
Docs and guides: https://www.cyrenejs.com · MIT licensed.
