{"id":33938611,"url":"https://github.com/buntine/barcoders","last_synced_at":"2026-04-02T01:29:29.512Z","repository":{"id":44878741,"uuid":"45339119","full_name":"buntine/barcoders","owner":"buntine","description":"A barcode encoding library for the Rust programming language","archived":false,"fork":false,"pushed_at":"2025-10-31T03:06:37.000Z","size":2907,"stargazers_count":183,"open_issues_count":4,"forks_count":31,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-19T06:59:36.732Z","etag":null,"topics":["barcode-encoding-library","barcodes","rust","symbologies"],"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/buntine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-11-01T12:15:38.000Z","updated_at":"2026-02-12T05:48:49.000Z","dependencies_parsed_at":"2024-06-21T15:20:30.186Z","dependency_job_id":"34652e48-1112-4784-8911-c4187be23690","html_url":"https://github.com/buntine/barcoders","commit_stats":{"total_commits":402,"total_committers":11,"mean_commits":36.54545454545455,"dds":0.5248756218905473,"last_synced_commit":"c688340939477eb47a6eed361480ecfd8f5fc34a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/buntine/barcoders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buntine%2Fbarcoders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buntine%2Fbarcoders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buntine%2Fbarcoders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buntine%2Fbarcoders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buntine","download_url":"https://codeload.github.com/buntine/barcoders/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buntine%2Fbarcoders/sbom","scorecard":{"id":258471,"data":{"date":"2025-08-11","repo":{"name":"github.com/buntine/barcoders","commit":"1fd8d4b771eb83bc7e15009dd2af8ee50b483378"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"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":"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":"Code-Review","score":5,"reason":"Found 7/14 approved changesets -- score normalized to 5","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":"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":"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":"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":"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":"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 23 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-17T10:12:56.024Z","repository_id":44878741,"created_at":"2025-08-17T10:12:56.024Z","updated_at":"2025-08-17T10:12:56.024Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["barcode-encoding-library","barcodes","rust","symbologies"],"created_at":"2025-12-12T15:02:52.501Z","updated_at":"2026-04-02T01:29:29.499Z","avatar_url":"https://github.com/buntine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/buntine/barcoders.svg?branch=master)](https://travis-ci.org/buntine/barcoders)\n[![Coverage Status](https://coveralls.io/repos/buntine/barcoders/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/buntine/barcoders?branch=master)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![Crates.io](http://meritbadge.herokuapp.com/barcoders)](https://crates.io/crates/barcoders)\n[![Algorithmia](https://algorithmia.com/algorithms/anowell/barcoders/badge)](https://algorithmia.com/algorithms/anowell/barcoders)\n\n![BARCODERS](/media/logo.jpg?raw=true \"BARCODERS\")\n\n**Barcoders** is a barcode-encoding library for the Rust programming language.\n\nBarcoders allows you to encode valid data for a chosen barcode symbology into a ```Vec\u003cu8\u003e``` representation of the underlying binary structure. From here, you can take advantage of one of the optional builtin generators (for exporting to SVG, GIF, PNG, etc) or build your own.\n\n## Installation\n\nFor encode-only functionality (e.g if you just want to translate a `String` into a `Vec\u003cu8\u003e` of binary digits):\n\n```toml\n[dependencies]\nbarcoders = \"2.0.0\"\n```\n\nIf you want to generate barcodes into a particular format, turn on the appropriate feature(s):\n\n```toml\n[dependencies]\nbarcoders = {version = \"2.0.0\", features = [\"image\", \"ascii\", \"svg\", \"json\"]}\n```\n\nEach generator is an optional feature so you only need to compile what you want to use.\nSee below for the feature associated to the generation functionality you desire.\n\n## Documentation\n\n[Documentation and examples are available here](https://docs.rs/barcoders).\n\n## Current Support\n\nThe ultimate goal of Barcoders is to provide encoding support for all major (and many not-so-major) symbologies.\n\n### Symbologies\n\n* EAN-13\n  * UPC-A\n  * JAN\n  * Bookland\n* EAN-8\n* EAN Supplementals\n  * EAN-2\n  * EAN-5\n* Code11\n  * USD-8\n* Code39\n* Code93\n* Code128 (A, B, C)\n* Two-Of-Five\n  * Interleaved (ITF)\n  * Standard (STF)\n* Codabar\n* More coming!\n\n### Generators\n\n* ASCII (feature: `ascii`)\n* JSON (feature: `json`)\n* SVG (feature: `svg`)\n* PNG (feature: `image`)\n* GIF (feature: `image`)\n* WEBP (feature: `image`)\n* Image Buffer (feature: `image`)\n* Or add your own\n\n## Examples\n\n### Encoding\n```rust\nextern crate barcoders;\n\nuse barcoders::sym::ean13::*;\n\n// Each encoder accepts a String to be encoded. Valid data is barcode-specific\n// and thus constructors return an Result\u003cT, barcoders::error::Error\u003e.\nlet barcode = EAN13::new(\"593456661897\").unwrap();\n\n// The `encode` method returns a Vec\u003cu8\u003e of the binary representation of the\n// generated barcode. This is useful if you want to add your own generator.\nlet encoded: Vec\u003cu8\u003e = barcode.encode();\n```\n\n### Image (GIF, WEBP, PNG) generation\n```rust\nextern crate barcoders;\n\nuse barcoders::sym::code39::*;\nuse barcoders::generators::image::*;\nuse std::io::prelude::*;\nuse std::io::BufWriter;\nuse std::fs::File;\nuse std::path::Path;\n\nlet barcode = Code39::new(\"1ISTHELONELIESTNUMBER\").unwrap();\nlet png = Image::png(80); // You must specify the height in pixels.\nlet encoded = barcode.encode();\n\n// Image generators return a Result\u003cVec\u003cu8\u003e, barcoders::error::Error) of encoded bytes.\nlet bytes = png.generate(\u0026encoded[..]).unwrap();\n\n// Which you can then save to disk.\nlet file = File::create(\u0026Path::new(\"my_barcode.png\")).unwrap();\nlet mut writer = BufWriter::new(file);\nwriter.write(\u0026bytes[..]).unwrap();\n\n// Generated file ↓ ↓ ↓\n```\n![Code 39: 1ISTHELONELIESTNUMBER](/media/code39_1istheloneliestnumber.png?raw=true \"Code 39: 1ISTHELONELIESTNUMBER\")\n\nYou can also request an [image::RgbaImage](http://www.piston.rs/image/image/type.RgbaImage.html), which you can manipulate yourself:\n```rust\nlet barcode = Code39::new(\"BEELZEBUB\").unwrap();\nlet buffer = Image::image_buffer(100);\nlet encoded = barcode.encode();\nlet img = buffer.generate_buffer(\u0026encoded[..]).unwrap();\n\n// Manipulate and save the image here...\n```\n\nYou may also specify the barcode x-dimension, rotation, background/foreground colors and opacity by specifying the struct fields:\n```rust\nlet gif = Image::GIF{height: 80,\n                     xdim: 1,\n                     rotation: Rotation::Zero,\n                     // Using non black/white colors is generally not recommended by most vendors, but barcoders makes it possible.\n                     foreground: Color::new([255, 0, 0, 255]),\n                     background: Color::new([0, 255, 20, 255])};\n```\n\n### SVG generation\n\nSVG is similar to the other image types, but I've supplied it as a separate feature as it doesn't require third-party dependencies.\n\n```rust\nextern crate barcoders;\n\nuse barcoders::sym::code39::*;\nuse barcoders::generators::svg::*;\nuse std::io::prelude::*;\nuse std::io::BufWriter;\nuse std::fs::File;\nuse std::path::Path;\n\nlet barcode = Code39::new(\"56DFU4A777H\").unwrap();\nlet svg = SVG::new(200); // You must specify the height in pixels.\nlet encoded = barcode.encode();\nlet data: String = svg.generate(\u0026encoded).unwrap();\n\nlet file = File::create(\u0026Path::new(\"my_barcode.svg\")).unwrap();\nlet mut writer = BufWriter::new(file);\nwriter.write(data.as_bytes()).unwrap();\n```\n\nYou may also specify the barcode x-dimension, background/foreground colors and opacity by specifying the struct fields:\n```rust\nlet svg = SVG{height: 80,\n              xdim: 1,\n              // Using non black/white colors is generally not recommended by most vendors, but barcoders makes it possible.\n              foreground: Color::black(),\n              background: Color::new([0, 255, 20, 255])};\n```\n\n### ASCII generation\n\nThe ASCII generator is useful for testing purposes.\n\n```rust\nextern crate barcoders;\n\nuse barcoders::sym::ean13::*;\nuse barcoders::generators::ascii::*;\n\nlet barcode = EAN13::new(\"750103131130\").unwrap();\nlet encoded = barcode.encode();\n\nlet ascii = ASCII::new();\nascii.generate(\u0026encoded[..]);\n\nassert_eq!(ascii.unwrap(),\n\"\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n# # ##   # #  ###  ##  # #  ### #### # ##  ## # # #    # ##  ## ##  ## #    # ###  # ### #  # #\n\".trim());\n```\n\n\n### JSON generation\n\nThis may be useful for passing encoded data to third-party systems in a conventional format.\n\n```rust\nextern crate barcoders;\n\nuse barcoders::sym::codabar::*;\nuse barcoders::generators::json::*;\n\nlet codabar = Codabar::new(\"A98B\").unwrap();\nlet json = JSON::new();\nlet generated = json.generate(\u0026codabar.encode()[..]);\n\nassert_eq!(generated.unwrap(),\n\"\n{\n \\\"height\\\": 10,\n \\\"xdim\\\": 1,\n \\\"encoding\\\": [1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,0,1,0,0,1,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,1]\n}\n\"\n```\n\n## Tests\n\nNote, if you want to output actual image/svg files to the filesystem for visual confirmation, set\nthe `WRITE_TO_FILE` variable in the appropriate test modules.\n\nFull suite:\n```\n$ cargo test --features=\"image svg ascii json\"\n```\n\nEncoding only:\n```\n$ cargo test\n```\n\n## License\n\nLicensed under either of\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\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuntine%2Fbarcoders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuntine%2Fbarcoders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuntine%2Fbarcoders/lists"}