|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| config/ | | 11-Mar-2024 | - | 8,410 | 7,429 |
| debugger/ | | 11-Mar-2024 | - | 7,702 | 6,516 |
| examples/ | | 11-Mar-2024 | - | 9,358 | 6,819 |
| extras/ | | 11-Mar-2024 | - | 14 | 11 |
| licenses/ | | 11-Mar-2024 | - | 27 | 20 |
| polyfills/ | | 11-Mar-2024 | - | 197 | 123 |
| src/ | | 11-Mar-2024 | - | 92,999 | 61,601 |
| src-noline/ | | 11-Mar-2024 | - | 92,874 | 61,476 |
| src-separate/ | | 11-Mar-2024 | - | 92,287 | 60,970 |
| AUTHORS.rst | D | 11-Mar-2024 | 2.3 KiB | 73 | 62 |
| LICENSE.txt | D | 11-Mar-2024 | 1.1 KiB | 26 | 20 |
| Makefile.cmdline | D | 11-Mar-2024 | 1 KiB | 35 | 13 |
| Makefile.codepage | D | 11-Mar-2024 | 154 | 5 | 4 |
| Makefile.coffee | D | 11-Mar-2024 | 130 | 5 | 4 |
| Makefile.dukdebug | D | 11-Mar-2024 | 1,021 | 27 | 17 |
| Makefile.eval | D | 11-Mar-2024 | 149 | 8 | 3 |
| Makefile.eventloop | D | 11-Mar-2024 | 651 | 23 | 16 |
| Makefile.hello | D | 11-Mar-2024 | 1.2 KiB | 36 | 9 |
| Makefile.jxpretty | D | 11-Mar-2024 | 168 | 9 | 4 |
| Makefile.sandbox | D | 11-Mar-2024 | 161 | 8 | 3 |
| Makefile.sharedlibrary | D | 11-Mar-2024 | 3.1 KiB | 72 | 26 |
| README.rst | D | 11-Mar-2024 | 3.7 KiB | 111 | 77 |
| duk_build_meta.json | D | 11-Mar-2024 | 33.9 KiB | 1,349 | 1,349 |
| license.spdx | D | 11-Mar-2024 | 262.6 KiB | 3,934 | 3,933 |
| mandel.js | D | 11-Mar-2024 | 1.2 KiB | 54 | 32 |
README.rst
1=======
2Duktape
3=======
4
5Duktape is a small and portable Ecmascript E5/E5.1 implementation. It is
6intended to be easily embeddable into C programs, with a C API similar in
7spirit to Lua's.
8
9Duktape supports the full E5/E5.1 feature set including errors, Unicode
10strings, and regular expressions, a subset of E6 features (e.g. Proxy
11objects), Khronos/ES6 ArrayBuffer/TypedView, and Node.js Buffer bindings.
12
13Duktape also provides a number of custom features such as error tracebacks,
14additional data types for better C integration, combined reference counting
15and mark-and sweep garbage collector, object finalizers, co-operative
16threads a.k.a. coroutines, tail calls, built-in logging and module frameworks,
17a built-in debugger protocol, function bytecode dump/load, and so on.
18
19You can browse Duktape programmer's API and other documentation at:
20
21* http://duktape.org/
22
23In particular, you should read the getting started section:
24
25* http://duktape.org/guide.html#gettingstarted
26
27More examples and how-to articles are in the Duktape Wiki:
28
29* http://wiki.duktape.org/
30
31Building and integrating Duktape into your project is very straightforward:
32
33* http://duktape.org/guide.html#compiling
34
35See Makefile.hello for a concrete example::
36
37 $ cd <dist_root>
38 $ make -f Makefile.hello
39 [...]
40 $ ./hello
41 Hello world!
42 2+3=5
43
44To build an example command line tool, use the following::
45
46 $ cd <dist_root>
47 $ make -f Makefile.cmdline
48 [...]
49
50 $ ./duk
51 ((o) Duktape
52 duk> print('Hello world!');
53 Hello world!
54 = undefined
55
56 $ ./duk mandel.js
57 [...]
58
59This distributable contains:
60
61* ``src/``: main Duktape library in a "single source file" format (duktape.c,
62 duktape.h, and duk_config.h).
63
64* ``src-noline/``: contains a variant of ``src/duktape.c`` with no ``#line``
65 directives which is preferable for some users. See discussion in
66 https://github.com/svaarala/duktape/pull/363.
67
68* ``src-separate/``: main Duktape library in multiple files format.
69
70* ``config/``: genconfig utility for creating duk_config.h configuration
71 files, see: http://wiki.duktape.org/Configuring.html.
72
73* ``examples/``: further examples for using Duktape. Although Duktape
74 itself is widely portable, some of the examples are Linux only.
75 For instance the ``eventloop`` example illustrates how ``setTimeout()``
76 and other standard timer functions could be implemented on Unix/Linux.
77
78* ``extras/``: utilities and modules which don't comfortably fit into the
79 main Duktape library because of footprint or portability concerns.
80 Extras are maintained and bug fixed code, but don't have the same version
81 guarantees as the main Duktape library.
82
83* ``polyfills/``: a few replacement suggestions for non-standard Javascript
84 functions provided by other implementations.
85
86* ``debugger/``: a debugger with a web UI, see ``debugger/README.rst`` and
87 https://github.com/svaarala/duktape/blob/master/doc/debugger.rst for
88 details on Duktape debugger support. Also contains a JSON debug proxy
89 (one written in Node.js and another in DukLuv) to make talking to the
90 debug target easier.
91
92* ``licenses/``: licensing information.
93
94You can find release notes at:
95
96* https://github.com/svaarala/duktape/blob/master/RELEASES.rst
97
98This distributable contains Duktape version 1.8.0, created from git
99commit 0a70d7e4c5227c84e3fed5209828973117d02849 (v1.8.0).
100
101Duktape is copyrighted by its authors (see ``AUTHORS.rst``) and licensed
102under the MIT license (see ``LICENSE.txt``). String hashing algorithms are
103based on the algorithm from Lua (MIT license), djb2 hash, and Murmurhash2
104(MIT license). Duktape module loader is based on the CommonJS module
105loading specification (without sharing any code), CommonJS is under the
106MIT license.
107
108Have fun!
109
110Sami Vaarala (sami.vaarala@iki.fi)
111