My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add STATUS.md noting pure OCaml port goal

+44
+44
STATUS.md
··· 1 + # ocaml-quickjs 2 + 3 + **Status: STUB PROJECT - Pure OCaml Port Needed** 4 + 5 + ## Overview 6 + 7 + Pure OCaml implementation of QuickJS JavaScript engine. 8 + 9 + ## Vendored C Reference 10 + 11 + - `vendor/git/quickjs-c/` - QuickJS C implementation from https://github.com/bellard/quickjs 12 + 13 + ## Goal 14 + 15 + Create a **pure OCaml port** of QuickJS to enable: 16 + - JavaScript execution in OCaml without C dependencies 17 + - Better integration with OCaml's runtime and GC 18 + - Portability to all OCaml targets (including js_of_ocaml, wasm) 19 + 20 + ## TODO 21 + 22 + - [ ] Study the QuickJS C implementation architecture 23 + - [ ] Design OCaml data structures for JS values 24 + - [ ] Implement lexer/parser for JavaScript 25 + - [ ] Implement bytecode compiler 26 + - [ ] Implement bytecode interpreter 27 + - [ ] Implement built-in objects (Object, Array, String, etc.) 28 + - [ ] Implement ES6+ features (classes, modules, async/await) 29 + - [ ] Write comprehensive test suite 30 + - [ ] Benchmark against C implementation 31 + 32 + ## Notes 33 + 34 + QuickJS is a small and embeddable JavaScript engine by Fabrice Bellard. 35 + It supports the ES2020 specification including modules, async generators, and proxies. 36 + A pure OCaml port would be valuable for: 37 + - Sandboxed JavaScript execution in OCaml applications 38 + - Static analysis and tooling for JavaScript 39 + - Cross-platform JavaScript support where C bindings are problematic 40 + 41 + ## References 42 + 43 + - QuickJS website: https://bellard.org/quickjs/ 44 + - ES2020 specification: https://tc39.es/ecma262/