Skip to content

star-tek-mb/zigcurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

libcurl packaged with zig

Versions

curl 8.1.1

mbedtls 3.4.0

zlib 1.2.13

Simple usage

const c = @cImport({
    @cInclude("curl/curl.h");
});

_ = c.curl_global_init(c.CURL_GLOBAL_DEFAULT);
defer c.curl_global_cleanup();
var curl = c.curl_easy_init();
defer c.curl_easy_cleanup(curl);
_ = c.curl_easy_setopt(curl, c.CURLOPT_URL, "https://www.google.com/");
_ = c.curl_easy_setopt(curl, c.CURLOPT_SSL_VERIFYPEER, @as(c_int, 0));
_ = c.curl_easy_setopt(curl, c.CURLOPT_SSL_VERIFYHOST, @as(c_int, 0));
var res = c.curl_easy_perform(curl);

Building and linking example

See build.zig and main_tests linking example.

Credits

For original work

https://github.com/mattnite/zig-libcurl

About

libcurl packaged with zig

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published