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
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
profile: [no-default-features, alloc, std, spsc_raw]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable

- name: Cache cargo registry
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
Expand All @@ -36,30 +36,40 @@ jobs:
- name: Rustfmt check
run: cargo fmt --all -- --check

- name: Build, test & clippy (no-default-features)
- name: Build, test, clippy & doc (no-default-features)
if: matrix.profile == 'no-default-features'
run: |
cargo build --all --no-default-features --all-targets --verbose
cargo test --all --no-default-features --all-targets --verbose
cargo clippy --all --no-default-features -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --no-default-features

- name: Build, test & clippy (alloc)
- name: Build, test, clippy & doc (alloc)
if: matrix.profile == 'alloc'
run: |
cargo build --all --features alloc --all-targets --verbose
cargo test --all --features alloc --all-targets --verbose
cargo clippy --all --features alloc -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features alloc

- name: Build, test & clippy (std)
- name: Build, test, clippy & doc (std)
if: matrix.profile == 'std'
run: |
cargo build --all --features std --all-targets --verbose
cargo test --all --features std --all-targets --verbose
cargo clippy --all --features std -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features std

- name: Build, test & clippy (spsc_raw)
- name: Build, test, clippy & doc (spsc_raw)
if: matrix.profile == 'spsc_raw'
run: |
cargo build --all --features spsc_raw --all-targets --verbose
cargo test --all --features spsc_raw --all-targets --verbose
cargo clippy --all --features spsc_raw -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features spsc_raw

deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: EmbarkStudios/cargo-deny-action@v2
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docs

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable

- name: Build documentation
run: cargo doc --workspace --no-deps --all-features

- name: Add redirect index
run: echo '<meta http-equiv="refresh" content="0; url=limen_core/index.html">' > target/doc/index.html

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: target/doc

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).

> **Note:** Limen is in alpha. APIs may change before v0.1.0.

## [0.1.0-alpha.1] — 2026-04-08

### Added

- **limen-core:** Core contract layer — traits and types for edges, nodes,
messages, policies, graph API, telemetry, scheduling, memory management,
platform clocks, and runtime lifecycle.
- **limen-core:** Multiple SPSC queue implementations (`SpscArrayQueue`,
`SpscVecDeque`, `SpscRingbufQueue`, `SpscConcurrentQueue`, `SpscPriority2`)
with shared conformance test suite.
- **limen-core:** Token-based zero-copy memory model with three manager
implementations (`StaticMemoryManager`, `HeapMemoryManager`,
`ConcurrentMemoryManager`).
- **limen-core:** `Tensor` and `Batch` message payload types with shape,
stride, and quantization support.
- **limen-core:** `GraphTelemetry` with fixed-buffer and I/O writer sinks.
- **limen-core:** `NoStdLinuxMonotonicClock` platform clock implementation.
- **limen-core:** Source, Sink, and InferenceModel node adapter traits.
- **limen-codegen:** Graph builder API and DSL parser for declarative graph
definitions.
- **limen-codegen:** Full graph validation (contiguous indices, port counts,
payload type matching, queue type consistency).
- **limen-codegen:** Code generator emitting fully-typed `no_std` graph structs
with optional `std`-only concurrent graph module.
- **limen-build:** `define_graph!` proc-macro wrapper for `limen-codegen`.
- **limen-runtime:** Skeleton runtime and scheduler module structure.
- **limen-platform:** Skeleton Linux platform adapter module.
- **limen-examples:** Integration tests exercising hand-written, codegen, and
proc-macro graph definitions across `no_std` and `std` feature variants.
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ to contribute and the terms under which contributions are accepted.

## Getting Started

Limen is currently in pre-release development. The repository will be made
public alongside the v0.1.0 release.
Limen is in alpha. The repository is public and contributions are welcome.

If you are interested in early access, collaboration, or have a use case you
would like to discuss, please open an issue or reach out directly.
If you have a use case you would like to discuss or would like to collaborate,
please open an issue or reach out directly.

### Development Setup

Expand Down
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ resolver = "2"

[workspace.package]
edition = "2021"
rust-version = "1.81"
license = "Apache-2.0"
license-file = "LICENSE-APACHE"
authors = ["Arlo Louis Byrne (idky137) <arlo@umbriel-systems.com>"]
repository = "https://github.com/idky137/limen"
homepage = "https://github.com/idky137/limen"
documentation = "https://docs.rs/limen-core"
readme = "README.md"
keywords = ["embedded", "inference", "runtime", "no-std", "graph"]
categories = ["embedded", "no-std::no-alloc", "science::robotics"]

[workspace.dependencies]
# Internal crates
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Limen

[![CI](https://github.com/idky137/limen/actions/workflows/ci.yml/badge.svg)](https://github.com/idky137/limen/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE-APACHE)
[![MSRV](https://img.shields.io/badge/MSRV-1.81-blue.svg)](#)

> **Portable, contract-enforcing computation graphs for AI-enabled embedded
> systems — from bare-metal microcontrollers to multi-threaded servers, in
> safe Rust.**
Expand Down Expand Up @@ -203,6 +207,7 @@ beyond.

| Document | Description |
|---|---|
| [API Reference](https://idky137.github.io/limen/) | Rustdoc API documentation (GitHub Pages) |
| [Architecture Guide](docs/architecture/index.md) | System design, memory model, execution flow |
| [Decision Records](docs/ADRs/) | Rationale behind key design decisions |
| [Roadmap](docs/roadmap.md) | Phased plan to v0.1.0 and stretch goals |
Expand Down
22 changes: 22 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]

[licenses]
allow = [
"Apache-2.0",
"MIT",
"Unlicense",
"Unicode-3.0",
]
# ringbuf uses non-standard SPDX "MIT/Apache-2.0" — cargo-deny needs an exception:
exceptions = [
{ allow = ["MIT", "Apache-2.0"], crate = "ringbuf" },
]

[bans]
multiple-versions = "warn"

[sources]
unknown-registry = "deny"
unknown-git = "deny"
15 changes: 14 additions & 1 deletion dev_utils/run-local-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# * std
# * spsc_raw
# - clippy for the same feature sets (unless `--no-clippy-or-fmt` is set)
# - cargo doc with -D warnings (unless `--no-clippy-or-fmt` is set)
#
# Options:
# --clean Run `cargo clean` after all CI checks pass
Expand Down Expand Up @@ -77,8 +78,11 @@ cargo test --all --no-default-features --all-targets --verbose
if [ "$SKIP_CLIPPY_AND_FMT" = false ]; then
printf " -> cargo clippy --all --no-default-features -- -D warnings\n"
cargo clippy --all --no-default-features -- -D warnings
printf " -> RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --no-default-features"
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --no-default-features
else
printf " -> clippy skipped (--no-clippy-or-fmt)\n"
printf " -> doc check skipped (--no-clippy-or-fmt)\n\n"
fi
printf "\n"

Expand All @@ -90,8 +94,11 @@ cargo test --all --features alloc --all-targets --verbose
if [ "$SKIP_CLIPPY_AND_FMT" = false ]; then
printf " -> cargo clippy --all --features alloc -- -D warnings\n"
cargo clippy --all --features alloc -- -D warnings
printf " -> RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features alloc"
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features alloc
else
printf " -> clippy skipped (--no-clippy-or-fmt)\n"
printf " -> doc check skipped (--no-clippy-or-fmt)\n\n"
fi
printf "\n"

Expand All @@ -103,8 +110,11 @@ cargo test --all --features std --all-targets --verbose
if [ "$SKIP_CLIPPY_AND_FMT" = false ]; then
printf " -> cargo clippy --all --features std -- -D warnings\n"
cargo clippy --all --features std -- -D warnings
printf " -> RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features std"
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features std
else
printf " -> clippy skipped (--no-clippy-or-fmt)\n"
printf " -> doc check skipped (--no-clippy-or-fmt)\n\n"
fi
printf "\n"

Expand All @@ -116,8 +126,11 @@ cargo test --all --features spsc_raw --all-targets --verbose
if [ "$SKIP_CLIPPY_AND_FMT" = false ]; then
printf " -> cargo clippy --all --features spsc_raw -- -D warnings\n"
cargo clippy --all --features spsc_raw -- -D warnings
printf " -> RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features spsc_raw"
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --features spsc_raw
else
printf " -> clippy skipped (--no-clippy-or-fmt)\n"
printf " -> doc check skipped (--no-clippy-or-fmt)\n\n"
fi
printf "\n"

Expand All @@ -127,7 +140,7 @@ if [ "$SKIP_CLIPPY_AND_FMT" = false ]; then
cargo fmt --all -- --check
printf "\n"
else
printf "==> rustfmt skipped (--no-clippy-or-fmt)\n\n"
printf "==> rustfmt skipped (--no-clippy-or-fmt)\n"
fi

printf "==> local CI passed\n\n"
Expand Down
11 changes: 10 additions & 1 deletion limen-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ name = "limen-build"
description = "Proc-macro wrapper for limen-codegen."
version = "0.1.0-alpha.1"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
license-file.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/limen-build"
readme.workspace = true
authors.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lib]
proc-macro = true
Expand Down
11 changes: 10 additions & 1 deletion limen-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ name = "limen-codegen"
description = "Reusable code generator for Limen graphs (proc-macro and build.rs compatible)."
version = "0.1.0-alpha.1"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
license-file.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/limen-codegen"
readme.workspace = true
authors.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
limen-core = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion limen-codegen/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! (no proc-macro input and no stringly-typed DSL).
//!
//! Use this from your crate’s `build.rs` to construct a
//! [`crate::ast::GraphDef`] with ordinary Rust types and expressions
//! `crate::ast::GraphDef` with ordinary Rust types and expressions
//! (typically authored via `syn::parse_quote!`). Then pass the finished AST to
//! `expand_ast_to_file(..)` to emit the generated graph implementation.
//!
Expand Down
4 changes: 2 additions & 2 deletions limen-codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ pub enum CodegenError {
Pretty(String),
}

/// Validate and emit Rust code from a typed [`ast::GraphDef`].
/// Validate and emit Rust code from a typed `ast::GraphDef`.
///
/// This is the low-level entry used by [`builder::GraphBuilder`] after it has
/// constructed the AST programmatically. The graph is validated before emission;
Expand Down Expand Up @@ -462,7 +462,7 @@ pub fn expand_str_to_file<P: AsRef<Path>>(spec: &str, dest: P) -> Result<PathBuf
write_tokens_pretty_or_raw(&tokens, dest)
}

/// Validate, emit, pretty-print, and **write** a typed [`ast::GraphDef`] to `dest`.
/// Validate, emit, pretty-print, and **write** a typed `ast::GraphDef` to `dest`.
///
/// Combines [`expand_ast_to_tokens`] with [`write_tokens_pretty_or_raw`].
/// Parent directories are created if needed.
Expand Down
11 changes: 10 additions & 1 deletion limen-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ name = "limen-core"
description = "Limen core contracts and primitives."
version = "0.1.0-alpha.1"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
license-file.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/limen-core"
readme.workspace = true
authors.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = []
Expand Down
Loading