Skip to content

Commit

Permalink
fix: generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Jan 26, 2024
1 parent 6ccb040 commit 424b8fd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'docs'
path: 'zig-out/docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test:
zig build test

docs:
zig build-lib -femit-docs src/root.zig
if [ ! -d zig-out ]; then mkdir zig-out; fi
zig build-lib --dep build_info -Mbuild_info=src/root.zig -femit-docs=zig-out/docs -fno-emit-bin

.PHONY: test run docs clean prepare
18 changes: 9 additions & 9 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#+TITLE: zig-curl
#+DATE: 2023-09-16T23:16:15+0800
#+LASTMOD: 2024-01-21T21:46:44+0800
#+LASTMOD: 2024-01-26T22:07:12+0800
#+OPTIONS: toc:nil num:nil
#+STARTUP: content

Expand All @@ -11,15 +11,15 @@ Zig bindings to [[https://curl.haxx.se/libcurl/][libcurl]], a free and easy-to-u
#+begin_quote
This package is in its early stage, although the core functionality works right now, the API is still subject to changes.

=zig-curl= only support [[https://ziglang.org/download/][Zig master]], and any contributions are welcomed. ⚒️
=zig-curl= only support [[https://ziglang.org/download/][Zig master]], any contribution is welcome. ⚒️
#+end_quote

The vendored libraries consist of:
| lib | commit |
|---------+--------|
| zlib | [[https://github.com/madler/zlib/tree/v1.3][1.3]] |
| mbedtls | [[https://github.com/Mbed-TLS/mbedtls/tree/v3.5.1][3.5.1]] |
| libcurl | [[https://github.com/curl/curl/tree/curl-8_5_0][8.5.0]] |
| Library | Version |
|---------+---------|
| libcurl | [[https://github.com/curl/curl/tree/curl-8_5_0][8.5.0]] |
| zlib | [[https://github.com/madler/zlib/tree/v1.3][1.3]] |
| mbedtls | [[https://github.com/Mbed-TLS/mbedtls/tree/v3.5.1][3.5.1]] |

* Usage
#+begin_src zig
Expand All @@ -45,7 +45,7 @@ pub fn main() !void {
See [[file:examples/basic.zig]], [[file:examples/advanced.zig]] for more usage.

* Installation
=zig-curl= support [[https://ziglang.org/download/0.11.0/release-notes.html#Package-Management][module]] introduced in Zig 0.11.
=zig-curl= support [[https://ziglang.org/download/0.11.0/release-notes.html#Package-Management][package]] introduced in Zig 0.11.

#+begin_src bash
zig fetch --save=curl https://github.com/jiacai2050/zig-curl/archive/${COMMIT}.tar.gz
Expand All @@ -58,7 +58,7 @@ exe.root_module.addImport("curl", dep_curl.module("curl"));
exe.linkLibC();
#+end_src

This library will link to a vendored libcurl by default, you can disable it and link to system-wide like this
This library will link to a vendored libcurl by default, you can disable it and link to system-wide with this
#+begin_src zig
const dep_curl = b.dependency("curl", .{ .link_vendor = false });
exe.linkSystemLibrary("curl");
Expand Down

0 comments on commit 424b8fd

Please sign in to comment.