init: Engram v0.1 — native memory substrate for accumulating intelligence

Memory is not stored and retrieved — it is activated and propagated.
Implements the spreading activation model with salience decay, typed edges,
four memory tiers, and flat cosine vector search over a sled embedded store.
This commit is contained in:
Will Anderson
2026-04-27 15:37:42 -05:00
commit 1a609502c8
20 changed files with 2375 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# Go Bindings (planned v0.2)
Engram-core will be exposed to Go via CGo and the `engram-ffi` shared library.
```go
// #cgo LDFLAGS: -L../../target/release -lengram_ffi
// #include "engram.h"
import "C"
import "unsafe"
func Open(path string) *EngramDb {
cpath := C.CString(path)
defer C.free(unsafe.Pointer(cpath))
handle := C.engram_open(cpath)
if handle == nil {
return nil
}
return &EngramDb{handle: handle}
}
```
## Status
Stub only. The header file (`engram.h`) will be generated by `cbindgen` in v0.2.
Full idiomatic Go wrapper with context support and error returns planned.
+21
View File
@@ -0,0 +1,21 @@
# Kotlin / JVM Bindings (planned v0.2)
Engram-core will be exposed to Kotlin/JVM via the C FFI layer in `engram-ffi`.
## Approach
Use JNA (Java Native Access) or JNI with the compiled `libengram_ffi` shared library:
```
cargo build --release -p engram-ffi
# produces: target/release/libengram_ffi.dylib (macOS) / libengram_ffi.so (Linux)
```
The header file will be generated by `cbindgen` from `engram-ffi/src/lib.rs`.
## Status
Stub only. FFI functions exposed: `engram_open`, `engram_close`, `engram_node_count`,
`engram_edge_count`, `engram_decay`, `engram_free_string`.
Full Kotlin idiomatic wrapper (data classes, coroutine-friendly suspend functions) planned for v0.2.
+21
View File
@@ -0,0 +1,21 @@
# TypeScript Bindings (planned v0.2)
Two paths for TypeScript/Node.js:
## Option A — WASM (browser + Node)
```
cargo build --target wasm32-unknown-unknown --release -p engram-core
wasm-bindgen target/wasm32-unknown-unknown/release/engram_core.wasm --out-dir pkg/
```
Requires `wasm-bindgen` annotations on public API. Browser-compatible, no native deps.
## Option B — Node native addon (server-side)
Use `napi-rs` to generate a Node.js native addon from `engram-core`. Faster than WASM for
server-side agents, but requires a native build step per platform.
## Status
Stub only. WASM target is the preferred path for v0.2 given the local-first, embedded philosophy.