Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proc macros failed to build (boring-sys) #5

Open
Stefanuk12 opened this issue Oct 10, 2023 · 2 comments
Open

proc macros failed to build (boring-sys) #5

Stefanuk12 opened this issue Oct 10, 2023 · 2 comments

Comments

@Stefanuk12
Copy link

Stefanuk12 commented Oct 10, 2023

thread 'main' panicked at '"enum_(unnamed_at_deps/boringssl/src/include/openssl/err_h_291_1)" is not a valid Ident

System

  • Windows 11

Dependencies

[dependencies]
reqwest-impersonate = { git = "https://github.com/4JX/reqwest-impersonate.git", default-features = false, features = [
    "chrome",
    "blocking",
] }

[patch.crates-io]
hyper = { git = "https://github.com/4JX/hyper.git", branch = "v0.14.18-patched" }
h2 = { git = "https://github.com/4JX/h2.git", branch = "imp" }

main.rs

use reqwest_impersonate::browser::ChromeVersion;

fn main() {
    // Build a client to mimic Chrome 104
    let client = reqwest_impersonate::blocking::Client::builder()
        .chrome_builder(ChromeVersion::V104)
        .build()
        .unwrap();

    // Use the API you're already familiar with
    match client.get("https://yoururl.com").send() {
        Ok(res) => {
            println!("{:?}", res.text().unwrap());
        }
        Err(err) => {
            dbg!(err);
        }
    };
}
@Stefanuk12
Copy link
Author

The issue can be found here cloudflare/boring#121, possibly update the boring crate?

@DokkanWiki
Copy link

Manually bumping bindgen on boring-sys to at least version 0.62.0 (https://github.com/4JX/boring/blob/2a7463aac6f09b79628b764b2323ddb0dd5ca2c3/boring-sys/Cargo.toml#L30) and updating build.rs (https://github.com/4JX/boring/blob/2a7463aac6f09b79628b764b2323ddb0dd5ca2c3/boring-sys/build.rs#L387) :

.default_enum_style(bindgen::EnumVariation::NewType { is_bitfield: false, is_global: false })

Allow it to compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants