Skip to content
Open
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
119 changes: 105 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,115 @@
name: ci

on:
pull_request:
push:
branches: [main]
branches: [main, "feat/**"]
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
rust:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
persist-credentials: false
- name: Verify exact vendored dependency trees
version: '25.3'
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: GraalVM diagnostics
run: |
java --version
native-image --version
- name: Verify JIT/JVM profile
run: mvn -B -ntp -Dores.runtime.carriers=native verify
- name: Run showcase
run: mvn -B -ntp -DskipTests exec:java -Dexec.args="examples/showcase.ores"
- name: Compile and run shared Oreslang program
run: mvn -B -ntp -DskipTests exec:java -Dexec.args="examples/together.ores"

native-aot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: '25.3'
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: GraalVM diagnostics
run: |
java --version
native-image --version
- name: Build interpreter-only AOT image
run: mvn -B -ntp -Pnative-aot -DskipTests package
- name: Run AOT image
run: ./target/ores-aot --mode=aot --platform=linux examples/together.ores
- name: Run AOT proper tail-call stress
run: |
./target/ores-aot --mode=aot --platform=linux examples/proper-tail-call.ores | tee /tmp/ores-aot-tail.out
grep -F "0|0|0" /tmp/ores-aot-tail.out

native-hybrid:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: '25.3'
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: GraalVM diagnostics
run: |
java --version
native-image --version
- name: Build AOT host with guest JIT
run: mvn -B -ntp -Pnative-hybrid -DskipTests package
- name: Run hybrid image
run: ./target/ores-hybrid --mode=hybrid --platform=linux examples/together.ores
- name: Run hybrid proper tail-call stress
run: |
./target/ores-hybrid --mode=hybrid --platform=linux examples/proper-tail-call.ores | tee /tmp/ores-hybrid-tail.out
grep -F "0|0|0" /tmp/ores-hybrid-tail.out

polyglot-isolate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: '25.3'
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: GraalVM diagnostics
run: |
java --version
native-image --version
- name: Build Oreslang polyglot isolate library
run: mvn -B -ntp -Pnative-isolate -DskipTests package
- name: Locate isolate library
id: isolate
shell: bash
run: |
test "$(git rev-parse HEAD:vendor/litegraph-gpu-host)" = "a99b312757206f463d75756bbe703968440c97b2"
test "$(git rev-parse HEAD:vendor/litegraph-modeld)" = "04714b79813beba45942f52929f61d32279652b1"
test "$(git rev-parse HEAD:vendor/litegraph-runtime)" = "b03d1c71faa2df734a3d0bf06349248111939304"
- run: rustc --version && cargo --version
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo test --all-features
lib="$(find target -maxdepth 1 -type f \( -name 'oresvm.so' -o -name 'liboresvm.so' -o -name 'oresvm.dylib' -o -name 'liboresvm.dylib' \) | head -n1)"
test -n "$lib"
echo "path=$PWD/$lib" >> "$GITHUB_OUTPUT"
- name: Run strict program in Oreslang polyglot isolate
run: mvn -B -ntp -Dpolyglot.engine.IsolateLibrary="${{ steps.isolate.outputs.path }}" -DskipTests exec:java -Dexec.args="--strict-isolate --mode=jit --platform=linux examples/together.ores"
38 changes: 38 additions & 0 deletions .github/workflows/fast-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: fast-ci

on:
push:
branches: [main, "feat/**"]
pull_request:

permissions:
contents: read

concurrency:
group: fast-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: '25.3'
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: Verify compiler/runtime tests
run: mvn -B -ntp -Dores.runtime.carriers=native verify
- name: Run examples
run: |
mvn -B -ntp -DskipTests exec:java -Dexec.args="examples/showcase.ores"
mvn -B -ntp -DskipTests exec:java -Dexec.args="examples/together.ores"
mvn -B -ntp -DskipTests exec:java -Dexec.args="examples/modules-namespaces-callables.ores"
mvn -B -ntp -DskipTests exec:java -Dexec.args="examples/async-await.ores" | tee /tmp/oreslang-async-await.out
grep -F "144" /tmp/oreslang-async-await.out
mvn -B -ntp -DskipTests exec:java -Dexec.args="examples/callables.ores" | tee /tmp/oreslang-callables.out
grep -F "120:9:13" /tmp/oreslang-callables.out
30 changes: 30 additions & 0 deletions .github/workflows/project-manifest-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Project manifest CI

on:
push:
branches:
- feat/project-manifest-oreslang-path-20261003
pull_request:
paths:
- '.oreslangc.cfg.toml'
- 'contracts/oreslangc-config.*'
- 'src/**'
- 'pom.xml'
- '.github/workflows/project-manifest-ci.yml'

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: Verify
run: mvn -B -ntp verify
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/target
Cargo.lock

# Fleet-local scratch/worktrees and agent-policy link
.ores/
tmp/
temp/
target/
.idea/
.vscode/
*.iml
.DS_Store
*.log
26 changes: 0 additions & 26 deletions AGENTS.md

This file was deleted.

14 changes: 0 additions & 14 deletions Cargo.toml

This file was deleted.

103 changes: 30 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,30 @@
# litegraph-node

Per-machine daemon and local authority for allocatable compute resources.

LiteGraph is a heterogeneous compute actor platform: CPU code owns control, networking, actor supervision and ordinary OS capabilities; suitable numerical work may be dispatched to one or more GPUs. A machine is therefore not classified as simply "CPU" or "GPU"—CPU, RAM, accelerator devices and VRAM are independently schedulable resources.

## Responsibilities

- CPU/RAM and accelerator discovery.
- device/lane health and allocatable capacity.
- local invocation supervision.
- health/snapshot APIs and standalone workstation mode.

## Explicit non-responsibilities

- cluster-wide scheduling.
- control-plane tenant CRUD.
- compiler/toolchain responsibilities.

Keeping these boundaries explicit is important: moving policy into a lower-level component makes local execution harder to reason about and creates competing authorities.

## Place in the system

```text
scheduler/router → node → runtime/modeld/gpu-host; node → scheduler telemetry
```

Shared invariants across the platform:

- invocation actors are ephemeral;
- resident artifacts and compiled variants are immutable and revisioned;
- guest/customer code receives capabilities, never raw accelerator pointers;
- mutable accelerator state belongs to trusted lane/device actors;
- CPU and GPU resources are accounted independently;
- `cpu`, `gpu`, and `auto` describe execution requirements/preferences without changing logical function identity;
- backpressure and cancellation must propagate rather than creating unbounded queues.

## Contracts and compatibility

Wire-visible names use `snake_case`. Cross-language contracts belong in `litegraph-contracts`: authored TypeSpec and JSON Schema Draft 2020-12 are peer authorities, and generated files are evidence rather than a third authored schema. Contract mismatches must fail closed before promotion.

Public/shared semantic types belong in `litegraph-interfaces` or `litegraph-pub-lib-core`; this repository should not create a subtly different copy of an existing concept.

## Security and isolation

Treat all tenant input and artifacts as untrusted. Validate sizes, identifiers and capability requests before allocating expensive resources. Never expose native accelerator pointers/driver handles across the tenant boundary, never place credentials in manifests or examples, and keep secrets in approved runtime secret channels.

Isolation policy uses the platform classes `shared`, `sandbox`, `partitioned`, and `dedicated` where applicable. Resource release on cancellation, timeout and failure is part of correctness.

## Development expectations

Follow the fleet policy in `ORESoftware/my-ai` (`AGENTS.md` plus `SHARED.md`) when changing this repository. Durable systems tooling, validators, code generation and CI helpers should be Rust-first. Do not add Python for repository scripts, validators, codegen or CI gates.

When this repository exposes an executable with command-line configuration, its public option contract belongs in root `.cli-flags.toml` and the argv boundary should use the canonical `flags-2-env` integration rather than maintaining a second independent flag schema.

Tests should cover both success and fail-closed behavior. Hardware-independent logic should run with deterministic fakes/simulators; hardware-specific certification belongs on real accelerator runners. A hosted workflow that starts zero test steps is not evidence of a passing build.

## Integration map

- `litegraph-contracts` — wire schemas.
- `litegraph-interfaces` — canonical shared semantics.
- `litegraph-scheduler` — cluster placement.
- `litegraph-node` — machine inventory and local supervision.
- `litegraph-runtime` — invocation lifecycle.
- `litegraph-gpu-host` — trusted accelerator execution.
- `litegraph-modeld` — resident model actors.
- `litegraph-compiler` — deterministic multi-target build artifacts.
- registries — immutable function/model artifact storage.
- `litegraph-router.rs` — invocation forwarding and backpressure.

## Documentation rule

Keep this README specific to this repository. Architectural decisions that affect multiple repositories should be recorded in the canonical interface/contracts layer and linked here rather than copied into divergent local specifications.
# Oreslang

Oreslang is a statically typed GraalVM/Truffle language with nominal typing by default, explicit structural-call opt-ins, actor-oriented concurrency, hot-loadable code generations, and deny-by-default isolate capabilities.

This repository contains the Java/Truffle reference implementation.

The language is intentionally opinionated:

- static nominal typing by default, with explicit structural compatibility at selected call boundaries;
- private functions by default (`fnc`), with `pub` for exported functions;
- class methods omit `fnc` and have an implicit `self` receiver;
- one return value only (tuples/arrays/records are ordinary single values);
- `val`, `const`, and `let` are the only variable declarations;
- actor heaps are isolated: mutable values are never shared between actors;
- immutable/sendable values may be message-passed, and explicitly frozen regions may be shared read-only;
- isolates are stricter security boundaries for FaaS/mobile workloads, with host access denied and Oreslang APIs capability-gated by default;
- JIT, AOT/interpreter, and AOT-host + guest-JIT hybrid execution profiles;
- file-granular incremental compilation with stable code-unit/package identities and reverse-dependency invalidation;
- flat optional file namespaces and flat modules (neither may nest);
- class-level `static fnc` functions separated from receiver methods;
- first-class function aliases/types and block-only `|args| -> { ... }` lambdas;
- lexical closures with persistent captured environments;
- affine ownership, move checking, borrows, immutable-by-default parameters, and `Type mut name` owned-mutation syntax - see [ft borrow, ft copy, ft take, ft share]
- hot reload creates a fresh versioned guest context/generation without requiring FFI or dynamic native libraries;
- direct method calls reuse shared class method definitions; instance/actor methods are direct-call-only, and callbacks use explicit lambdas instead of implicit bound-method values;
- multiple named modules may appear in one source file;
- explicit `return` statements;
- generics, tuples, arrays, complex numbers, futures/`await`, lambdas, `defer`, and `try/catch/finally` are language-level features.

The first implementation is developed on a feature branch and will land with an executable Truffle skeleton, grammar/specification, examples, tests, and CI.
Loading
Loading