Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rosenbergm/elm-grpc
Make gRPC-web requests directly from Elm!
https://github.com/rosenbergm/elm-grpc
elm elm-lang grpc grpc-web
Last synced: 2 months ago
JSON representation
Make gRPC-web requests directly from Elm!
- Host: GitHub
- URL: https://github.com/rosenbergm/elm-grpc
- Owner: rosenbergm
- License: bsd-3-clause
- Created: 2022-12-03T22:14:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-04T11:39:06.000Z (about 2 years ago)
- Last Synced: 2024-09-30T05:21:10.316Z (3 months ago)
- Topics: elm, elm-lang, grpc, grpc-web
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📡 elm-grpc
elm-grpc allows you to communicate with gRPC using gRPC-web purely from Elm. That means no ports and no libraries that add _300 KB_ to your bundle size.
It uses the wonderful [`elm-protocol-buffers`](https://github.com/eriktim/elm-protocol-buffers) library and integrates with fully-generated types from [`protoc-gen-elm`](https://github.com/andreasewering/protoc-gen-elm).
> ⚠️ This library is under very heavy development and currently implements only basic features of gRPC-web.
## 📥 Installation
```bash
elm install rosenbergm/elm-grpc
# If you're not a masochist, install protoc-gen-elm as well to generate all the necessary code.
yarn global add protoc-gen-elm
```## 📋 Usage
1. Generate Elm types, encoders and decoders from Proto files
```bash
protoc --elm_out=. api.proto
```
2. Go to the [example](example)! The best way to find out how this library works is to see it in action!## 🙏 Special thanks
Thanks to [@michaljanocko](https://github.com/michaljanocko) for introducing me to Elm (and FP in general) a few years ago. It changed my whole perspective on writing code.