tangled
alpha
login
or
join now
anil.recoil.org
/
ocaml-html5rw
1
fork
atom
OCaml HTML5 parser/serialiser based on Python's JustHTML
1
fork
atom
overview
issues
pulls
pipelines
disable jsoo builds for now
anil.recoil.org
1 month ago
f28b8b93
ec81e385
0/1
build.yml
failed
3min 57s
+78
-125
3 changed files
expand all
collapse all
unified
split
dune-project
html5rw-js.opam
lib
js
dune
-14
dune-project
···
31
31
(jsont (>= 0.2.0))
32
32
(cmdliner (>= 1.3.0))))
33
33
34
34
-
(package
35
35
-
(name html5rw-js)
36
36
-
(synopsis "Browser-based HTML5 parser via js_of_ocaml/wasm_of_ocaml")
37
37
-
(description
38
38
-
"JavaScript and WebAssembly builds of the html5rw HTML5 parser for browser use. \
39
39
-
Includes a main validator library, web worker for background validation, and \
40
40
-
browser-based test runner.")
41
41
-
(depends
42
42
-
(ocaml (>= 5.1.0))
43
43
-
(html5rw (= :version))
44
44
-
(js_of_ocaml (>= 5.0))
45
45
-
(js_of_ocaml-ppx (>= 5.0))
46
46
-
(wasm_of_ocaml-compiler (>= 5.0))
47
47
-
(brr (>= 0.0.6))))
-35
html5rw-js.opam
···
1
1
-
# This file is generated by dune, edit dune-project instead
2
2
-
opam-version: "2.0"
3
3
-
synopsis: "Browser-based HTML5 parser via js_of_ocaml/wasm_of_ocaml"
4
4
-
description:
5
5
-
"JavaScript and WebAssembly builds of the html5rw HTML5 parser for browser use. Includes a main validator library, web worker for background validation, and browser-based test runner."
6
6
-
maintainer: ["Anil Madhavapeddy <anil@recoil.org>"]
7
7
-
authors: ["Anil Madhavapeddy <anil@recoil.org>"]
8
8
-
license: "MIT"
9
9
-
homepage: "https://tangled.org/anil.recoil.org/ocaml-html5rw"
10
10
-
bug-reports: "https://tangled.org/anil.recoil.org/ocaml-html5rw/issues"
11
11
-
depends: [
12
12
-
"dune" {>= "3.20"}
13
13
-
"ocaml" {>= "5.1.0"}
14
14
-
"html5rw" {= version}
15
15
-
"js_of_ocaml" {>= "5.0"}
16
16
-
"js_of_ocaml-ppx" {>= "5.0"}
17
17
-
"wasm_of_ocaml-compiler" {>= "5.0"}
18
18
-
"brr" {>= "0.0.6"}
19
19
-
"odoc" {with-doc}
20
20
-
]
21
21
-
build: [
22
22
-
["dune" "subst"] {dev}
23
23
-
[
24
24
-
"dune"
25
25
-
"build"
26
26
-
"-p"
27
27
-
name
28
28
-
"-j"
29
29
-
jobs
30
30
-
"@install"
31
31
-
"@runtest" {with-test}
32
32
-
"@doc" {with-doc}
33
33
-
]
34
34
-
]
35
35
-
x-maintenance-intent: ["(latest)"]
+78
-76
lib/js/dune
···
1
1
; HTML5rw JavaScript Validator Library
2
2
; Compiled with js_of_ocaml for browser use
3
3
+
;
4
4
+
; Build rules temporarily disabled - code kept in place
3
5
4
4
-
(library
5
5
-
(name htmlrw_js)
6
6
-
(public_name html5rw.js)
7
7
-
(libraries
8
8
-
html5rw
9
9
-
htmlrw_check
10
10
-
bytesrw
11
11
-
brr)
12
12
-
(modes byte) ; js_of_ocaml requires bytecode
13
13
-
(modules
14
14
-
htmlrw_js_types
15
15
-
htmlrw_js_dom
16
16
-
htmlrw_js_annotate
17
17
-
htmlrw_js_ui
18
18
-
htmlrw_js))
6
6
+
; (library
7
7
+
; (name htmlrw_js)
8
8
+
; (public_name html5rw.js)
9
9
+
; (libraries
10
10
+
; html5rw
11
11
+
; htmlrw_check
12
12
+
; bytesrw
13
13
+
; brr)
14
14
+
; (modes byte) ; js_of_ocaml requires bytecode
15
15
+
; (modules
16
16
+
; htmlrw_js_types
17
17
+
; htmlrw_js_dom
18
18
+
; htmlrw_js_annotate
19
19
+
; htmlrw_js_ui
20
20
+
; htmlrw_js))
19
21
20
22
; Standalone JavaScript file for direct browser use
21
23
; This compiles the library entry point to a .js file
22
22
-
(executable
23
23
-
(name htmlrw_js_main)
24
24
-
(libraries htmlrw_js)
25
25
-
(js_of_ocaml
26
26
-
(javascript_files))
27
27
-
(modes js wasm)
28
28
-
(modules htmlrw_js_main))
24
24
+
; (executable
25
25
+
; (name htmlrw_js_main)
26
26
+
; (libraries htmlrw_js)
27
27
+
; (js_of_ocaml
28
28
+
; (javascript_files))
29
29
+
; (modes js wasm)
30
30
+
; (modules htmlrw_js_main))
29
31
30
32
; Web Worker for background validation
31
33
; Runs validation in a separate thread to avoid blocking the UI
32
32
-
(executable
33
33
-
(name htmlrw_js_worker)
34
34
-
(libraries html5rw htmlrw_check bytesrw brr)
35
35
-
(js_of_ocaml
36
36
-
(javascript_files))
37
37
-
(modes js wasm)
38
38
-
(modules htmlrw_js_worker))
34
34
+
; (executable
35
35
+
; (name htmlrw_js_worker)
36
36
+
; (libraries html5rw htmlrw_check bytesrw brr)
37
37
+
; (js_of_ocaml
38
38
+
; (javascript_files))
39
39
+
; (modes js wasm)
40
40
+
; (modules htmlrw_js_worker))
39
41
40
42
; Test runner for browser-based regression testing
41
43
; Runs html5lib conformance tests in the browser
42
42
-
(executable
43
43
-
(name htmlrw_js_tests_main)
44
44
-
(libraries html5rw bytesrw brr)
45
45
-
(js_of_ocaml
46
46
-
(javascript_files))
47
47
-
(modes js wasm)
48
48
-
(modules htmlrw_js_tests htmlrw_js_tests_main))
44
44
+
; (executable
45
45
+
; (name htmlrw_js_tests_main)
46
46
+
; (libraries html5rw bytesrw brr)
47
47
+
; (js_of_ocaml
48
48
+
; (javascript_files))
49
49
+
; (modes js wasm)
50
50
+
; (modules htmlrw_js_tests htmlrw_js_tests_main))
49
51
50
52
; Copy to nice filenames (JS)
51
51
-
(rule
52
52
-
(targets htmlrw.js)
53
53
-
(deps htmlrw_js_main.bc.js)
54
54
-
(action (copy %{deps} %{targets})))
53
53
+
; (rule
54
54
+
; (targets htmlrw.js)
55
55
+
; (deps htmlrw_js_main.bc.js)
56
56
+
; (action (copy %{deps} %{targets})))
55
57
56
56
-
(rule
57
57
-
(targets htmlrw-worker.js)
58
58
-
(deps htmlrw_js_worker.bc.js)
59
59
-
(action (copy %{deps} %{targets})))
58
58
+
; (rule
59
59
+
; (targets htmlrw-worker.js)
60
60
+
; (deps htmlrw_js_worker.bc.js)
61
61
+
; (action (copy %{deps} %{targets})))
60
62
61
61
-
(rule
62
62
-
(targets htmlrw-tests.js)
63
63
-
(deps htmlrw_js_tests_main.bc.js)
64
64
-
(action (copy %{deps} %{targets})))
63
63
+
; (rule
64
64
+
; (targets htmlrw-tests.js)
65
65
+
; (deps htmlrw_js_tests_main.bc.js)
66
66
+
; (action (copy %{deps} %{targets})))
65
67
66
68
; Copy to nice filenames (WASM)
67
69
; Note: requires wasm_of_ocaml-compiler to be installed
68
68
-
(rule
69
69
-
(targets htmlrw.wasm.js)
70
70
-
(deps htmlrw_js_main.bc.wasm.js)
71
71
-
(action (copy %{deps} %{targets})))
70
70
+
; (rule
71
71
+
; (targets htmlrw.wasm.js)
72
72
+
; (deps htmlrw_js_main.bc.wasm.js)
73
73
+
; (action (copy %{deps} %{targets})))
72
74
73
73
-
(rule
74
74
-
(targets htmlrw-worker.wasm.js)
75
75
-
(deps htmlrw_js_worker.bc.wasm.js)
76
76
-
(action (copy %{deps} %{targets})))
75
75
+
; (rule
76
76
+
; (targets htmlrw-worker.wasm.js)
77
77
+
; (deps htmlrw_js_worker.bc.wasm.js)
78
78
+
; (action (copy %{deps} %{targets})))
77
79
78
78
-
(rule
79
79
-
(targets htmlrw-tests.wasm.js)
80
80
-
(deps htmlrw_js_tests_main.bc.wasm.js)
81
81
-
(action (copy %{deps} %{targets})))
80
80
+
; (rule
81
81
+
; (targets htmlrw-tests.wasm.js)
82
82
+
; (deps htmlrw_js_tests_main.bc.wasm.js)
83
83
+
; (action (copy %{deps} %{targets})))
82
84
83
85
; Install web assets to share/html5rw-js/ for npm packaging
84
84
-
(install
85
85
-
(package html5rw-js)
86
86
-
(section share)
87
87
-
(files
88
88
-
; JavaScript bundles
89
89
-
htmlrw.js
90
90
-
htmlrw-worker.js
91
91
-
htmlrw-tests.js
92
92
-
; WASM loader scripts
93
93
-
htmlrw.wasm.js
94
94
-
htmlrw-worker.wasm.js
95
95
-
htmlrw-tests.wasm.js
96
96
-
; WASM assets (with content-hashed filenames)
97
97
-
(glob_files_rec (htmlrw_js_main.bc.wasm.assets/* with_prefix htmlrw_js_main.bc.wasm.assets))
98
98
-
(glob_files_rec (htmlrw_js_worker.bc.wasm.assets/* with_prefix htmlrw_js_worker.bc.wasm.assets))
99
99
-
(glob_files_rec (htmlrw_js_tests_main.bc.wasm.assets/* with_prefix htmlrw_js_tests_main.bc.wasm.assets))))
86
86
+
; (install
87
87
+
; (package html5rw-js)
88
88
+
; (section share)
89
89
+
; (files
90
90
+
; ; JavaScript bundles
91
91
+
; htmlrw.js
92
92
+
; htmlrw-worker.js
93
93
+
; htmlrw-tests.js
94
94
+
; ; WASM loader scripts
95
95
+
; htmlrw.wasm.js
96
96
+
; htmlrw-worker.wasm.js
97
97
+
; htmlrw-tests.wasm.js
98
98
+
; ; WASM assets (with content-hashed filenames)
99
99
+
; (glob_files_rec (htmlrw_js_main.bc.wasm.assets/* with_prefix htmlrw_js_main.bc.wasm.assets))
100
100
+
; (glob_files_rec (htmlrw_js_worker.bc.wasm.assets/* with_prefix htmlrw_js_worker.bc.wasm.assets))
101
101
+
; (glob_files_rec (htmlrw_js_tests_main.bc.wasm.assets/* with_prefix htmlrw_js_tests_main.bc.wasm.assets))))