added hsargs, hsexit and bundler mode
This commit is contained in:
@@ -120,6 +120,24 @@ To run a program directly, pass the path to the `.clx` file as an argument:
|
||||
./clyx path/to/program.clx
|
||||
```
|
||||
|
||||
### Self-contained Packaging (Compilation)
|
||||
|
||||
The Go implementation supports reading an optional ZIP archive appended directly to the end of the `clyx` binary. This allows you to package your Clyx source code into a single executable file.
|
||||
|
||||
To package your program:
|
||||
1. Create a ZIP archive containing all your `.clx` source files.
|
||||
2. Append the ZIP archive to the compiled `clyx` binary:
|
||||
```sh
|
||||
cat clyx my_app.zip > my_app_executable
|
||||
chmod +x my_app_executable
|
||||
```
|
||||
|
||||
When the packed executable runs:
|
||||
- The interpreter automatically detects the appended ZIP archive.
|
||||
- It iterates through all `.clx` files in the archive and evaluates (`src`) them.
|
||||
- If a `_main` word is defined in the environment, it is executed automatically.
|
||||
- If `_main` is not present, the interpreter falls back to running the standard REPL.
|
||||
|
||||
## FAQ
|
||||
|
||||
### Where does the name Clyx originate from?
|
||||
|
||||
Reference in New Issue
Block a user