High-quality JavaScript bindings for OCaml
Find a file
2021-04-29 14:31:23 +02:00
.github/workflows Improve CI 2021-04-15 01:41:08 +09:00
lib Add an example of VS Code notebook API 2021-04-29 14:31:23 +02:00
script Working jsonrpc example 2021-04-28 17:51:13 +02:00
.gitattributes Initial commit 2021-04-12 20:17:11 +02:00
.gitignore Use a single interface 2021-04-19 14:31:27 +02:00
.ocamlformat Initial commit 2021-04-12 20:17:11 +02:00
.ocamlformat-ignore Add original interfaces from ts2ocaml 2021-04-15 11:29:31 +02:00
CHANGES.md Initial commit 2021-04-12 20:17:11 +02:00
dune compile vscode-jsonrpc 2021-04-15 19:58:53 +02:00
dune-project Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00
es5.opam Improve CI 2021-04-15 01:41:08 +09:00
es2015.opam Improve CI 2021-04-15 01:41:08 +09:00
es2016.opam Improve CI 2021-04-15 01:41:08 +09:00
es2017.opam Improve CI 2021-04-15 01:41:08 +09:00
es2018.opam Improve CI 2021-04-15 01:41:08 +09:00
es2019.opam Improve CI 2021-04-15 01:41:08 +09:00
es2020.opam Improve CI 2021-04-15 01:41:08 +09:00
LICENSE Initial commit 2021-04-12 20:17:11 +02:00
Makefile Initial commit 2021-04-12 20:17:11 +02:00
node.opam Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00
package-lock.json Working jsonrpc example 2021-04-28 17:51:13 +02:00
package.json Working jsonrpc example 2021-04-28 17:51:13 +02:00
README.md Working jsonrpc example 2021-04-28 17:51:13 +02:00
vscode-jsonrpc.opam Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00
vscode-languageclient.opam Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00
vscode-languageserver-protocol.opam Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00
vscode-languageserver-types.opam Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00
vscode-test.opam Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00
vscode.opam Generate bindings for vscode* libraries 2021-04-15 16:15:54 +02:00

OCaml JavaScript bindings

Actions Status

High-quality JavaScript bindings for OCaml.

Want bindings for a library? Open an issue!

The bindings have been generated using ts2ocaml from the TypeScript type definitions found in https://github.com/Microsoft/TypeScript/tree/master/lib.

The generated bindings have then been manually modified to improve the API. Notably the bindings differ from the underlying implementation in the following ways:

  • No ArrayLike, ArrayBufferLike, PromiseLike and co. OCaml does not have implicits (yet), so we just replace all of these with their counterparts (ArrayLike is replaced by Array)
  • We don't include Symbols accessors. gen_js_api does not support this, and it really does not seem useful anyways

The bindings don't depend on any PPX (and in particular, they don't depend on gen_js_api). Instead, the generated bindings are promoted and the installable libraries copies the promoted files.

To do

  • Replace cast with include module type of
  • Create the on functions
  • investigate long function variants (''''')
  • Add builder for VSCode