Skip to content

[ROADMAP] Language binding #36

Description

@gg582

Support Range

  • Rust (Already Implemented, Need Hardening)
  • Go
  • Java
  • Zig
  • D
  • F#

How should we do?

Plan A. C ABI and FFI - Recommended

Pros

  • Fast development: high code reuse without modifying the core C codebase
  • Automation friendly: bindings can be generated using tools like bindgen, cgo, Java FFM, and P/Invoke
  • Natural fit for systems languages: Rust and Zig call C ABI natively with zero overhead

Cons

  • FFI call overhead in runtime managed languages: Go goroutine stack switching and JVM boundary checks introduce latency
  • Manual lifecycle management: developers must manually bridge C pointers to target language GC or ownership models
  • Deployment complexity: dynamically loaded shared libraries require strict path and environment management in production

Plan B. Native C API Extensions

Pros

  • Tight runtime integration: binds directly to host GC lifecycles, exceptions, and internal object layouts
  • Lowest overhead for managed environments such as direct JNI access

Cons

  • Extreme development overhead: requires learning and writing separate glue code for each language runtime
  • Incompatible with several target languages: Rust, Zig, and F# do not use traditional C extensions and rely directly on C ABI
  • Build pipeline fragmentation: maintaining compilation matrices and toolchains across multiple languages and targets creates severe technical debt

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions