nats-rpc / elm-nrpc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elm NRPC

Elm NRPC is a NRPC client for the elm language.

It provides a Elm library that implements the NRPC calling patterns, and a protoc plugin for generating Elm source code from a .proto file.

It relies on elm-nats for handling the NATS protocol, eriktim/elm-protocol-buffers and the protoc-gen-elm generated files for handling the protobuf encoding/decoding.

The 'examples/alloptions' application demonstrate all the features, it is probably a good idea to have look.

Install protoc-gen-elm-nrpc

npm install -g protoc-gen-elm-nrpc

Compile the .proto files

NO_GRPC=true protoc \
    -I <include-path> \
    --elm_out "excludeFile=google/protobuf/descriptor.proto:src/" \
    --elm-nrpc_out "src/" \
    --plugin "protoc-gen-elm-nrpc=elm-nrpc/protoc-gen-elm-nrpc/index.js" \
	file.proto

About

License:MIT License


Languages

Language:Elm 99.9%Language:JavaScript 0.0%Language:Makefile 0.0%Language:Shell 0.0%