# clawhdf5-android A C ABI over [`clawhdf5-agent`](../clawhdf5-agent/README.md) for Android apps: a `cdylib` exporting `extern "C"` functions (`edgehdf5_*`, a name kept from the project's earlier "edgehdf5" days) that manage an `HDF5Memory` through an opaque handle. The functions are plain C symbols, not JNI-mangled `Java_...` entry points: a Kotlin/Java app calls them through a thin JNI shim or JNA of its own. No such shim, Gradle project or AAR is in this repository, and the crate is not built for an Android target in CI (only its host-side unit tests run with the workspace). ## Functions | Function | What | |---|---| | `edgehdf5_create(path, agent_id, embedding_dim)` / `edgehdf5_open(path)` | a handle, or null on failure | | `edgehdf5_close(handle)` | drop the store; what is not yet checkpointed stays in its WAL, as with any `HDF5Memory` | | `edgehdf5_save(handle, ...)` | save one entry; the embedding length is checked against the store's dimension before the pointer is read | | `edgehdf5_delete`, `edgehdf5_count`, `edgehdf5_count_active` | | | `edgehdf5_hybrid_search(handle, query, len, text, vector_weight, keyword_weight, max_results, out_indices, out_scores, out_chunks)` | results into caller-provided arrays; returns the number written | | `edgehdf5_add_session`, `edgehdf5_get_session_summary` | sessions | | `edgehdf5_add_entity`, `edgehdf5_add_relation` | knowledge graph | | `edgehdf5_free_string` | free a string this library returned | Every function is `unsafe`: the caller guarantees valid, NUL-terminated strings and correctly sized buffers (see each function's `# Safety` section), and serialises access to a handle; separate handles are independent. ## Build ```bash cargo build --release -p clawhdf5-android # host build; for a device, add --target aarch64-linux-android with the NDK's linker configured ``` It depends on `clawhdf5-agent` with **default features off**, so there is no HNSW index (the vector stage is an exact linear scan) and no rayon pool. No C is compiled. ## License MIT