Skip to content

feat: add rust support #947

feat: add rust support

feat: add rust support #947

Triggered via push June 4, 2026 22:59
Status Failure
Total duration 22s
Artifacts

ci.yml

on: push
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

35 errors
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "jsonObj-null-value.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({"foo": json!(null)}); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "jsonObj-multiline.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({"foo": "bar"}); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "http-insecure.js": src/targets/index.test.ts#L102
Error: Missing a test file for rust:reqwest for the http-insecure fixture. Expected to find the output fixture: `/src/targets/rust/reqwest/fixtures/http-insecure.rs` ❯ src/targets/index.test.ts:102:21 Caused by: Caused by: Error: ENOENT: no such file or directory, open 'src/targets/rust/reqwest/fixtures/http-insecure.rs' ❯ src/targets/index.test.ts:88:26 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'src/targets/rust/reqwest/fixtures/http-insecure.rs' }
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "headers.js": src/targets/index.test.ts#L110
AssertionError: expected 'use reqwest;\n\n#[tokio::main]\npub a…' to strictly equal 'use reqwest;\n\n#[tokio::main]\npub a…' - Expected + Received @@ -1,14 +1,15 @@ use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/headers"; let mut headers = reqwest::header::HeaderMap::new(); headers.insert("accept", "application/json".parse().unwrap()); headers.insert("x-foo", "Bar".parse().unwrap()); + headers.insert("x-bar", "Foo".parse().unwrap()); headers.insert("quoted-value", "\"quoted\" 'string'".parse().unwrap()); let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "full.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let querystring = [ ("foo", "bar,baz"), ("baz", "abc"), ("key", "value"), ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "custom-method.js": src/targets/index.test.ts#L110
AssertionError: expected 'use std::str::FromStr;\nuse reqwest;\…' to strictly equal 'use std::str::FromStr;\nuse reqwest;\…' - Expected + Received @@ -1,11 +1,11 @@ use std::str::FromStr; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PROPFIND").unwrap(), url) .send() .await; ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "cookies.js": src/targets/index.test.ts#L110
AssertionError: expected 'use reqwest;\n\n#[tokio::main]\npub a…' to strictly equal 'use reqwest;\n\n#[tokio::main]\npub a…' - Expected + Received @@ -1,16 +1,16 @@ use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/cookies"; let mut headers = reqwest::header::HeaderMap::new(); headers.insert("cookie", "foo=bar; bar=baz".parse().unwrap()); let client = reqwest::Client::new(); - let response = client.post(url) + let response = client.get(url) .headers(headers) .send() .await; let results = response.unwrap() ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "application-json.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,18 +1,18 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({ "number": 1, "string": "f\"oo", "arr": (1, 2, 3), "nested": json!({"a": "b"}), - "arr_mix": (1, "a", json!({"arr_mix_nested": json!({})})), + "arr_mix": (1, "a", json!({"arr_mix_nested": ()})), "boolean": false }); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "application-form-encoded.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({ "foo": "bar", "hello": "world" }); ❯ src/targets/index.test.ts:110:28
src/helpers/utils.test.ts > availableTargets > returns all available targets: src/helpers/utils.test.ts#L7
Error: Snapshot `availableTargets > returns all available targets 1` mismatched - Expected + Received @@ -339,10 +339,24 @@ "default": "native", "key": "ruby", "title": "Ruby", }, { + "clients": [ + { + "description": "reqwest HTTP library", + "extname": ".rs", + "key": "reqwest", + "link": "https://docs.rs/reqwest/latest/reqwest/", + "title": "reqwest", + }, + ], + "default": "reqwest", + "key": "rust", + "title": "Rust", + }, + { "cli": "%s", "clients": [ { "description": "cURL is a command line tool and library for transferring data with URL syntax", "extname": ".sh", ❯ src/helpers/utils.test.ts:7:32
lint
Process completed with exit code 1.
eslint(guard-for-in): src/targets/rust/helpers.ts#L60
Require `for-in` loops to include an `if` statement
eslint(no-continue): src/targets/rust/reqwest/client.ts#L154
Unexpected use of `continue` statement.
build (lts/*)
The strategy configuration was canceled because "build.lts_-1" failed
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "jsonObj-null-value.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({"foo": json!(null)}); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
build (latest)
The strategy configuration was canceled because "build.lts_-1" failed
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "jsonObj-multiline.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({"foo": "bar"}); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "jsonObj-null-value.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({"foo": json!(null)}); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "http-insecure.js": src/targets/index.test.ts#L102
Error: Missing a test file for rust:reqwest for the http-insecure fixture. Expected to find the output fixture: `/src/targets/rust/reqwest/fixtures/http-insecure.rs` ❯ src/targets/index.test.ts:102:21 Caused by: Caused by: Error: ENOENT: no such file or directory, open 'src/targets/rust/reqwest/fixtures/http-insecure.rs' ❯ src/targets/index.test.ts:88:26 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'src/targets/rust/reqwest/fixtures/http-insecure.rs' }
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "jsonObj-multiline.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({"foo": "bar"}); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "headers.js": src/targets/index.test.ts#L110
AssertionError: expected 'use reqwest;\n\n#[tokio::main]\npub a…' to strictly equal 'use reqwest;\n\n#[tokio::main]\npub a…' - Expected + Received @@ -1,14 +1,15 @@ use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/headers"; let mut headers = reqwest::header::HeaderMap::new(); headers.insert("accept", "application/json".parse().unwrap()); headers.insert("x-foo", "Bar".parse().unwrap()); + headers.insert("x-bar", "Foo".parse().unwrap()); headers.insert("quoted-value", "\"quoted\" 'string'".parse().unwrap()); let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "full.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let querystring = [ ("foo", "bar,baz"), ("baz", "abc"), ("key", "value"), ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "http-insecure.js": src/targets/index.test.ts#L102
Error: Missing a test file for rust:reqwest for the http-insecure fixture. Expected to find the output fixture: `/src/targets/rust/reqwest/fixtures/http-insecure.rs` ❯ src/targets/index.test.ts:102:21 Caused by: Caused by: Error: ENOENT: no such file or directory, open 'src/targets/rust/reqwest/fixtures/http-insecure.rs' ❯ src/targets/index.test.ts:88:26 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'src/targets/rust/reqwest/fixtures/http-insecure.rs' }
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "custom-method.js": src/targets/index.test.ts#L110
AssertionError: expected 'use std::str::FromStr;\nuse reqwest;\…' to strictly equal 'use std::str::FromStr;\nuse reqwest;\…' - Expected + Received @@ -1,11 +1,11 @@ use std::str::FromStr; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PROPFIND").unwrap(), url) .send() .await; ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "headers.js": src/targets/index.test.ts#L110
AssertionError: expected 'use reqwest;\n\n#[tokio::main]\npub a…' to strictly equal 'use reqwest;\n\n#[tokio::main]\npub a…' - Expected + Received @@ -1,14 +1,15 @@ use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/headers"; let mut headers = reqwest::header::HeaderMap::new(); headers.insert("accept", "application/json".parse().unwrap()); headers.insert("x-foo", "Bar".parse().unwrap()); + headers.insert("x-bar", "Foo".parse().unwrap()); headers.insert("quoted-value", "\"quoted\" 'string'".parse().unwrap()); let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "cookies.js": src/targets/index.test.ts#L110
AssertionError: expected 'use reqwest;\n\n#[tokio::main]\npub a…' to strictly equal 'use reqwest;\n\n#[tokio::main]\npub a…' - Expected + Received @@ -1,16 +1,16 @@ use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/cookies"; let mut headers = reqwest::header::HeaderMap::new(); headers.insert("cookie", "foo=bar; bar=baz".parse().unwrap()); let client = reqwest::Client::new(); - let response = client.post(url) + let response = client.get(url) .headers(headers) .send() .await; let results = response.unwrap() ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "full.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let querystring = [ ("foo", "bar,baz"), ("baz", "abc"), ("key", "value"), ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "application-json.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,18 +1,18 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({ "number": 1, "string": "f\"oo", "arr": (1, 2, 3), "nested": json!({"a": "b"}), - "arr_mix": (1, "a", json!({"arr_mix_nested": json!({})})), + "arr_mix": (1, "a", json!({"arr_mix_nested": ()})), "boolean": false }); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "custom-method.js": src/targets/index.test.ts#L110
AssertionError: expected 'use std::str::FromStr;\nuse reqwest;\…' to strictly equal 'use std::str::FromStr;\nuse reqwest;\…' - Expected + Received @@ -1,11 +1,11 @@ use std::str::FromStr; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PROPFIND").unwrap(), url) .send() .await; ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "application-form-encoded.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({ "foo": "bar", "hello": "world" }); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "cookies.js": src/targets/index.test.ts#L110
AssertionError: expected 'use reqwest;\n\n#[tokio::main]\npub a…' to strictly equal 'use reqwest;\n\n#[tokio::main]\npub a…' - Expected + Received @@ -1,16 +1,16 @@ use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/cookies"; let mut headers = reqwest::header::HeaderMap::new(); headers.insert("cookie", "foo=bar; bar=baz".parse().unwrap()); let client = reqwest::Client::new(); - let response = client.post(url) + let response = client.get(url) .headers(headers) .send() .await; let results = response.unwrap() ❯ src/targets/index.test.ts:110:28
src/helpers/utils.test.ts > availableTargets > returns all available targets: src/helpers/utils.test.ts#L7
Error: Snapshot `availableTargets > returns all available targets 1` mismatched - Expected + Received @@ -339,10 +339,24 @@ "default": "native", "key": "ruby", "title": "Ruby", }, { + "clients": [ + { + "description": "reqwest HTTP library", + "extname": ".rs", + "key": "reqwest", + "link": "https://docs.rs/reqwest/latest/reqwest/", + "title": "reqwest", + }, + ], + "default": "reqwest", + "key": "rust", + "title": "Rust", + }, + { "cli": "%s", "clients": [ { "description": "cURL is a command line tool and library for transferring data with URL syntax", "extname": ".sh", ❯ src/helpers/utils.test.ts:7:32
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "application-json.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,18 +1,18 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({ "number": 1, "string": "f\"oo", "arr": (1, 2, 3), "nested": json!({"a": "b"}), - "arr_mix": (1, "a", json!({"arr_mix_nested": json!({})})), + "arr_mix": (1, "a", json!({"arr_mix_nested": ()})), "boolean": false }); let mut headers = reqwest::header::HeaderMap::new(); headers.insert("content-type", "application/json".parse().unwrap()); ❯ src/targets/index.test.ts:110:28
src/targets/index.test.ts > request validation > rust > reqwest > request should match fixture for "application-form-encoded.js": src/targets/index.test.ts#L110
AssertionError: expected 'use serde_json::json;\nuse reqwest;\n…' to strictly equal 'use serde_json::json;\nuse reqwest;\n…' - Expected + Received @@ -1,11 +1,11 @@ use serde_json::json; use reqwest; #[tokio::main] pub async fn main() { - let url = "http://mockbin.com/har"; + let url = "https://httpbin.org/anything"; let payload = json!({ "foo": "bar", "hello": "world" }); ❯ src/targets/index.test.ts:110:28
src/helpers/utils.test.ts > availableTargets > returns all available targets: src/helpers/utils.test.ts#L7
Error: Snapshot `availableTargets > returns all available targets 1` mismatched - Expected + Received @@ -339,10 +339,24 @@ "default": "native", "key": "ruby", "title": "Ruby", }, { + "clients": [ + { + "description": "reqwest HTTP library", + "extname": ".rs", + "key": "reqwest", + "link": "https://docs.rs/reqwest/latest/reqwest/", + "title": "reqwest", + }, + ], + "default": "reqwest", + "key": "rust", + "title": "Rust", + }, + { "cli": "%s", "clients": [ { "description": "cURL is a command line tool and library for transferring data with URL syntax", "extname": ".sh", ❯ src/helpers/utils.test.ts:7:32