{"repo":"lightninglabs/falafel","free":true,"listed":false,"github":"https://github.com/lightninglabs/falafel","clone":"git clone https://github.com/lightninglabs/falafel.git","description":"Go tool to generate go APIs for gRPC services for use on mobile/WASM platforms.","language":"Go","stars":34,"topics":["lnd","bitcoin","lightning-network","wasm","grpc","protobuf","golang"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"falafel falafel is a protoc plugin written in go that is used to generate gomobile compatible APIs for gRPC services for use on mobile platforms. Currently being used with lnd. Description falafel translates protobuf definitions to gomobile compatible APIs. Behind this API we directly talk to the gRPC server using an in-memory gRPC client, ensuring all communication happens in-process using serialized protocol buffers, without needing to expose the gRPC server on an open port. To support streaming RPCs, like subscribing to real-time updates, callbacks are provided for all APIs. The gRPC server must support using custom listeners. Getting started Pass the falafel plugin to protoc with custom options. Here is an example how falafel is used with lnd : With the go bindings generated, define an entry point for the application to start the gRPC service: The gRPC server should be started by listening on the passed listeners. Compiling with gomobile Package lndmobile is now ready to be cross-compiled using gomobile : Generating JSON/WASM stubs falafel was initially built as a code generator specifically for generating gomobile compatible RPC stubs for lnd . But because generating stub code from protobuf files is a very useful task, falafel also has a secondary operating mode in which it generates stubs for interacting with a gRPC interface from a JSON/WASM context. What are JSON/WASM stubs? In short, the JSON stubs generated by falafel is helper code that allows a dynamic language en","default_branch":null,"files":null,"tree":[],"storefront":"/r/lightninglabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lightninglabs/falafel/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}