Skip to content

Commit

Permalink
Use doc-new
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Mar 4, 2024
1 parent 24ba38e commit 724a521
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: github.ref == 'refs/heads/main'
with:
target_branch: gh-pages
build_dir: _build/default/_doc/_html/
build_dir: _build/default/_doc_new/html/docs/local/quickjs
env:
GITHUB_TOKEN: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ documentation-watch: ## Generate odoc documentation

.PHONY: documentation-serve
documentation-serve: documentation ## Open odoc documentation with default web browser
open _build/default/_doc/_html/index.html
open _build/default/_doc_new/html/docs/local/quickjs/index.html
7 changes: 4 additions & 3 deletions dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(documentation
(package quickjs))
(dirs lib test quickjs demo docs)

(dirs lib test quickjs demo)
(documentation
(package quickjs)
(mld_files index))

(library
(name bindings)
Expand Down
18 changes: 16 additions & 2 deletions index.mld
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{1:intro Introduction}
{0 quickjs}

regexp
[quickjs.ml] is a set of OCaml bindings for {{:https://bellard.org/quickjs}QuickJS}. QuickJS is a small and embeddable JavaScript engine. It supports the ES2020 specification including modules, asynchronous generators, proxies and BigInt.

The project exposes two libraries:

- [quickjs.bindings] with the QuickJS C API.

- The library {{!module: quickjs}quickjs} which exposes a polished API on top of [quickjs.bindings] with the same shape as the JavaScript API.

{1 Motivation}

The purpose of this project is to provide the same behaviour as the JavaScript engines from browsers {{:https://spidermonkey.dev}SpiderMonkey}, {{:https://developer.apple.com/documentation/javascriptcore}JavaScriptCore}, {{:https://github.com/chakra-core/ChakraCore}ChakraCore}, {{:https://v8.dev/}v8}) into OCaml. So code that runs in the browser (via {{:https://melange.re}Melange}) can be run in native with the same results.

{1 Status}

This is a work in progress, and currently only includes bindings to [RegExp] (binded to [libregexp.c]).
2 changes: 1 addition & 1 deletion lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

(library
(public_name quickjs)
(libraries bindings ctypes integers))
(libraries quickjs.bindings ctypes integers))

0 comments on commit 724a521

Please sign in to comment.