hbbft icon indicating copy to clipboard operation
hbbft copied to clipboard

API for use from other languages?

Open KrishnaPG opened this issue 5 years ago • 1 comments

Wondering how to make this work with other languages. Is there an API to consume this library from other languages, such as JS? Something like REST/HTTP or Websocket messaging / gRPC?

KrishnaPG avatar Oct 24 '19 01:10 KrishnaPG

There's no API for it, but it should be straightforward to write one. Since hbbft only implements the abstract protocol and is meant to be used as a library, the best way to do it might be via FFI: You could write (in Rust) a wrapper that exposes a C-compatible API, which can then be used with any language's FFI features. But writing a small Rust application around it that communicates via REST or gRPC with other components could work, too.

afck avatar Oct 24 '19 06:10 afck