Updated documentation
This commit is contained in:
parent
3fb6061c30
commit
5905a5bfa5
@ -18,6 +18,9 @@ go build
|
|||||||
```
|
```
|
||||||
|
|
||||||
This will place the compiler inside the repository.
|
This will place the compiler inside the repository.
|
||||||
|
|
||||||
|
### Symlink
|
||||||
|
|
||||||
Either use `./q` for the following examples or get access to the shorter `q` in any directory via symlink:
|
Either use `./q` for the following examples or get access to the shorter `q` in any directory via symlink:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -28,36 +31,26 @@ This assumes that your shell loads `~/.local/bin`.
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```shell
|
```
|
||||||
|
Usage:
|
||||||
|
|
||||||
q [command] [options]
|
q [command] [options]
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
|
||||||
|
build [directory | file] build an executable from a file or directory
|
||||||
|
--arch [arch] cross-compile for another CPU architecture [x86|arm|riscv]
|
||||||
|
--assembler, -a show assembler instructions
|
||||||
|
--dry, -d skip writing the executable to disk
|
||||||
|
--os [os] cross-compile for another OS [linux|mac|windows]
|
||||||
|
--statistics, -s show statistics
|
||||||
|
--verbose, -v show everything
|
||||||
|
|
||||||
|
run [directory | file] build and run the executable
|
||||||
|
system show system information
|
||||||
|
help show this help
|
||||||
```
|
```
|
||||||
|
|
||||||
The `build` command creates an executable:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
q build examples/hello
|
|
||||||
```
|
|
||||||
|
|
||||||
The `run` command does everything `build` does but also executes it:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
q run examples/hello
|
|
||||||
```
|
|
||||||
|
|
||||||
You don't have to use physical directories, it's perfectly valid to use a list of files:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
q build hello.q world.q
|
|
||||||
```
|
|
||||||
|
|
||||||
To show verbose compiler output use `-v` or `--verbose`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
q build examples/hello -v
|
|
||||||
```
|
|
||||||
|
|
||||||
For more information see `q help`.
|
|
||||||
|
|
||||||
## Platforms
|
## Platforms
|
||||||
|
|
||||||
You can cross-compile executables for Linux, Mac and Windows.
|
You can cross-compile executables for Linux, Mac and Windows.
|
||||||
|
@ -14,10 +14,10 @@ func Help(w io.Writer, code int) int {
|
|||||||
Commands:
|
Commands:
|
||||||
|
|
||||||
build [directory | file] build an executable from a file or directory
|
build [directory | file] build an executable from a file or directory
|
||||||
--arch [arch] cross-compile for a different CPU architecture (x86, arm or riscv)
|
--arch [arch] cross-compile for another CPU architecture [x86|arm|riscv]
|
||||||
--assembler, -a show assembler instructions
|
--assembler, -a show assembler instructions
|
||||||
--dry, -d skip writing the executable to disk
|
--dry, -d skip writing the executable to disk
|
||||||
--os [os] cross-compile for a different OS (linux, mac or windows)
|
--os [os] cross-compile for another OS [linux|mac|windows]
|
||||||
--statistics, -s show statistics
|
--statistics, -s show statistics
|
||||||
--verbose, -v show everything
|
--verbose, -v show everything
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user