mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
Add packages/cli-rs: a Cargo workspace with the 14 crates of the plan, module stubs for api, local, service, store, and ui, and the expected third-party crates in [workspace.dependencies]. opentui is a path dependency on the local opentui-rust checkout, linked statically. script/opentui-lib.sh copies native artifacts whose header matches the bindings into ~/.cache/opencode-rs/opentui, where .cargo/config.toml points OPENTUI_LIB_DIR. opencode-rs --version runs; script/live.sh runs it against the elected background service.
10 lines
556 B
TypeScript
10 lines
556 B
TypeScript
// Runs every generator in script/gen in name order. Each writes its own output under crates/.
|
|
const root = new URL("..", import.meta.url).pathname
|
|
const scripts = Array.from(new Bun.Glob("script/gen/*.ts").scanSync({ cwd: root })).sort()
|
|
|
|
for (const script of scripts) {
|
|
console.log(`generate: ${script}`)
|
|
const proc = Bun.spawnSync(["bun", "run", script], { cwd: root, stdout: "inherit", stderr: "inherit" })
|
|
if (proc.exitCode !== 0) process.exit(proc.exitCode ?? 1)
|
|
}
|
|
if (scripts.length === 0) console.log("generate: no generators in script/gen")
|