added clyxc compiler
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user