diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 410bc0d..27a0d7c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/Makefile b/Makefile index 99b8927..01fd676 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.org b/README.org index 60a2bb6..07f70e1 100644 --- a/README.org +++ b/README.org @@ -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 @@ -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 @@ -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 @@ -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");