Rust bindings to libcurl

Overview

curl-rust

libcurl bindings for Rust

Latest Version Documentation License Build

Quick Start

use std::io::{stdout, Write};

use curl::easy::Easy;

// Print a web page onto stdout
fn main() {
    let mut easy = Easy::new();
    easy.url("https://www.rust-lang.org/").unwrap();
    easy.write_function(|data| {
        stdout().write_all(data).unwrap();
        Ok(data.len())
    }).unwrap();
    easy.perform().unwrap();

    println!("{}", easy.response_code().unwrap());
}
use curl::easy::Easy;

// Capture output into a local `Vec`.
fn main() {
    let mut dst = Vec::new();
    let mut easy = Easy::new();
    easy.url("https://www.rust-lang.org/").unwrap();

    let mut transfer = easy.transfer();
    transfer.write_function(|data| {
        dst.extend_from_slice(data);
        Ok(data.len())
    }).unwrap();
    transfer.perform().unwrap();
}

Post / Put requests

The put and post methods on Easy can configure the method of the HTTP request, and then read_function can be used to specify how data is filled in. This interface works particularly well with types that implement Read.

use std::io::Read;
use curl::easy::Easy;

fn main() {
    let mut data = "this is the body".as_bytes();

    let mut easy = Easy::new();
    easy.url("http://www.example.com/upload").unwrap();
    easy.post(true).unwrap();
    easy.post_field_size(data.len() as u64).unwrap();

    let mut transfer = easy.transfer();
    transfer.read_function(|buf| {
        Ok(data.read(buf).unwrap_or(0))
    }).unwrap();
    transfer.perform().unwrap();
}

Custom headers

Custom headers can be specified as part of the request:

use curl::easy::{Easy, List};

fn main() {
    let mut easy = Easy::new();
    easy.url("http://www.example.com").unwrap();

    let mut list = List::new();
    list.append("Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==").unwrap();
    easy.http_headers(list).unwrap();
    easy.perform().unwrap();
}

Keep alive

The handle can be re-used across multiple requests. Curl will attempt to keep the connections alive.

use curl::easy::Easy;

fn main() {
    let mut handle = Easy::new();

    handle.url("http://www.example.com/foo").unwrap();
    handle.perform().unwrap();

    handle.url("http://www.example.com/bar").unwrap();
    handle.perform().unwrap();
}

Multiple requests

The libcurl library provides support for sending multiple requests simultaneously through the "multi" interface. This is currently bound in the multi module of this crate and provides the ability to execute multiple transfers simultaneously. For more information, see that module.

Building

By default, this crate will attempt to dynamically link to the system-wide libcurl and the system-wide SSL library. Some of this behavior can be customized with various Cargo features:

  • ssl: Enable SSL/TLS support using the platform-default TLS backend. On Windows this is Schannel, on macOS Secure Transport, and OpenSSL (or equivalent) on all other platforms. Enabled by default.

  • rustls Enable SSL/TLS support via Rustls, a well-received alternative TLS backend written in Rust. Rustls is always statically linked. Disabled by default.

    Note that Rustls support is experimental within Curl itself and may have significant bugs, so we don't offer any sort of stability guarantee with this feature.

  • mesalink: Enable SSL/TLS support via MesaLink, an alternative TLS backend written in Rust based on Rustls. MesaLink is always statically linked. Disabled by default.

  • http2: Enable HTTP/2 support via libnghttp2. Disabled by default.

  • static-curl: Use a bundled libcurl version and statically link to it. Disabled by default.

  • static-ssl: Use a bundled OpenSSL version and statically link to it. Only applies on platforms that use OpenSSL. Disabled by default.

  • spnego: Enable SPNEGO support. Disabled by default.

  • upkeep_7_62_0: Enable curl_easy_upkeep() support, introduced in curl 7.62.0. Disabled by default.

  • poll_7_68_0: Enable curl_multi_poll()/curl_multi_wakeup() support, requires curl 7.68.0 or later. Disabled by default.

  • ntlm: Enable NTLM support in curl. Disabled by default.

Version Support

The bindings have been developed using curl version 7.24.0. They should work with any newer version of curl and possibly with older versions, but this has not been tested.

Troubleshooting

Curl built against the NSS SSL library

If you encounter the following error message:

  [77] Problem with the SSL CA cert (path? access rights?)

That means most likely, that curl was linked against libcurl-nss.so due to installed libcurl NSS development files, and that the required library libnsspem.so is missing. See also the curl man page: "If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available for this option to work properly."

In order to avoid this failure you can either

  • install the missing library (e.g. Debian: nss-plugin-pem), or
  • remove the libcurl NSS development files (e.g. Debian: libcurl4-nss-dev) and rebuild curl-rust.

License

The curl-rust crate is licensed under the MIT license, see LICENSE for more details.

Comments
  • Building on windows, tutorial and suggestions

    Building on windows, tutorial and suggestions

    I am happy to help by writing out the details in markdown somewhere but I think this issue of building this crate on windows should be addressed. Currently, on a standard version of windows without linux tools installed such as sh, this build will fail. This came up when I was trying to install cargo-edit on windows via cargo install cargo-edit which is one of my favorite linux programs for working with rust. I did receive the useful message "is sh not installed?" but it was perhaps a bit too short. Sadly, in version 0.2.18 that is used by cargo-edit, this message did not appear. I found the message by cloning this repo and trying to build. I still do not know the best way forward. Is MinGW expected? Something else?

    Thanks for the advice. I think whatever information is included in the answer should in some way probably be added to the readme.

    opened by waynenilsen 16
  • windows build under msys2 fails with config.guess issue

    windows build under msys2 fails with config.guess issue

    Building under MSYS2 (with a msys2 fresh build of rust) fails, because config.guess can't figure out the system triple. Updating the curl source to have the latest config.guess/config.sub fixes this.

    opened by vvuk 16
  • curl::multi::Multi will make double free memory problem when some ssl error occurred

    curl::multi::Multi will make double free memory problem when some ssl error occurred

    Problem

    OS: CentOS Linux release 7.3.1611 (Core)

    Use curl::multi::Multi to fetch more than one https url will cause the program to crash when some ssl error occurred(rel issue):

    [root@hugo-devm-b4pc3 easycurl]# cargo run
       Compiling easycurl v0.1.0 (/mnt/vdc1/home/apps/easycurl)
        Finished dev [unoptimized + debuginfo] target(s) in 0.58s
         Running `target/debug/easycurl`
    result for easy with token 0: Some(Err(Error { description: "SSL peer certificate or SSH remote key was not OK", code: 60, extra: Some("SSL: certificate subject name 'Test' does not match target host name '127.0.0.1'") }))
    *** Error in `target/debug/easycurl': double free or corruption (!prev): 0x00007f74f921f4e0 ***
    ======= Backtrace: =========
    /lib64/libc.so.6(+0x7c503)[0x7f74f6dec503]
    /apps/svr/curl/lib/libcurl.so.4(+0x57d08)[0x7f74f7cc9d08]
    /apps/svr/curl/lib/libcurl.so.4(+0x58c3c)[0x7f74f7ccac3c]
    /apps/svr/curl/lib/libcurl.so.4(+0x1132c)[0x7f74f7c8332c]
    /apps/svr/curl/lib/libcurl.so.4(curl_multi_cleanup+0xbf)[0x7f74f7cafbff]
    target/debug/easycurl(_ZN63_$LT$curl..multi..RawMulti$u20$as$u20$core..ops..drop..Drop$GT$4drop17h76af921506dcf405E+0x12)[0x7f74f87a6a22]
    target/debug/easycurl(_ZN4core3ptr42drop_in_place$LT$curl..multi..RawMulti$GT$17h3353ba6689bfbe2eE+0xb)[0x7f74f87a4f0b]
    target/debug/easycurl(_ZN5alloc4sync12Arc$LT$T$GT$9drop_slow17h56cde95cf342e66dE+0x24)[0x7f74f87a2de4]
    target/debug/easycurl(_ZN67_$LT$alloc..sync..Arc$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hb73c8a2d4d00a004E+0x63)[0x7f74f87a2f43]
    target/debug/easycurl(_ZN4core3ptr66drop_in_place$LT$alloc..sync..Arc$LT$curl..multi..RawMulti$GT$$GT$17he1315d4334cfd101E+0xb)[0x7f74f87a573b]
    target/debug/easycurl(+0x24657)[0x7f74f879b657]
    target/debug/easycurl(+0x2565f)[0x7f74f879c65f]
    target/debug/easycurl(+0x245db)[0x7f74f879b5db]
    target/debug/easycurl(+0x25e6e)[0x7f74f879ce6e]
    target/debug/easycurl(+0x26ba1)[0x7f74f879dba1]
    target/debug/easycurl(_ZN3std2rt19lang_start_internal17h571831ebdba142deE+0x431)[0x7f74f87d4e81]
    target/debug/easycurl(+0x26b70)[0x7f74f879db70]
    target/debug/easycurl(+0x25c4c)[0x7f74f879cc4c]
    /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f74f6d91b35]
    target/debug/easycurl(+0x23d69)[0x7f74f879ad69]
    

    Rust code

    ///
    /// Simulate cargo download_accessible to reproduce crash issue https://github.com/rust-lang/cargo/issues/10034
    ///
    use curl::easy::{Easy, HttpVersion};
    use curl::multi::{EasyHandle, Multi};
    use curl::Error as CurlError;
    
    fn main() {
        let ret = {
            let mut multi = Multi::new();
            multi.pipelining(false, true).unwrap();
            multi.set_max_host_connections(2).unwrap();
            let mut handles = Vec::new();
            handles.push(add_easy_to_multi(&mut multi, handles.len()));
            // push more than one EasyHandle to trigger crash
            handles.push(add_easy_to_multi(&mut multi, handles.len()));
            let (token, result) = wait_for_curl(&mut multi, &handles);
            let handle = handles.remove(token);
            multi.remove(handle).unwrap();
            /*
            // comment out this loop it won't crash
            while !handles.is_empty() {
                let handle = handles.pop().unwrap();
                multi.remove(handle).unwrap();
            }
             */
            result
        };
        {
            println!("wait for url: {:?}", ret);
        }
    }
    
    fn add_easy_to_multi(multi: &mut Multi, token: usize) -> EasyHandle {
        let mut easy = Easy::new();
        easy.get(true).unwrap();
        easy.url("https://127.0.0.1:443").unwrap();
        easy.follow_location(true).unwrap();
        easy.http_version(HttpVersion::V2).unwrap();
        easy.pipewait(true).unwrap();
        easy.ssl_verify_peer(false).unwrap(); // comment out this line it won't crash
        easy.write_function(move |data| {
            println!("easy with token {} read {} bytes", token, data.len());
            Ok(data.len())
        }).unwrap();
    
        let mut h = multi.add(easy).unwrap();
        h.set_token(token).unwrap();
        h
    }
    
    fn wait_for_curl(multi: &mut Multi, handles: &Vec<EasyHandle>) -> (usize, Option<Result<(), CurlError>>) {
        let mut e = None;
        let mut out_token = 0usize;
        loop {
            multi.perform().unwrap();
            multi.messages(|msg| {
                let token = msg.token().unwrap();
                let r = msg.result_for(&handles[token]);
                println!("result for easy with token {}: {:?}", token, r);
                e = r;
                out_token = token;
            });
            if e.is_some() {
                break;
            }
            multi.wait(&mut [], std::time::Duration::from_secs(5)).unwrap();
        }
        (out_token, e)
    }
    

    The url https://127.0.0.1:433 in the code is a service implemented by the simple golang code:

    package main
    
    import (
        "fmt"
        "net/http"
    )
    
    func handler(w http.ResponseWriter, r *http.Request) {
        fmt.Fprintf(w, "It works!")
    }
    
    func main() {
        http.HandleFunc("/", handler)
        http.ListenAndServeTLS(":443", "server.crt", "server.key", nil)
    }
    

    server.crt is a self signed certificate generated by OpenSSL, you can replace with your version.

    Cargo.toml

    [package]
    name = "easycurl"
    version = "0.1.0"
    edition = "2021"
    
    # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
    
    [dependencies]
    curl = { version = "0.4.40", features = ["http2"] }
    curl-sys = "0.4.50"
    

    curl -V:

    libcurl/7.80.0-DEV OpenSSL/1.1.1h zlib/1.2.7 libidn2/2.3.1 nghttp2/1.41.0
    
    opened by iiibui 14
  • Add support for in-memory certificates

    Add support for in-memory certificates

    This adds support for passing SSL certificates as in-memory blobs using several new options added in libcurl 7.71.0:

    Notably, this PR does not add support for CURLOPT_PROXY_ISSUERCERT_BLOB since this crate does not presently support CURLOPT_PROXY_ISSUERCERT (and adding support for that is somewhat orthogonal to this PR).

    In order to implement the above, this PR also adds support for the new CURLOPTTYPE_BLOB option type (and the corresponding Curl_setblobopt setter function). Although the C API allows the caller to specify whether the data should be copied or not, the safe interface here always copies the data since there doesn't seem to be a straightforward way to make the lifetimes work out otherwise.

    I'm not sure how to add automated tests for this since this crate's test suite currently doesn't seem to be able to test SSL at all. I've been able to verify that this works in small test programs on Linux/OpenSSL using P12 certificates, but have not tested on other platforms using other certificate formats and SSL engines.

    opened by kulshrax 14
  • Add support for curl_easy_upkeep

    Add support for curl_easy_upkeep

    Add feature-gated support for curl_easy_upkeep, introduced in 7.62.0


    Happy to discuss feature naming, etc! Would be nice to have a model for adding in features that have been introduced within the last 9 years.

    opened by cmeister2 14
  • added unix-sockets feature support

    added unix-sockets feature support

    Related to https://github.com/alexcrichton/curl-rust/issues/297

    Example:

    let mut easy = Easy::new();
    easy.unix_socket("/var/socket_path.sock")?;
    easy.url("http://localhost/path")?;
    
    opened by gngeorgiev 14
  • Failed to cross-compile the example program from x86_64 Linux

    Failed to cross-compile the example program from x86_64 Linux

    I built a Rust 1.2.0 compiler under Fedora (x86_64) which supported multiple targets including x86_64-pc-windows-gnu and arm-unknown-linux-gnueabihf and successfully compiled some simple programs.

    However, I failed to cross-compile the example program from curl-rust. (I can compile the example directly under Windows, haven't tried under ARM.)

    When building for x86_64-pc-windows-gnu, I got:

         Compiling curl_example v0.1.0 (file:///home/frederick/rust/curl_example)
         Running `rustc src/main.rs --crate-name curl_example --crate-type bin -C opt-level=3 --out-dir /home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release --emit=dep-info,link --target x86_64-pc-windows-gnu -C ar=x86_64-w64-mingw32-ar -C linker=x86_64-w64-mingw32-gcc -L dependency=/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release -L dependency=/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps --extern curl=/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/libcurl-8828a61714ae0eb4.rlib -L /home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/build/curl-sys-b582fd2220a1331e/out/lib`
    error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
    note: "x86_64-w64-mingw32-gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-static-libgcc" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/curl_example.o" "-o" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/curl_example.exe" "-Wl,--gc-sections" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/libcurl-8828a61714ae0eb4.rlib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/libcurl_sys-b582fd2220a1331e.rlib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/liburl-5247f81b4a7b5841.rlib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/libmatches-68291f81832fc22d.rlib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/liblog-8a6aba167994951e.rlib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/liblibz_sys-e8e1552876cd3abe.rlib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/liblibc-144c435538abd757.rlib" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/librustc_serialize-7ff5bfc027146194.rlib" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib/libstd-d8ace771.rlib" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib/libcollections-d8ace771.rlib" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_unicode-d8ace771.rlib" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib/librand-d8ace771.rlib" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib/liballoc-d8ace771.rlib" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib/liblibc-d8ace771.rlib" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib/libcore-d8ace771.rlib" "-L" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release" "-L" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps" "-L" "/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/build/curl-sys-b582fd2220a1331e/out/lib" "-L" "/usr/local/lib/rustlib/x86_64-pc-windows-gnu/lib" "-L" "/home/frederick/rust/curl_example/.rust/lib/x86_64-pc-windows-gnu" "-L" "/home/frederick/rust/curl_example/lib/x86_64-pc-windows-gnu" "-Wl,-Bstatic" "-Wl,-Bdynamic" "-l" "ws2_32" "-l" "z" "-l" "ws2_32" "-l" "userenv" "-l" "advapi32" "-l" "compiler-rt"
    note: /home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/libcurl_sys-b582fd2220a1331e.rlib(r-curl-libcurl_la-version.o): could not read symbols: Invalid operation
    collect2: error: ld returned 1 exit status
    
    error: aborting due to previous error
    Could not compile `curl_example`.
    
    Caused by:
      Process didn't exit successfully: `rustc src/main.rs --crate-name curl_example --crate-type bin -C opt-level=3 --out-dir /home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release --emit=dep-info,link --target x86_64-pc-windows-gnu -C ar=x86_64-w64-mingw32-ar -C linker=x86_64-w64-mingw32-gcc -L dependency=/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release -L dependency=/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps --extern curl=/home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/deps/libcurl-8828a61714ae0eb4.rlib -L /home/frederick/rust/curl_example/target/x86_64-pc-windows-gnu/release/build/curl-sys-b582fd2220a1331e/out/lib` (exit code: 101)
    

    When building for arm-unknown-linux-gnueabihf, I got:

       Compiling curl_example v0.1.0 (file:///home/frederick/rust/curl_example)
         Running `rustc src/main.rs --crate-name curl_example --crate-type bin -C opt-level=3 --out-dir /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release --emit=dep-info,link --target arm-unknown-linux-gnueabihf -C ar=arm-linux-gnueabihf-ar -C linker=arm-linux-gnueabihf-gcc -L dependency=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release -L dependency=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps --extern curl=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib -L /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/build/curl-sys-b582fd2220a1331e/out/lib -L native=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/build/openssl-sys-765ddf9de3c5179c/out`
    error: linking with `arm-linux-gnueabihf-gcc` failed: exit code: 1
    note: "arm-linux-gnueabihf-gcc" "-Wl,--as-needed" "-L" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/curl_example.o" "-o" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/curl_example" "-Wl,--whole-archive" "-l" "morestack" "-Wl,--no-whole-archive" "-Wl,--gc-sections" "-pie" "-Wl,-O1" "-nodefaultlibs" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl_sys-b582fd2220a1331e.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/liburl-5247f81b4a7b5841.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libmatches-68291f81832fc22d.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/liblog-8a6aba167994951e.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/liblibz_sys-e8e1552876cd3abe.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/librustc_serialize-7ff5bfc027146194.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libopenssl_sys-765ddf9de3c5179c.rlib" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/liblibc-144c435538abd757.rlib" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libstd-d8ace771.rlib" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcollections-d8ace771.rlib" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib/librustc_unicode-d8ace771.rlib" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib/librand-d8ace771.rlib" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib/liballoc-d8ace771.rlib" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib/liblibc-d8ace771.rlib" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcore-d8ace771.rlib" "-L" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release" "-L" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps" "-L" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/build/curl-sys-b582fd2220a1331e/out/lib" "-L" "/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/build/openssl-sys-765ddf9de3c5179c/out" "-L" "/usr/local/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-L" "/home/frederick/rust/curl_example/.rust/lib/arm-unknown-linux-gnueabihf" "-L" "/home/frederick/rust/curl_example/lib/arm-unknown-linux-gnueabihf" "-Wl,-Bstatic" "-Wl,-Bdynamic" "-l" "z" "-l" "crypto" "-l" "ssl" "-l" "c" "-l" "m" "-l" "dl" "-l" "pthread" "-l" "rt" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "compiler-rt"
    note: /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/curl_example.o: In function `main::h3f0c65dd085aa280gaa':
    curl_example.0.rs:(.text._ZN4main20h3f0c65dd085aa280gaaE+0x188): undefined reference to `curl_easy_setopt'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `ffi::easy::global_init::cleanup::hfb9c781cea2b575dzia':
    curl.0.rs:(.text._ZN3ffi4easy11global_init7cleanup20hfb9c781cea2b575dziaE+0x0): undefined reference to `curl_global_cleanup'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `ffi::easy::Easy.Drop::drop::h0c646593d425c9d3Hia':
    curl.0.rs:(.text._ZN3ffi4easy9Easy.Drop4drop20h0c646593d425c9d3HiaE+0x4): undefined reference to `curl_easy_cleanup'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `ffi::err::ErrCode.fmt..Display::fmt::h032b81c4990a5e2fOra':
    curl.0.rs:(.text._ZN3ffi3err20ErrCode.fmt..Display3fmt20h032b81c4990a5e2fOraE+0x48): undefined reference to `curl_easy_strerror'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `http::handle::Handle::new::hcbd4647fea69f7fe3Va':
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x220): undefined reference to `curl_easy_init'
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x230): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x244): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x260): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x49c): undefined reference to `curl_easy_cleanup'
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x534): undefined reference to `curl_easy_cleanup'
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x558): undefined reference to `curl_easy_cleanup'
    curl.0.rs:(.text._ZN4http6handle6Handle3new20hcbd4647fea69f7fe3VaE+0x5dc): undefined reference to `curl_easy_cleanup'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `ffi::easy::Easy::setopt::h17415893674049649907':
    curl.0.rs:(.text._ZN3ffi4easy4Easy6setopt21h17415893674049649907E+0x1bc): undefined reference to `curl_easy_setopt'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `http::handle::Request$LT$$u27$a$C$$u20$$u27$b$GT$::exec::hd3fad3894ea8584cgab':
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x108): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x14c): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x1a0): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x1b8): undefined reference to `curl_easy_setopt'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o):curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x1d0): more undefined references to `curl_easy_setopt' follow
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `http::handle::Request$LT$$u27$a$C$$u20$$u27$b$GT$::exec::hd3fad3894ea8584cgab':
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x8e4): undefined reference to `curl_slist_append'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x94c): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0x998): undefined reference to `curl_slist_free_all'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xa30): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xa50): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xa70): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xa84): undefined reference to `curl_easy_setopt'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xaa4): undefined reference to `curl_easy_setopt'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o):curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xabc): more undefined references to `curl_easy_setopt' follow
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `http::handle::Request$LT$$u27$a$C$$u20$$u27$b$GT$::exec::hd3fad3894ea8584cgab':
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xaf8): undefined reference to `curl_easy_perform'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xb30): undefined reference to `curl_easy_getinfo'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xc0c): undefined reference to `curl_slist_free_all'
    curl.0.rs:(.text._ZN4http6handle35Request$LT$$u27$a$C$$u20$$u27$b$GT$4exec20hd3fad3894ea8584cgabE+0xe24): undefined reference to `curl_slist_free_all'
    /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib(curl-8828a61714ae0eb4.o): In function `ffi::easy::Easy::setopt::h1335928551378549339':
    curl.0.rs:(.text._ZN3ffi4easy4Easy6setopt20h1335928551378549339E+0x160): undefined reference to `curl_easy_setopt'
    collect2: error: ld returned 1 exit status
    
    error: aborting due to previous error
    Could not compile `curl_example`.
    
    Caused by:
      Process didn't exit successfully: `rustc src/main.rs --crate-name curl_example --crate-type bin -C opt-level=3 --out-dir /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release --emit=dep-info,link --target arm-unknown-linux-gnueabihf -C ar=arm-linux-gnueabihf-ar -C linker=arm-linux-gnueabihf-gcc -L dependency=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release -L dependency=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps --extern curl=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/deps/libcurl-8828a61714ae0eb4.rlib -L /home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/build/curl-sys-b582fd2220a1331e/out/lib -L native=/home/frederick/rust/curl_example/target/arm-unknown-linux-gnueabihf/release/build/openssl-sys-765ddf9de3c5179c/out` (exit code: 101)
    

    But I did successfully cross-compile curl-rust itself for both x86_64-pc-windows-gnu and arm-unknown-linux-gnueabihf which made it weirder.

    How to fix these problems? Did I miss any configurations?

    opened by Frederick888 13
  • Expose the curl_multi_poll & curl_multi_wakeup APIs

    Expose the curl_multi_poll & curl_multi_wakeup APIs

    Currently, the curl crate uses internally the older curl_multi_wait API for classic poll(2)-based async clients.

    It would be quite useful, if we could use the newer curl_multi_poll API instead (or let the user decide).

    I have an application that does a lot of HTTP PUTs where the source that produces the data gets quite slow occasionally. When curl asks for data, but we don't have anything to send yet, my read_function returns Err(ReadError::Pause) and at some point in the future, I can resume the transfer with unpause_read(), however, there could be up to a second delay between the moment more data is available and the moment the transfer is unpaused. IIRC, curl_multi_poll/wakeup solve this problem precisely while having the extra benefit that curl_multi_wakeup can be invoked in any thread (nice!).

    Are there any plans to expose these functions? If I attempted to do the work myself, what additional steps do I need to take in terms of documentation, unit tests, etc?

    enhancement 
    opened by darkprokoba 12
  • Latest version causes Multi::wait to block and ignore socket events

    Latest version causes Multi::wait to block and ignore socket events

    Since commit 7f0f5dad2458313e2800cf915c55f180184f6617, using Multi::wait() together with Multi::get_timeout() produces very strange results when combined with one or more extra WaitFds passed to wait().

    I'm seeing two strange behaviors:

    First scenario: When get_timeout() returns Ok(None), my understanding is that curl doesn't have enough info to specify an appropriate timeout value and I should pick a reasonable default. I pick 1s in this case.

    When this happens, for some reason, calling wait() with the default timeout causes curl to block forever until the given timeout is reached, even if there is socket activity on one or more easy handles, or on an extra fd.

    Below is an example program that reproduces the problem:

    extern crate curl;
    
    struct Handler;
    
    impl curl::easy::Handler for Handler {}
    
    fn main() -> Result<(), Box<std::error::Error>> {
        let mut easy = curl::easy::Easy2::new(Handler);
        easy.verbose(true)?;
        easy.get(true)?;
        easy.url("http://example.org")?;
    
        let multi = curl::multi::Multi::new();
        let _easy = multi.add2(easy)?;
    
        let mut extra_fds = [curl::multi::WaitFd::new()];
        extra_fds[0].set_fd(0);
        extra_fds[0].poll_on_read(true);
    
        while multi.perform()? > 0 {
            let timeout = multi.get_timeout()?.unwrap_or(std::time::Duration::from_secs(100));
            println!("timeout: {:?}", timeout);
            multi.wait(&mut extra_fds, timeout)?;
        }
    
        Ok(())
    }
    

    Second scenario: In this scenario, curl does return a recommended timeout, but is a very large number, such as 300 seconds. Normally this would be fine, but similar to the first scenario, curl blocks for the full timeout duration, even when there is socket activity that should interrupt it.

    I'm still working on extracting an example from my code that reproduces this.

    I'm not sure if upgrading the version of curl being used caused this problem and it is an upstream bug, or changing how curl is compiled introduced this issue. I've done some digging myself, but hopefully someone else with more knowledge might have a better idea of the cause.

    My unproven theory is that somehow the latest change causes curl to use a really poor implementation for curl_multi_wait().

    Tested on Linux.

    opened by sagebind 12
  • if openssl dlls are loaded, populate the openssl cert store from the windows cert store

    if openssl dlls are loaded, populate the openssl cert store from the windows cert store

    This is a first cut of pulling certificates from the windows cert store into openssl as discussed in https://github.com/alexcrichton/curl-rust/pull/185. It works, but only for dynamically linked builds since the required APIs are not accessible in a static build.

    The appveyor build was previously a target-feature=+crt-static static build. I obviously had not run the systests with a DLL build - they fail with lots of these:

    bad curl_formadd function pointer: rust: 140700645719848 (0x7ff76c01ff28) != c 140719549205408 (0x7ffbd2be4ba0)
    

    (from https://ci.appveyor.com/project/mcgoo/curl-rust/build/job/ee7opiuiayrniykq)

    Any thoughts on what would cause that and how to chase it down?

    cc: @sfackler

    opened by mcgoo 12
  • use openssl-probe to look for root certificates on windows also

    use openssl-probe to look for root certificates on windows also

    This makes Easy2 use openssl-probe on Windows also. (Vcpkg by default builds a libcurl that uses OpenSSL.)

    I verified that the libcurl built into curl-sys still works if the SSL_CERT_FILE environment variable is set.

    This fixes this test failure on appveyor: https://ci.appveyor.com/project/alexcrichton/curl-rust/build/job/3v6g79vc3htcrm5t

    opened by mcgoo 12
  • add impersonate-chrome and impersonate-ff features (#482)

    add impersonate-chrome and impersonate-ff features (#482)

    initial support for curl-impersonate. allows linking with system-provided libcurl-impersonate-chrome or libcurl-impersonate-ff instead of libcurl. doesn't allow to choose the impersonation target within the code (see #482 for further goals), but the CURL_IMPERSONATE env variable passed to the binary is respected by the library.

    opened by selfisekai 0
  • curl-impersonate support

    curl-impersonate support

    https://github.com/lwthiker/curl-impersonate

    curl-impersonate allows to fight with TLS fingerprinting, a technique used to prevent scraping (here's an example offering from Cloudflare: https://developers.cloudflare.com/bots/concepts/ja3-fingerprint).

    I think supporting it here boils down this:

    • [ ] add impersonate-chrome and impersonate-ff optional features, changing the searched library config to libcurl-impersonate-chrome and libcurl-impersonate-ff respectively (#483)
    • [ ] add support for static-curl feature with impersonate features (using curl-impersonate instead of upstream; not necessarily needed)
    • [ ] expose curl_easy_impersonate in curl-sys crate (limited to impersonate features; docs: https://github.com/lwthiker/curl-impersonate#advanced-usage)
    • [ ] expose curl-impersonate specific opts (on impersonate features)
    • [ ] re-expose curl_easy_impersonate in curl::easy::Easy2 (and curl::easy::Easy?)
    opened by selfisekai 0
  • Vendor libgss when static-curl and spnego features are set

    Vendor libgss when static-curl and spnego features are set

    For spnego authentication to work, curl needs to be built with "a suitable GSS-API library or SSPI on Windows" [0].

    Right now, the build fails if static-curl and spnego features are set, and no suitable lib is found. What do you think of vendoring this dependency in this case?

    This is for proxy authentication support in cargo: https://github.com/rust-lang/cargo/issues/7330 https://github.com/rust-lang/cargo/pull/11433

    [0] https://docs.rs/curl/0.4/curl/easy/struct.Auth.html#method.gssnegotiate

    opened by hhirtz 0
  • I cannot find CURLAUTH_ANY for Auto Authentication

    I cannot find CURLAUTH_ANY for Auto Authentication

    Hello

    I need to call a method in the Auth structure that will set a CURLAUTH_ANY for curl but I didn't find one. Please enlighten me where to get a method can sets CURLAUTH_ANY for Auto authentication.

    Best Regards,

    Lorenzo

    opened by LorenzoLeonardo 0
Releases(0.4.44)
  • 0.4.44(Jul 22, 2022)

  • 0.4.43(Mar 12, 2022)

    Added

    • Expose DNS-over-HTTP options on Easy and Easy2 in curl. Also add relevant definitions for DOH options to curl-sys. (#434)

    Fixed

    • Fix error attempting to mistakenly link to "/lib/darwin" on some macOS configurations where clang --print-search-dirs returns an empty result. (#435)

    Changed

    • Support for MesaLink has been removed from curl upstream. The mesalink feature in both the curl and curl-sys crates now no longer link to MesaLink and emit a warning at build-time, instead falling back to the default TLS backend.
    • Upgraded bundled curl version in curl-sys to 7.82.0 (#438)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.42(Jan 8, 2022)

    Added

    • Add ability to compile bundled curl with rustls as the TLS engine with the rustls crate feature. (#341, #374)
    • Allow enabling NLTM support when compiling bundled curl with the nltm crate feature. (#428)
    • Added more complex example program for using multi API. (#431)

    Changed

    • Upgraded bundled curl version in curl-sys to 7.81.0 (#432)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.41(Nov 20, 2021)

    Added

    Fixed

    • Refactored init behavior to avoid being affected by rustc linking issue https://github.com/rust-lang/rust/issues/90342 on macOS 12.0 Monterey (#417, #426)
    • Guarantee that curl_multi_remove_handle is always called on easy handles attached to a multi handle before being closed. This avoids triggering a double-free bug present in curl 7.78.0-7.80.0. (#421, #423)

    Changed

    • Upgraded bundled curl version in curl-sys to 7.80.0 (#422)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.37(May 13, 2021)

  • 0.4.36(Apr 17, 2021)

    Added

    • Add support for in-memory certificates via new _BLOB options. (#384)

    Dependency updates

    • Update bundled curl to 7.76.0. (#383)
    • Update socket2 to 0.4.0. (#382)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.35(Mar 9, 2021)

    Added

    • Add some more fields to Debug for Version (#368)
    • Add expect_100_timeout option to mirror CURLOPT_EXPECT_100_TIMEOUT_MS (#376)
    • Add feature-gated support for curl_easy_upkeep, introduced in 7.62.0. Use the upkeep_7_62_0 feature to enable this method. (#378)

    Fixed

    • Probe for OpenSSL certificates only once (#362, #363)
    • Upgrade socket2 dependency to a version not making invalid assumptions about the memory layout of std::net::SocketAddr. (#365)
    • Fix debug formatting for Events struct (#377)
    • Fix tcp_nodelay not working for static builds on Unix (#379, #381)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.34(Oct 14, 2020)

    Added

    Fixed

    • Fix Easy2::fmt to print handler correctly. (#353)
    • Fix the bug that cvt() could get rid of extra error message. (#355)
    • Fix some Clippy warnings (#356)

    Dependencies

    • Bump curl to 7.72.0 (#354)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.33(Oct 14, 2020)

  • 0.4.32(Oct 14, 2020)

  • 0.4.31(Jul 23, 2020)

    Added

    • Add proxy_cacert, which completes the bindings for proxy SSL options. (#160, #344)
    • Update bundled libcurl build configuration to enable support for Unix sockets automatically on Unix platforms. (#297, #309, #346)
    • Add unix_socket_path that exposes more Unix socket control than the existing unix_socket method. (#347)
    • Expose CURLOPT_CONNECT_TO via connect_to, which allows you to override the socket address that requests are made to. (#348)

    Dependencies

    • Bump bundled libcurl version to 7.71.1. (#343, #345)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.30(Jun 24, 2020)

    Fixed

    • Fix a safety hole in Multi::close and hide it from docs. This method previously would free the underlying CURLM pointer without consuming the Multi struct, making it possible to cause a use-after-free in safe code. This function now simply returns Ok(()) in order to maintain backwards compatibility, but will be either changed or removed in a future breaking release. (#340, #342)

    Added

    • Add bindings for setting SSL/TLS options for proxies: proxy_cainfo, proxy_sslcert, and proxy_sslkey. (#339)
    • Add HttpVersion::V3 to accomodate for future HTTP/3 support. (#331)

    Changed

    • Mitigate a race condition that can occur when libcurl is first initialized with certain TLS engine versions on a thread other than the main thread by attempting to initialize in a constructor function automatically. This should reduce the likelihood of the misuse occurring on most targets. (#333, #334)
    Source code(tar.gz)
    Source code(zip)
Owner
Alex Crichton
Alex Crichton
HTTP client/libcurl TUI front end in Rust, with request + key storage

Rust TUI HTTP Client with API Key Management This project is still in active development and although it is useable, there may still be bugs and signi

Preston Thorpe 23 Nov 9, 2023
Wrapper around atspi-code to provide higher-level at-spi Rust bindings

atspi Wrapper around atspi-codegen to provide higher-level at-spi Rust bindings. Contributions Take a look at our atspi-codegen crate, and try inpleme

Odilia 3 Feb 7, 2022
Rust bindings for the JavaScriptCore engine.

JavaScriptCore API for Rust This library provides a Rust API for the JavaScriptCore engine with the following goals: High-level API like the JavaScrip

Pekka Enberg 48 Dec 27, 2022
Rust bindings to the RVVM's public api

rvvm [WIP] Safe Rust bindings to the RVVM's public API. Provides the Rust-idiomatic interface to the RVVM public API. Implemented Virtual machine crea

null 3 Jan 9, 2023
⚡️ Python bindings for a rust implementation of aapleby's MurMurHash.

?? murmurh ?? ⚡️ Python bindings for a rust implementation of aapleby's MurMurHash. ?? Contributing Contributions are welcome! Please feel free to ope

Paul Leydier 6 Jan 14, 2023
"Rust bindings for the Matlab C API"

matlab-sys matlab-sys provides low level bindings to Matlab's C API. This allows writing MEX functions, using the C Matrix API, interacting with the C

null 11 Feb 28, 2023
nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor.

?? nvim-oxi nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor. The project is mostly intended for p

Riccardo Mazzarini 655 Jul 13, 2023
API bindings, CLI client and FUSE filesystem for Wiki.js written in Rust.

wikijs-rs API bindings, CLI client and FUSE filesystem for Wiki.js written in Rust. What's inside? Library: Rust bindings to Wiki.js's entire GraphQL

Sandro-Alessio Gierens 4 Sep 19, 2023
Pollard's p - 1, in rust, with python bindings

Pollard's p - 1 algorithm for factorization Written in rust, using pyo3 to provide python bindings and primesieve for fast prime enumeration. libprime

Robin Jadoul 4 Sep 26, 2023
Bindings for jsonpath-rust library

jsonpath-rust-bindings This package contains Python bindings for jsonpath-rust library by besok. The details regarding the JsonPath itself can be foun

Igor 4 Nov 7, 2023
Rust bindings to the tg geometry library

tg-sys tg-sys provides unsafe bindings to the tg library. See the documentation at https://github.com/tidwall/tg/blob/main/docs/API.md for details. Us

Cliff Dyer 5 Nov 13, 2023
hackernews_tui is a Terminal UI to browse Hacker News with vim-like key bindings.

hackernews_tui is written in Rust with the help of Cursive TUI library. It uses HN Algolia search APIs to get Hacker News data.

Thang Pham 364 Dec 28, 2022
Songbird bindings for python

Songbird-Py Songbird bindings for python. The goal is to provide an easy to use alternitive to Lavalink. Its written with rust-bindings to Songbird. S

null 0 Jul 23, 2022
Unopinionated low level API bindings focused on soundness, safety, and stronger types over raw FFI.

?? firehazard ?? Create a fire hazard by locking down your (Microsoft) Windows so nobody can escape (your security sandbox.) Unopinionated low level A

null 5 Nov 17, 2022
Python bindings for decancer.

decancer_py Python bindings for decancer. Installation You can get started with decancer_py by installing from PyPI: pip install -U decancer-py Usage

Jonxslays 6 Dec 27, 2022
Kotlin bindings for yrs.

ykt Kotlin bindings for yrs. Getting started import uniffi.ykt.Doc fun main() { val doc = Doc() val text = doc.getText("my_text") val tx = doc

null 3 Jan 7, 2023
PyO3 bindings and Python interface to skani, a method for fast fast genomic identity calculation using sparse chaining.

?? ⛓️ ?? Pyskani PyO3 bindings and Python interface to skani, a method for fast fast genomic identity calculation using sparse chaining. ??️ Overview

Martin Larralde 13 Mar 21, 2023
pyrevm Blazing-fast Python bindings to revm

pyrevm Blazing-fast Python bindings to revm Quickstart make install make test Example Usage Here we show how you can fork from Ethereum mainnet and s

Georgios Konstantopoulos 97 Apr 14, 2023
RocksDB-based queue with python bindings

RocksQ An inproc RocksDB-based queue with Python bindings. It is implemented in Rust. Features: max capacity limit in number of elements; size calcula

In-Sight 4 Oct 17, 2023