spikard-ffi 0.16.1

Rust-centric multi-language HTTP framework with polyglot bindings
docs.rs failed to build spikard-ffi-0.16.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: spikard-ffi-0.0.1

Spikard FFI — Part of the spikard polyglot web toolkit.

C/C++ FFI bindings for the spikard HTTP framework. Stable ABI shared library for native integration, cross-language bridging (Go, Zig, Kotlin JNI), and embedding the Rust HTTP core into any C-compatible host.

Install · Quick example · Features · Docs


What this package provides

  • C ABI stable interface — shared and static library surface for custom hosts

  • Type-safe routing — HTTP definitions with path, query, body, and header validation across all bindings

  • Spec-driven codegen — OpenAPI 3.0, AsyncAPI 3.0, GraphQL SDL, and JSON-RPC 2.0 support

  • Cross-language parity — same DTOs, fixtures, and error model prevent runtime drift

  • Tower middleware — compression, rate limiting, timeouts, auth (JWT/API key), static files

  • Lifecycle hooksonRequest, preValidation, preHandler, onResponse, onError

Installation

cargo add spikard-ffi

System Requirements

  • C99 or C++11 compiler; spikard-ffi static/shared library from GitHub Releases

Quick example

See the spikard repository for usage examples and guides.

Features

Feature Support
Type-safe routing Path, query, body, and header parameter validation
Request extraction Typed structs for JSON, form data, multipart, and raw bodies
Spec support OpenAPI 3.0 · AsyncAPI 3.0 · GraphQL SDL · JSON-RPC 2.0
Middleware Compression, rate limiting, timeouts, authentication, static files
Lifecycle hooks Request, pre-validation, pre-handler, response, and error hooks
WebSocket & SSE Bidirectional streams and server-sent events
Error handling Consistent error responses across all bindings via ProblemDetails
Fixture testing Shared JSON fixtures for behavioral consistency across languages

See examples in the repository.

See examples in the repository.

See examples in the repository.

Resources

License

MIT License — see LICENSE for details.