diff options
| author | 2022-11-14 23:04:53 +0200 | |
|---|---|---|
| committer | 2022-11-14 23:06:22 +0200 | |
| commit | d89ab34dc160fe6868212aba4c503509ecfad42a (patch) | |
| tree | bc8070e14ea14c09202b9622077df0dcf55c2a68 | |
| parent | Update clap to 0.6.0 (diff) | |
| download | zup-d89ab34dc160fe6868212aba4c503509ecfad42a.tar.gz zup-d89ab34dc160fe6868212aba4c503509ecfad42a.tar.xz zup-d89ab34dc160fe6868212aba4c503509ecfad42a.zip | |
0.2.0, add a README0.2.0
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | README.org | 88 |
2 files changed, 89 insertions, 0 deletions
| @@ -1,3 +1,4 @@ | |||
| 1 | *~ | 1 | *~ |
| 2 | zig-cache/** | 2 | zig-cache/** |
| 3 | zig-out/** | 3 | zig-out/** |
| 4 | README.html | ||
diff --git a/README.org b/README.org new file mode 100644 index 0000000..427631b --- /dev/null +++ b/README.org | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | #+TITLE: zup | ||
| 2 | |||
| 3 | * What | ||
| 4 | |||
| 5 | ~Zup~ is a [[https://ziglang.org][Zig]] language version manager (Zig-UPdater). | ||
| 6 | |||
| 7 | * Requirements | ||
| 8 | |||
| 9 | ** System libraries | ||
| 10 | |||
| 11 | - libarchive | ||
| 12 | - libcurl | ||
| 13 | |||
| 14 | ** Zig version | ||
| 15 | |||
| 16 | You need at least Zig 0.10.0 to compile zup, if your system package manager does not have a high | ||
| 17 | enough version of Zig, you can download a precompiled tarball from [[https://ziglang.org/download/]] | ||
| 18 | and use the ~zig~ binary from it manually. In general, any zup version should be able to install a | ||
| 19 | newer (hopefully the newest!) Zig version that should enable you to compile the newest zup. | ||
| 20 | |||
| 21 | | Zig version | zup version | | ||
| 22 | |-------------+-------------| | ||
| 23 | | 0.10.0 | 0.2.0 | | ||
| 24 | | master | main | | ||
| 25 | |||
| 26 | * How | ||
| 27 | |||
| 28 | ** Compiling & installing | ||
| 29 | |||
| 30 | #+begin_src shell | ||
| 31 | git clone --recursive https://git.sr.ht/~ukko/zup | ||
| 32 | cd zup | ||
| 33 | zig build -Drelease-safe -p ~/.local | ||
| 34 | #+end_src | ||
| 35 | |||
| 36 | ** Using | ||
| 37 | |||
| 38 | Sample usage: | ||
| 39 | |||
| 40 | #+begin_src shell | ||
| 41 | zup install master # Installs the master version of zig | ||
| 42 | zup switch master # Actually use it | ||
| 43 | #+end_src | ||
| 44 | |||
| 45 | For more information, refer to ~zup help~. ~Zup~ currently installs stuff internally to | ||
| 46 | ~$XDG_DATA_HOME/zup~ (if ~XDG_DATA_HOME~ is not set, ~~/.local/share~ is used). ~zup switch~ | ||
| 47 | symlinks the current binary into ~~/.local/bin~ (currently not configurable). | ||
| 48 | |||
| 49 | * Configuration | ||
| 50 | |||
| 51 | Configuration file goes in ~/etc/xdg/zup/zup.json~, ~~/.config/zup/zup.json~, or any of the magical | ||
| 52 | ~XDG_CONFIG_...~ locations. (In the future zup might support some more human-friendly format like | ||
| 53 | TOML or YAML.) Multiple different configs get read in order, the user-specific configuration file | ||
| 54 | coming in last. | ||
| 55 | |||
| 56 | A configuration file should be a single JSON object, the following keys are supported: | ||
| 57 | |||
| 58 | - ~supported_targets~ :: An array of targets your machine supports running in addition to the native | ||
| 59 | architecture. The running native architecture will be preferred when installing and then the | ||
| 60 | targets listed in this array (earlier in the array -- higher priority). If this value is set in | ||
| 61 | multiple configuration files, the values get concatenated. | ||
| 62 | |||
| 63 | Examples: | ||
| 64 | |||
| 65 | #+begin_src json | ||
| 66 | "supported_targets": [ | ||
| 67 | "x86_64-linux", | ||
| 68 | "i386-linux" | ||
| 69 | ] | ||
| 70 | #+end_src | ||
| 71 | |||
| 72 | #+begin_src json | ||
| 73 | "supported_targets": [ | ||
| 74 | "aarch64-macos", | ||
| 75 | "x86_64-macos" | ||
| 76 | ] | ||
| 77 | #+end_src | ||
| 78 | |||
| 79 | ** Example configuration file | ||
| 80 | |||
| 81 | #+begin_src json | ||
| 82 | { | ||
| 83 | "supported_targets": [ | ||
| 84 | "x86_64-linux", | ||
| 85 | "i386-linux" | ||
| 86 | ] | ||
| 87 | } | ||
| 88 | #+end_src | ||