{"id":16894826,"url":"https://github.com/legneato/cups-sys","last_synced_at":"2025-09-18T17:03:58.190Z","repository":{"id":57614693,"uuid":"98561876","full_name":"LegNeato/cups-sys","owner":"LegNeato","description":"Low-level Rust interface to the CUPS printing library.","archived":false,"fork":false,"pushed_at":"2022-07-15T20:47:01.000Z","size":1856,"stargazers_count":12,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-15T14:55:40.640Z","etag":null,"topics":["cups","ipp","printing","rust","rust-bindings"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LegNeato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-27T17:06:56.000Z","updated_at":"2024-11-02T00:46:54.000Z","dependencies_parsed_at":"2022-08-27T03:24:38.994Z","dependency_job_id":null,"html_url":"https://github.com/LegNeato/cups-sys","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/LegNeato/cups-sys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegNeato%2Fcups-sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegNeato%2Fcups-sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegNeato%2Fcups-sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegNeato%2Fcups-sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LegNeato","download_url":"https://codeload.github.com/LegNeato/cups-sys/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegNeato%2Fcups-sys/sbom","scorecard":{"id":83163,"data":{"date":"2025-08-11","repo":{"name":"github.com/LegNeato/cups-sys","commit":"dd98b52d6fbc2f59dcc73dfcd5f073ea24b05337"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 3/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T06:19:57.854Z","repository_id":57614693,"created_at":"2025-08-15T06:19:57.854Z","updated_at":"2025-08-15T06:19:57.854Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275800952,"owners_count":25530862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cups","ipp","printing","rust","rust-bindings"],"created_at":"2024-10-13T17:20:07.133Z","updated_at":"2025-09-18T17:03:58.115Z","avatar_url":"https://github.com/LegNeato.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"`cups-sys` [![Build Status](https://travis-ci.org/LegNeato/cups-sys.svg?branch=master)](https://travis-ci.org/LegNeato/cups-sys)\n-----------------------------------------\nRust FFI bindings to [CUPS](https://www.cups.org/).\n\nBackground\n-----------------------------------------\n\nCUPS is the standards-based, open source printing system developed by Apple Inc. for macOS and other UNIX-like operating systems. CUPS uses the Internet Printing Protocol (IPP) to support printing to local and network printers.\n\nThis library ([`cups-sys`](https://github.com/LegNeato/cups-sys)) provides a low-level interface to the CUPS library installed on your system. The binding is generated at build time via the  [`bindgen`](https://github.com/servo/rust-bindgen) project.\n\nI just want to print from Rust\n-----------------------------------------\n\n```rust\nuse std::mem;\nuse std::ptr;\nuse cups-sys::*;\n\nunsafe {\n  let mut dests: *mut cups_dest_t = mem::zeroed();\n  let num_dests = cupsGetDests(\u0026mut dests as *mut _);\n  // Get the default printer.\n  let destination: cups_dest_t = cupsGetDest(ptr::null(), ptr::null(), num_dests, dests);\n  // Print a real page.\n  let job_id: i32 = cupsPrintFile(\n      (*destination).name,\n      // File to print.\n      CString::new(\"/path/to/file\")\n          .unwrap()\n          .as_ptr(),\n      // Name of the print job.\n      CString::new(\"Test print job\")\n          .unwrap()\n          .as_ptr(),\n      (*destination).num_options,\n      (*destination).options\n  );\n  println!(\"{}\", job_id);\n  cupsFreeDests(num_dests, dests);\n}\n```\n\nFor a pure-Rust IPP implementation, check out [`ipp.rs`](https://github.com/dremon/ipp.rs).\n\nDocumentation\n-----------------------------------------\n\nThe auto-generated FFI reference docs can be found at https://legneato.github.io/cups-sys/cups_sys/.\n\nThe original CUPS API documentation (with examples) can be found at https://www.cups.org/doc/api-cups.html.\n\n Example usage\n-----------------------------------------\n```rust\nunsafe {\n    let mut dests: *mut cups_dest_t = mem::zeroed();\n    let num_dests = cupsGetDests(\u0026mut dests as *mut _);\n    let destinations = std::slice::from_raw_parts(dests, num_dests as usize);\n\n    for destination in destinations {\n        let c_printer_name = CStr::from_ptr((*destination).name);\n        let printer_name = c_printer_name.to_string_lossy();\n\n        let c_make_and_model = cupsGetOption(\n            CString::new(\"printer-make-and-model\").unwrap().as_ptr(),\n            destination.num_options,\n            destination.options\n        );\n        let make_and_model = CStr::from_ptr(c_make_and_model).to_string_lossy();\n        println!(\"{} ({})\", printer_name, make_and_model);\n    }\n\n    cupsFreeDests(num_dests, dests);\n}\n```\n\nLicense\n-----------------------------------------\n`cups-sys` is licensed under either of the following, at your option:\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT License ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegneato%2Fcups-sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegneato%2Fcups-sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegneato%2Fcups-sys/lists"}