summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--README.org88
2 files changed, 89 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 252c00c..6ab453b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
1*~ 1*~
2zig-cache/** 2zig-cache/**
3zig-out/** 3zig-out/**
4README.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
16You need at least Zig 0.10.0 to compile zup, if your system package manager does not have a high
17enough version of Zig, you can download a precompiled tarball from [[https://ziglang.org/download/]]
18and use the ~zig~ binary from it manually. In general, any zup version should be able to install a
19newer (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
38Sample 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
45For 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~
47symlinks the current binary into ~~/.local/bin~ (currently not configurable).
48
49* Configuration
50
51Configuration 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
53TOML or YAML.) Multiple different configs get read in order, the user-specific configuration file
54coming in last.
55
56A 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