node-app-api 5.22.1

Shared types and C ABI definitions for the Node-App host API v1
Documentation
# node-app-api

> **Status: `1.0.0-experimental`** — see the [SDK README]../rust/README.md#stability for stability semantics.

Shared types and C ABI definitions for the **Node Host API v1**.

This is a low-level building block — most users want one of the higher-level SDKs:

- **Rust**: [`node-app-sdk-rust`]../rust/ — trait + macro for cdylib plugins.
- **TypeScript / Bun**: [`@econ-v1/app-sdk`]../typescript/ — IPC-based plugins.
- **C / C++ / Go / Zig**: link against [`core/host-abi-v1/include/node-host-api-v1.h`]../../core/host-abi-v1/ directly.

## What's in here

- `src/ffi.rs``#[repr(C)]` structs (`FfiResult`, `NodeAppMetadata`, `NodeAppVTable`) and the `_node_app_entry` symbol contract.
- `src/context.rs``NodeAppContext`, the host-callback table passed to apps during init.
- `src/types.rs` — JSON-serializable types shared across native and scripted apps (`AppRequest`, `AppResponse`, `CapabilityRequest`, etc.).
- `build.rs` + `cbindgen.toml` — auto-generates the C header at `core/host-abi-v1/include/node-host-api-v1.h`.

## API version

```rust
pub const API_VERSION: u32 = 1;
```

The host refuses to load apps whose `NodeAppMetadata.api_version` does not match. Bumping this constant requires a parallel `core/host-abi-v2/` directory.

## License

Licensed under either of

- Apache License, Version 2.0
- MIT License

at your option.