From d89ab34dc160fe6868212aba4c503509ecfad42a Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Mon, 14 Nov 2022 23:04:53 +0200 Subject: 0.2.0, add a README --- .gitignore | 1 + README.org | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 README.org diff --git a/.gitignore b/.gitignore index 252c00c..6ab453b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *~ zig-cache/** zig-out/** +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 @@ +#+TITLE: zup + +* What + +~Zup~ is a [[https://ziglang.org][Zig]] language version manager (Zig-UPdater). + +* Requirements + +** System libraries + +- libarchive +- libcurl + +** Zig version + +You need at least Zig 0.10.0 to compile zup, if your system package manager does not have a high +enough version of Zig, you can download a precompiled tarball from [[https://ziglang.org/download/]] +and use the ~zig~ binary from it manually. In general, any zup version should be able to install a +newer (hopefully the newest!) Zig version that should enable you to compile the newest zup. + +| Zig version | zup version | +|-------------+-------------| +| 0.10.0 | 0.2.0 | +| master | main | + +* How + +** Compiling & installing + +#+begin_src shell + git clone --recursive https://git.sr.ht/~ukko/zup + cd zup + zig build -Drelease-safe -p ~/.local +#+end_src + +** Using + +Sample usage: + +#+begin_src shell + zup install master # Installs the master version of zig + zup switch master # Actually use it +#+end_src + +For more information, refer to ~zup help~. ~Zup~ currently installs stuff internally to +~$XDG_DATA_HOME/zup~ (if ~XDG_DATA_HOME~ is not set, ~~/.local/share~ is used). ~zup switch~ +symlinks the current binary into ~~/.local/bin~ (currently not configurable). + +* Configuration + +Configuration file goes in ~/etc/xdg/zup/zup.json~, ~~/.config/zup/zup.json~, or any of the magical +~XDG_CONFIG_...~ locations. (In the future zup might support some more human-friendly format like +TOML or YAML.) Multiple different configs get read in order, the user-specific configuration file +coming in last. + +A configuration file should be a single JSON object, the following keys are supported: + +- ~supported_targets~ :: An array of targets your machine supports running in addition to the native + architecture. The running native architecture will be preferred when installing and then the + targets listed in this array (earlier in the array -- higher priority). If this value is set in + multiple configuration files, the values get concatenated. + + Examples: + + #+begin_src json + "supported_targets": [ + "x86_64-linux", + "i386-linux" + ] + #+end_src + + #+begin_src json + "supported_targets": [ + "aarch64-macos", + "x86_64-macos" + ] + #+end_src + +** Example configuration file + +#+begin_src json + { + "supported_targets": [ + "x86_64-linux", + "i386-linux" + ] + } +#+end_src -- cgit v1.2.3