All Projects → sikanhe → reason-nodejs

sikanhe / reason-nodejs

Licence: MIT License
Node bindings for Reason and Bucklescript

Programming Languages

reason
219 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to reason-nodejs

bs-lwt
BuckleScript bindings for Lwt
Stars: ✭ 26 (-75.24%)
Mutual labels:  reasonml
reason-rt-binding-generator
Reason binding generator for react-toolbox
Stars: ✭ 18 (-82.86%)
Mutual labels:  reasonml
bs-graphql-bindings
BuckleScript binding for graphql-js
Stars: ✭ 50 (-52.38%)
Mutual labels:  reasonml
dokusho
Simple Japanese reading stats tracker
Stars: ✭ 12 (-88.57%)
Mutual labels:  reasonml
reasoncoin
No description or website provided.
Stars: ✭ 16 (-84.76%)
Mutual labels:  reasonml
graphql-reason-server-example
An example project to write a GraphQL server using Reason
Stars: ✭ 19 (-81.9%)
Mutual labels:  reasonml
rebez
Cubic bezier implementation in Reason / OCaml.
Stars: ✭ 31 (-70.48%)
Mutual labels:  reasonml
relude-random
Composable random generators based on the PCG paper
Stars: ✭ 15 (-85.71%)
Mutual labels:  reasonml
advent-2017
Advent of Code 2017
Stars: ✭ 16 (-84.76%)
Mutual labels:  reasonml
astro-design
Astro Design Components
Stars: ✭ 20 (-80.95%)
Mutual labels:  reasonml
ocaml-mqtt
MQTT client for OCaml/ReasonML
Stars: ✭ 14 (-86.67%)
Mutual labels:  reasonml
timerlab
⏰ A simple and customizable timer
Stars: ✭ 94 (-10.48%)
Mutual labels:  reasonml
ruby-to-michelson
(Secure) Ruby to Liquidity w/ ReasonML Syntax / Michelson (Source-to-Source) Cross-Compiler Cheat Sheet / White Paper
Stars: ✭ 16 (-84.76%)
Mutual labels:  reasonml
reason-phoenix
ReasonML/ReScript bindings for the Phoenix javascript library
Stars: ✭ 14 (-86.67%)
Mutual labels:  reasonml
shmup.re
Learning Reason/OCaml by making an old-school canvas game.
Stars: ✭ 24 (-77.14%)
Mutual labels:  reasonml
qnd
Quick and Dirty development builds
Stars: ✭ 19 (-81.9%)
Mutual labels:  reasonml
re-blossom
A Reason implementation of the blossom maximum-matching algorithm
Stars: ✭ 15 (-85.71%)
Mutual labels:  reasonml
react-multiversal
React components that works everywhere (iOS, Android, Web, Node)
Stars: ✭ 43 (-59.05%)
Mutual labels:  reasonml
onetricks.net
(WIP) kayn-powered (typescript node.js) ReasonReact app presenting you a dashboard of high ELO one trick ponies in League of Legends
Stars: ✭ 13 (-87.62%)
Mutual labels:  reasonml
bs-most
Reason/BuckleScript bindings for the Most.js reactive toolkit
Stars: ✭ 41 (-60.95%)
Mutual labels:  reasonml

reason-nodejs

Project Status

Update (5/5/2020): Announcing the beta release of reason-node! You can find it on NPM here, and install it from your terminal using the installation instructions below.

We invite everyone to try it out in your own projects, and to provide any feedback you want. GitHub issues are a great way to provide such feedback, since those are easy for us to track and manage. However, if you need any help or have specific questions, don't hesitate to contact us on Discord!

Happy hacking!


Update (3/19/2020): reason-node is nearly ready for its first public release. Most of the important design decisions have been made & implemented, and most of the API surface is becoming relatively stable. There are still a few gaps here and there, and we intend to refine the API over time as new ideas emerge. Therefore, we will likely push an alpha release first, to give us some space to make breaking changes if needed, based on community feedback. We will post updates here and in the ReasonML Discord server.


Update (2/13/2020): This library is still under construction. Some of the core design details are still being ironed out. Therefore we cannot guarantee API stability at this time. We intend to achieve API stability very soon. We will make an announcement on the ReasonML Discord server when we reach that goal.


Installation

Using the yarn package manager:

yarn add reason-nodejs

Using the npm package manager:

npm i reason-nodejs

Goal of this library

Help all Reason Node.js apps and libraries to be built faster by reducing the time spent on hand written bindings.

Non-Goals

  • Have 100% coverage of Node.js api surface - Due to lack of man power for testing and maintaining, we should only have enough surface to cover all common use cases. But we should have enough coverage that developers only rarely have to write a custom binding.
  • Ensure all APIs are idiomatic Reason and 100% typesafe - This library should be as low-level as possible to allow for minimal context switching between offical Node.js documentation and the Reason equilvalent. And due to the dynamic nature of the JS API, bending it to be idiomatic Reason will lead to a ton of bikeshedding in design as well as sacrificing maintainability.

Principles

  • When available, we prefer to bind to the promise version of the library instead of the callback version to reduce binding surface.
  • Use subtyping only where the benefit is huge. We use subtyping for various APIs that implement Node Streams, such as HTTP Request and Response, FileSystem streams, Crypto streams, and etc. This allows us to use a single set of functions to manipulate and combine streams across different modules. For example:

Stream a file into stdout:

Fs.createReadStream("/path")
  ->Stream.pipe(Process.(stdout(process)))
  ->Stream.onError(_ => Js.log("handleError"))

Echo server:

Http.createServer((request, response) => {
  request->Stream.onData(data => Js.log(data))
  request->Stream.pipe(response)->ignore
});

Contributing

We welcome and encourage anyone to contribute! In order to minimize confusion and avoid any wasted effort, here are some recommendations:

  • If you notice a bug or a typo, feel free to create an issue or submit a PR to fix it.
  • If you want to request a feature/improvement, it's best to create an issue first, so we can discuss the details. The last thing we want is for you to spend a lot of valuable time and energy creating a pull request when it doesn't fit in with the project goals. That doesn't mean we won't merge your PR, but we cannot guarantee it. We prioritize code review and open discussion.
  • If you notice gaps in the documentation and want to help us fill in those gaps, you can help us out by submitting a PR, or by creating an issue and providing a draft of the docs you want to add.
  • If you have concerns about our implementations or design decisions (e.g. type soundness, complexity, ergonomics, edge cases, etc.), you should submit an issue voicing your concerns. We gladly welcome critique from the community. We want this library to be as useful as possible, so we want to hear from you!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].