Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cargo Build & Test
name: CI

on:
push:
Expand All @@ -16,3 +16,18 @@ jobs:
- run: rustup update stable && rustup default stable
- run: cargo build --verbose
- run: cargo test --verbose

runtime:
name: runtime - Node
runs-on: ubuntu-latest
defaults:
run:
working-directory: runtime
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run typecheck
- run: npm test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
Cargo.lock
.idea/
__TEMP__/

# runtime/ (Node)
runtime/node_modules/
runtime/dist/
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ The **TypeScript target** for [Comline](https://github.com/ComlineProject) — o
repo per language, holding that language's codegen, libgen, runtime and
std-extra together.

Today: just `codegen/` (`comline-codegen-typescript`), the `code`-mode generator,
extracted from `ComlineProject/generation`. `lib` mode, a runtime, and
std-extra follow.
Today: `codegen/` (`comline-codegen-typescript`, the `code`-mode generator,
extracted from `ComlineProject/generation`) and `runtime/` (`@comline/runtime`,
the contract layer so far). `lib` mode, the rest of the runtime, and std-extra
follow.

## `codegen/`

`comline-codegen-typescript` — frozen IR → `.ts` source: `export interface` per
struct, `export enum` (string values) per enum, `export interface` per protocol.
It depends on `comline-codegen` (the language-neutral contract + `Registry`) and
`comline-core` (the IR), both by git rev.
struct / `error`, `export enum` (string values) per enum, and per `protocol` the
RPC shape (an `IR_HASH`, params interfaces, discriminated-union error types, and
an `export interface` of `Promise`-returning methods). It depends on
`comline-codegen` (the language-neutral contract + `Registry`) and `comline-core`
(the IR), both by git rev.

`register(&mut Registry)` contributes the generator under `typescript` / `ts` at
version `5.0`; the Comline CLI composes it into its `Registry` at startup.
Expand All @@ -22,6 +25,17 @@ version `5.0`; the Comline CLI composes it into its `Registry` at startup.
cargo test
```

## `runtime/`

`@comline/runtime` — the package generated bindings link against. So far the
framing-agnostic contract (`RuntimeError`, `Kind`, `Envelope`, `Reply`,
`CallError`, `Dispatch`), a `Handshake` byte-compatible with the Rust
`comline-runtime`, and a `JsonCodec`. Node, zero runtime dependencies.

```sh
cd runtime && npm ci && npm test
```

## Design

See `ComlineProject/docs` → Design:
Expand Down
Loading
Loading