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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "cliffvm"
version = "0.1.1"
version = "0.2.0"
edition = "2021"
description = "The cliffhanger VM: a reactive graph of entities with getters and setters, a SQLite store, an HTTP door and drivers; the engine of babyseat"
license = "MIT"
repository = "https://github.com/chedim/cliffvm"
readme = "README.md"
# the tests that need babyseat's packs are not part of the package (tests/babyseat/README.md)
exclude = ["/.github", "/tests/babyseat"]
exclude = ["/.github"]
keywords = ["graph", "vm", "reactive", "agents"]
categories = ["development-tools"]

# the library keeps its old name: babyseat's Python extension and its tests say `membrane_vm`; it is renamed when babyseat takes cliffvm as a dependency (the plan in README.md)
# the library is `cliffvm`, as the package and the program are (it was `membrane_vm` until 0.2.0)
[lib]
name = "membrane_vm"
name = "cliffvm"
crate-type = ["cdylib", "rlib"]

# THE ONE PLACE THE COMMAND'S NAME LIVES (docs/cliffvm.md): rename the app by changing `name` here (the tests read CARGO_BIN_EXE_<name>: one more line each)
Expand Down
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@

The **cliffhanger VM**: a reactive graph of entities with getters and setters, written in Rust, with a SQLite store, an HTTP door and drivers for files, commands, HTTP, SQL and cron. Its packs and its pages are written in **c1f**, the field's own language ([chedim/cliffhanger](https://github.com/chedim/cliffhanger)). It is the engine of [babyseat](https://github.com/chedim/babyseat), the AI seat whose memory is a graph the model programs; it also builds for the browser (wasm) and talks to other programs over [GraphLink](https://github.com/chedim/graphlink).

**Status: just moved here.** This repository was cut from the `native/` folder of babyseat with its history (47 commits), so `git log` shows the engine's life so far. Until the move is finished, babyseat's `native/` is still the copy the releases are built from, and **this repository does not build and test on its own yet**: many tests start the real seat on babyseat's packs (`membrane/packs`, `membrane/apps/barest.c1f`) and read them through `../membrane`. The plan:

1. This copy, with its history (done).
2. CI here for the engine-only tests (about half of them), and a release workflow that builds the binary and the wasm.
3. Babyseat takes cliffvm as a pinned dependency and keeps the tests that run its own packs.
4. The wasm output path moves, then `native/` is deleted from babyseat (only once the previous step is green).

Until step 4, make engine changes in babyseat.
**Status: the engine lives here.** This repository was cut from the `native/` folder of babyseat with its history, so `git log` shows the engine's life so far. Engine changes are made here and released here (a tag-triggered release builds the six platform binaries); babyseat takes the release named by its `CLIFFVM_VERSION`, and `native/` is gone from it. The tests that start the real seat on babyseat's own packs and apps live in babyseat (`seat-tests/`), where they run on the release (the library and the program).

## Build

```
cargo build --release --no-default-features --features bin # the seat: target/release/cliffvm (and graphlink-bridge)
```

The browser build is `--no-default-features --features wasm` (`build-web.sh`; today it writes into babyseat's page folder).
The browser build is `--no-default-features --features wasm` (`build-web.sh`, which writes to `../membrane/apps/barest.c1f/ui` next to this folder: babyseat's `scripts/build_wasm.sh` clones a tag, runs it and copies the three files).

License: MIT.

Expand Down
8 changes: 4 additions & 4 deletions src/bin/cliffvm.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! cliffvm: the field VM as a standalone app, no Python (docs/cliffvm.md). main() parses arguments and runs the pack folder.
use std::sync::atomic::{AtomicBool, Ordering};

use membrane_vm::cli::{self, Cmd};
use cliffvm::cli::{self, Cmd};

#[cfg(feature = "alloc-stats")]
#[global_allocator]
static ALLOC: membrane_vm::alloc_stats::Counting = membrane_vm::alloc_stats::Counting;
static ALLOC: cliffvm::alloc_stats::Counting = cliffvm::alloc_stats::Counting;

static STOP: AtomicBool = AtomicBool::new(false);
extern "C" fn on_term(_: libc::c_int) { STOP.store(true, Ordering::SeqCst); }
Expand Down Expand Up @@ -33,9 +33,9 @@ fn main() {
}
Ok(Cmd::Run(r)) => {
#[cfg(feature = "alloc-stats")]
membrane_vm::alloc_stats::report();
cliffvm::alloc_stats::report();
#[cfg(feature = "phase-trace")]
membrane_vm::trace::report();
cliffvm::trace::report();
unsafe {
libc::signal(libc::SIGTERM, on_term as *const () as usize);
libc::signal(libc::SIGINT, on_term as *const () as usize);
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! membrane_vm: the cliffhanger VM, native (#971): the engine behind the `cliffvm` seat and the browser build (wasm). `Core` takes and
//! cliffvm: the cliffhanger VM, native (#971): the engine behind the `cliffvm` seat and the browser build (wasm). `Core` takes and
//! gives values as JSON text.

pub mod adapters;
Expand Down
6 changes: 3 additions & 3 deletions tests/adapters_994.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! #994 row 5: calls as writes (#959/#956) as on-setters vs a hand-coded reference of adapters.py `_written_call`.
//! Replay one journal of `invoke` writes; after EVERY write the object's receipt props, its call path, the Method's
//! consumed slot and the asked effects must equal the reference; the whole-field checksum (FNV-1a) is stable and sensitive.
use membrane_vm::adapters::CLASS_METHOD;
use membrane_vm::fields::Fields;
use membrane_vm::vm::{Core, Host, Write};
use cliffvm::adapters::CLASS_METHOD;
use cliffvm::fields::Fields;
use cliffvm::vm::{Core, Host, Write};
use serde_json::{json, Map, Value as J};

struct H;
Expand Down
4 changes: 2 additions & 2 deletions tests/apps_1143.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//! is the root of trust: its packs are privileged, nothing is trusted by name, a later app is a layer above with no privilege.
mod common;

use membrane_vm::expr;
use membrane_vm::host::{Host, Options};
use cliffvm::expr;
use cliffvm::host::{Host, Options};
use serde_json::{json, Map, Value as J};
use std::path::{Path, PathBuf};

Expand Down
1 change: 0 additions & 1 deletion tests/babyseat/README.md

This file was deleted.

206 changes: 0 additions & 206 deletions tests/babyseat/admin_1143.rs

This file was deleted.

Loading
Loading