Skip to content

Commit a365f18

Browse files
committed
Document how to create standalone executables
1 parent 559029b commit a365f18

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/docs/cli.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,22 @@ options are:
7575
-s strip the source code, specify twice to also strip debug info
7676
-S n set the maximum stack size to 'n' bytes (default=262144)
7777
```
78+
79+
Here is an example on how to create a standalone executable that embeds QuickJS
80+
and the `examples/hello.js` JavaScript file:
81+
82+
```bash
83+
# Make sure you are in the QuickJS source directory.
84+
$ cc hello.c cutils.c libbf.c libregexp.c libunicode.c quickjs.c quickjs-libc.c -I. -o hello
85+
```
86+
87+
The resulting binary `hello` will be in the current directory.
88+
89+
```bash
90+
$ ./hello
91+
Hello World
92+
```
93+
94+
:::note
95+
We have plans to make this process easier, stay tuned!
96+
:::

0 commit comments

Comments
 (0)