-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dd03fe
commit f4676ba
Showing
7 changed files
with
66 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,10 @@ | ||
#+TITLE: Modules | ||
#+DATE: 2024-08-17T17:58:01+0800 | ||
#+LASTMOD: 2024-08-17T18:17:19+0800 | ||
#+LASTMOD: 2025-01-01T18:00:20+0800 | ||
#+WEIGHT: 10 | ||
#+TYPE: docs | ||
#+AUTHOR: Jiacai Liu | ||
#+DESCRIPTION: Zig modules | ||
|
||
|
||
* Install | ||
=zigcli= support [[https://ziglang.org/download/0.11.0/release-notes.html#Package-Management][package manager]] introduced in Zig 0.11. | ||
|
||
#+begin_src bash | ||
zig fetch --save=zigcli https://github.com/jiacai2050/zigcli/archive/${COMMIT}.tar.gz | ||
#+end_src | ||
|
||
#+RESULTS: | ||
|
||
Replace ~${COMMIT}~ with a real one, then in your =build.zig=, import the module like this: | ||
|
||
#+begin_src zig | ||
const zigcli = b.dependency("zigcli", .{}); | ||
|
||
// Currently zigcli provide two modules. | ||
exe.root_module.addImport("simargs", zigcli.module("simargs")); | ||
exe.root_module.addImport("pretty-table", zigcli.module("pretty-table")); | ||
#+end_src | ||
|
||
* Available modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
#+TITLE: Programs | ||
#+DATE: 2023-10-21T12:26:45+0800 | ||
#+LASTMOD: 2024-09-28T11:50:42+0800 | ||
#+LASTMOD: 2025-01-01T18:00:55+0800 | ||
#+TYPE: docs | ||
#+WEIGHT: 20 | ||
#+DESCRIPTION: Binary programs which can be used directly | ||
|
||
* Install | ||
Latest pre-built binaries can be downloaded on the [[https://github.com/jiacai2050/zigcli/releases][release page]], or you can build from source: | ||
|
||
#+begin_src bash | ||
git clone https://github.com/jiacai2050/zigcli.git | ||
#+end_src | ||
Then build with | ||
#+begin_src bash | ||
make build | ||
#+end_src | ||
|
||
* Available Programs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#+TITLE: zigfetch | ||
#+DATE: 2025-01-01T18:01:47+0800 | ||
#+LASTMOD: 2025-01-01T18:03:40+0800 | ||
#+TYPE: docs | ||
#+DESCRIPTION: Fetch zig package, baked by libcurl. | ||
|
||
#+begin_src bash :results verbatim :exports result :dir ../../.. | ||
./zig-out/bin/zigfetch --help | ||
#+end_src | ||
|
||
#+RESULTS: | ||
: USAGE: | ||
: ./zig-out/bin/zigfetch [OPTIONS] [--] [package-dir or url] | ||
: | ||
: OPTIONS: | ||
: -h, --help Show help | ||
: -v, --verbose Show verbose log | ||
: -d, --debug-hash Print hash for each file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters