added clyxc compiler

This commit is contained in:
Luxferre
2026-07-04 10:13:40 +03:00
parent 5668f08a12
commit 1e5c63770e
2 changed files with 158 additions and 1 deletions
+20 -1
View File
@@ -123,8 +123,27 @@ To run programs directly, pass the path to the `.clx` files as arguments:
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, use the bundled `clyxc` utility, or:
To package your program, you can use the `clyxc` utility.
#### Installing `clyxc`
Install the utility directly from Git:
```sh
go install codeberg.org/luxferre/clyx/clyxc@latest
```
Alternatively, if compiling locally from the repository root:
```sh
go install ./clyxc
```
#### Using `clyxc`
Run the compiler by passing the output binary path followed by the list of source files or directories:
```sh
clyxc out-bin-path src1 src2...
```
*(Note: `clyxc` requires the main `clyx` interpreter binary to be installed in your `$GOPATH/bin` directory).*
#### Manual Packaging Alternative
If you prefer not to use `clyxc`, you can package the application manually:
1. Create a ZIP archive containing all your `.clx` source files.
2. Append the ZIP archive to the compiled `clyx` binary:
```sh