{"id":13599824,"url":"https://github.com/near/borsh-rs","last_synced_at":"2025-05-14T01:05:06.169Z","repository":{"id":38082487,"uuid":"315885410","full_name":"near/borsh-rs","owner":"near","description":"Rust implementation of Binary Object Representation Serializer for Hashing","archived":false,"fork":false,"pushed_at":"2025-03-25T10:55:55.000Z","size":70872,"stargazers_count":360,"open_issues_count":28,"forks_count":80,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-12T05:52:37.170Z","etag":null,"topics":["binary-serialization","borsh","rust","serialization"],"latest_commit_sha":null,"homepage":"https://borsh.io/","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/near.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-25T09:11:11.000Z","updated_at":"2025-04-09T22:48:52.000Z","dependencies_parsed_at":"2024-05-29T21:59:04.746Z","dependency_job_id":"57a26844-7462-484a-9d57-f42c70bab8b2","html_url":"https://github.com/near/borsh-rs","commit_stats":{"total_commits":312,"total_committers":53,"mean_commits":5.886792452830188,"dds":0.7884615384615384,"last_synced_commit":"d521f76b6da0f8d9a3bfa120b042fca5dbf3d4e7"},"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fborsh-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fborsh-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fborsh-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/near%2Fborsh-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/near","download_url":"https://codeload.github.com/near/borsh-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254042390,"owners_count":22004901,"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","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":["binary-serialization","borsh","rust","serialization"],"created_at":"2024-08-01T17:01:12.651Z","updated_at":"2025-05-14T01:05:06.130Z","avatar_url":"https://github.com/near.png","language":"Rust","funding_links":[],"categories":["Rust","Smart Contract Platforms"],"sub_categories":[],"readme":"# Borsh in Rust \u0026emsp; [![Latest Version]][crates.io] [![borsh: rustc 1.67+]][Rust 1.67] [![License Apache-2.0 badge]][License Apache-2.0] [![License MIT badge]][License MIT]\n\n[Borsh]: https://borsh.io\n[Latest Version]: https://img.shields.io/crates/v/borsh.svg\n[crates.io]: https://crates.io/crates/borsh\n[borsh: rustc 1.67+]: https://img.shields.io/badge/rustc-1.67+-lightgray.svg\n[Rust 1.67]: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html\n[License Apache-2.0 badge]: https://img.shields.io/badge/license-Apache2.0-blue.svg\n[License Apache-2.0]: https://opensource.org/licenses/Apache-2.0\n[License MIT badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[License MIT]: https://opensource.org/licenses/MIT\n\n**borsh-rs** is Rust implementation of the [Borsh] binary serialization format.\n\nBorsh stands for _Binary Object Representation Serializer for Hashing_. It is meant to be used in\nsecurity-critical projects as it prioritizes [consistency, safety, speed][Borsh], and comes with a\nstrict [specification](https://github.com/near/borsh#specification).\n\n## Example\n\n```rust\nuse borsh::{BorshSerialize, BorshDeserialize, from_slice, to_vec};\n\n#[derive(BorshSerialize, BorshDeserialize, PartialEq, Debug)]\nstruct A {\n    x: u64,\n    y: String,\n}\n\n#[test]\nfn test_simple_struct() {\n    let a = A {\n        x: 3301,\n        y: \"liber primus\".to_string(),\n    };\n    let encoded_a = to_vec(\u0026a).unwrap();\n    let decoded_a = from_slice::\u003cA\u003e(\u0026encoded_a).unwrap();\n    assert_eq!(a, decoded_a);\n}\n```\n\n## Docs shortcuts\n\nFollowing pages are highlighted here just to give reader a chance at learning that\nthey exist.  \n\n- [Derive Macro `BorshSerialize`](./borsh/docs/rustdoc_include/borsh_serialize.md)\n- [Derive Macro `BorshDeserialize`](./borsh/docs/rustdoc_include/borsh_deserialize.md)\n- [Derive Macro `BorshSchema`](./borsh/docs/rustdoc_include/borsh_schema.md)\n\n## Advanced examples \n\nSome of the less trivial examples are present in [examples](./borsh/examples) folder:\n\n- [implementing `BorshSerialize`/`BorshDeserialize` for third-party `serde_json::Value`](./borsh/examples/serde_json_value.rs)\n\n## Testing\n\nIntegration tests should generally be preferred to unit ones. Root module of integration tests of `borsh` crate is [linked](./borsh/tests/tests.rs) here.\n \n## Releasing\n\nThe versions of all public crates in this repository are collectively managed by a single version in the [workspace manifest](https://github.com/near/borsh-rs/blob/master/Cargo.toml).\n\nSo, to publish a new version of all the crates, you can do so by simply bumping that to the next \"patch\" version and submit a PR.\n\nWe have CI Infrastructure put in place to automate the process of publishing all crates once a version change has merged into master.\n\nHowever, before you release, make sure the [CHANGELOG](CHANGELOG.md) is up to date and that the `[Unreleased]` section is present but empty.\n\n## License\n\nThis repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).\nSee [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnear%2Fborsh-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnear%2Fborsh-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnear%2Fborsh-rs/lists"}