{"id":33919110,"url":"https://github.com/eventdbx/eventdbx-rs","last_synced_at":"2026-03-10T12:33:27.420Z","repository":{"id":323614310,"uuid":"1093956669","full_name":"eventdbx/eventdbx-rs","owner":"eventdbx","description":"Async Rust client for EventDBX","archived":false,"fork":false,"pushed_at":"2025-11-27T11:45:06.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T14:55:31.347Z","etag":null,"topics":["capnp","client","event-sourcing","eventdbx"],"latest_commit_sha":null,"homepage":"https://docs.eventdbx.com/client-sdks/rust","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eventdbx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T04:12:02.000Z","updated_at":"2025-11-27T11:45:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/eventdbx/eventdbx-rs","commit_stats":null,"previous_names":["eventdbx/eventdbx-client","eventdbx/eventdbx-rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eventdbx/eventdbx-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventdbx%2Feventdbx-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventdbx%2Feventdbx-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventdbx%2Feventdbx-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventdbx%2Feventdbx-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eventdbx","download_url":"https://codeload.github.com/eventdbx/eventdbx-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventdbx%2Feventdbx-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30333518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capnp","client","event-sourcing","eventdbx"],"created_at":"2025-12-12T08:42:21.676Z","updated_at":"2026-03-10T12:33:27.410Z","avatar_url":"https://github.com/eventdbx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EventDBX Rust Client\n\nAsync Rust client for EventDBX. The library wraps the Cap'n Proto\nwire protocol exposed by EventDBX so applications can programmatically list aggregates\nand events, append or patch data, select subsets of fields, toggle archive status, and\nverify Merkle roots.\n\n## Features\n\n- Tokio-based TCP client with automatic hello handshake and per-request timeouts.\n- Noise transport security is on by default; call `with_noise(false)` to request plaintext for tests.\n- High-level APIs for list/get/select aggregate queries, list events, append/create/patch\n  events, archive toggling, and Merkle verification.\n- Mutation builders support notes, metadata, and publish targets to direct jobs to specific plugins.\n- Reusable `ClientConfig` so multiple clients can share the same runtime settings.\n\n## Requirements\n\n- Rust 1.75+ (edition 2024) with Cargo.\n- Access to an EventDBX control server endpoint and credentials (token + tenant).\n- The Cap'n Proto schema lives in `proto/control.capnp`; the build script compiles it\n  automatically, so no manual `capnp compile` invocation is needed.\n\n## Building\n\n```bash\ncargo build\n```\n\nRunning `cargo check` is usually faster for edit/compile cycles:\n\n```bash\ncargo check\n```\n\n## Example Usage\n\n```rust\nuse eventdbx_client::{\n    AppendEventRequest, ClientConfig, EventDbxClient, ListAggregatesOptions, PatchEventRequest,\n    PublishTarget,\n};\nuse serde_json::json;\n\n#[tokio::main]\nasync fn main() -\u003e eventdbx_client::Result\u003c()\u003e {\n    let config = ClientConfig::new(\"127.0.0.1\", \"\u003ctoken\u003e\")\n        .with_tenant(\"tenant-123\") // custom tenant\n        .with_port(7000); // custom port, 6363; call `.with_noise(false)` to request plaintext\n    let client = EventDbxClient::connect(config).await?;\n\n    // list aggregates\n    let aggregates = client\n        .list_aggregates(ListAggregatesOptions::default())\n        .await?;\n    println!(\"Aggregates: {}\", aggregates.aggregates);\n\n    // append a new event\n    let append = AppendEventRequest::new(\n        \"person\",\n        \"p-110\",\n        \"person_status_updated\",\n        json!({ \"status\": \"active\" }),\n    );\n    append\n        .publish_targets\n        .push(PublishTarget::new(\"search-indexer\").with_mode(\"event-only\"));\n    client.append_event(append).await?;\n\n    // patch an existing event with JSON Patch semantics\n    let patch = PatchEventRequest::new(\n        \"person\",\n        \"p-110\",\n        \"person_status_updated\",\n        json!([{ \"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\" }]),\n    );\n    client.patch_event(patch).await?;\n\n    Ok(())\n}\n```\n\nSee `src/main.rs` for `dbxtest-cli`, a small binary that can exercise individual API calls.\nConfigure it via environment variables (or pass `--host/--port/--token/--tenant`):\n\n- `EVENTDBX_HOST` (required)\n- `EVENTDBX_PORT` (optional, defaults to `6363`)\n- `EVENTDBX_TOKEN` (required)\n- `EVENTDBX_TENANT` (optional, defaults to `\"default\"`)\n\nAvailable commands mirror the client surface area: `list`, `select`, `get`, `events`, `append`,\n`patch`, `create`, `archive`, and `verify`. Any argument you omit is filled with synthetic data\ngenerated via the `fake` crate, which makes it easy to sanity-check serialization. Examples:\n\n```bash\ncargo run list --take 5\ncargo run append --aggregate-type person --aggregate-id p-1 \\\n  --event-type person_created --payload '{\"status\":\"active\"}'\ncargo run verify --aggregate-type person --aggregate-id p-1\n```\n\n## Updating the Schema\n\n1. Modify `proto/control.capnp`.\n2. Run `cargo build` (or `cargo check`). The build script scans `proto/` and regenerates\n   `control_capnp.rs` inside `OUT_DIR`.\n3. Re-run tests or your application.\n\n## Testing\n\n```bash\ncargo test\n```\n\nNo integration tests are checked in yet, but the command validates the build and runs any\nfuture unit tests. Combine with `cargo fmt --check` in CI to ensure formatting.\n\n## Contributing\n\n1. Run `cargo fmt` \u0026 `cargo clippy --all-targets` before submitting patches.\n2. Ensure any schema changes are reflected in `proto/control.capnp` and the corresponding\n   client/type definitions.\n3. Document new APIs in this README or Rustdoc comments where appropriate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feventdbx%2Feventdbx-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feventdbx%2Feventdbx-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feventdbx%2Feventdbx-rs/lists"}