{"id":33930941,"url":"https://github.com/oh-wind/minicbor-ser","last_synced_at":"2026-04-02T01:28:27.210Z","repository":{"id":57638691,"uuid":"426850072","full_name":"oh-wind/minicbor-ser","owner":"oh-wind","description":"Make minicbor supported by serde","archived":false,"fork":false,"pushed_at":"2023-08-22T05:37:25.000Z","size":60,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T22:31:59.696Z","etag":null,"topics":["binary","cbor","rust","serialization"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/minicbor-ser","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oh-wind.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-11T02:49:03.000Z","updated_at":"2022-11-15T09:46:01.000Z","dependencies_parsed_at":"2023-01-23T09:16:10.351Z","dependency_job_id":null,"html_url":"https://github.com/oh-wind/minicbor-ser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oh-wind/minicbor-ser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oh-wind%2Fminicbor-ser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oh-wind%2Fminicbor-ser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oh-wind%2Fminicbor-ser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oh-wind%2Fminicbor-ser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oh-wind","download_url":"https://codeload.github.com/oh-wind/minicbor-ser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oh-wind%2Fminicbor-ser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293887,"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":["binary","cbor","rust","serialization"],"created_at":"2025-12-12T12:21:12.958Z","updated_at":"2026-04-02T01:28:27.202Z","avatar_url":"https://github.com/oh-wind.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The project is no longer actively maintained\n\n# minicbor-ser\n\n[![crev reviews](https://web.crev.dev/rust-reviews/badge/crev_count/minicbor-ser.svg)](https://web.crev.dev/rust-reviews/crate/minicbor-ser/)\n\nThis repository provides a simple implementation of [serde] for [minicbor], making it easier to use.\n\n# Quick start\n\nJust like using other serde derived libraries:\n\n```toml\n[dependencies]\nminicbor-ser = \"0.1.*\"\n```\n\n* Serialization\n\n```rust\nuse minicbor_ser as cbor;\nuse serde::Serialize;\nfn main(){\n    #[derive(Debug, Serialize)]\n    struct TestStruct {\n        hello: String,\n    }\n\n    let test_struct = TestStruct {\n            hello: \"world\".to_string(),\n    };\n\n    let value = cbor::to_vec(\u0026test_struct).unwrap();\n    assert_eq!(\n        [0xA1u8, 0x65, 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x65, 0x77, 0x6F, 0x72, 0x6C, 0x64],\n        value.as_slice(),\n    )\n}\n```\n\n* Deserialization\n```rust\nuse minicbor_ser as cbor;\nuse serde::Deserialize;\nfn main(){\n    #[derive(Debug, Deserialize, PartialEq)]\n    struct TestStruct {\n        hello: String,\n    }\n\n    let data = [0xA1u8, 0x65, 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x65, 0x77, 0x6F, 0x72, 0x6C, 0x64];\n    \n    let value: TestStruct = cbor::from_slice(\u0026data[..]).unwrap();\n    \n    assert_eq!(\n        TestStruct {\n            hello: \"world\".to_string(),\n        },\n        value,\n    );\n}\n\n```\nBy default, structs will be serialized as `map` and tuples will be serialized as `array`. If you don't want to wrap top-level struct and tuple with map and array, you can use `to_vec_flat`. To deserialize you should use `from_slice_flat`.\n\n```rust\nlet expect = [0x01u8, 0x18, 0xff, 0x65, 0x68, 0x65, 0x6c, 0x6c, 0x6f];\nlet tuple_flatten = (0x01u8, 0xffu8, \"hello\");\nlet value = to_vec_flat(\u0026tuple_flatten).unwrap();\nassert_eq!(\n    expet,\n    value.as_slice(),\n)\n\nlet data = crate::to_vec_flat(\u0026exp).unwrap();\nlet value = from_slice_flat(\u0026data).unwrap();\nassert_eq!(exp, value);\n\n```\n\n\n# Type mapping table\n\nThe following represents how the minicbor-ser will map the types of Rust and CBOR\n- ❌    : Not support\n- ⚠    : Not perfect yet\n\n|       Rust       |               CBOR                |\n| :--------------: | :-------------------------------: |\n| unsigned integer |         unsigned integer          |\n| negative Integer |         negative Integer          |\n|       u128       |                ❌                 |\n|       i128       |                ❌                 |\n|       \u0026str       |              String               |\n|      String      |              String               |\n|      struct      |  map (if `flatten_top` is false)  |\n|       Map        |                map                |\n|      slice       | array (if `flatten_top` is false) |\n|      \u0026[u8]       |               bytes               |\n|      tuple       | array (if `flatten_top` is false) |\n|       Vec        | array (if `flatten_top` is false) |\n|     Vec\u003cu8\u003e      |               Bytes               |\n| newtype variant  |                map                |\n|   unit variant   |              String               |\n|  tuple variant   |               array               |\n|  struct variant  |                map                |\n\n\n# no-std\nThe current `no-std` feature of minicbor-ser requires `alloc`. If your machine cannot use `alloc`, it is recommended that you use the `derive` feature that comes with `minicbor`.  \nTo enable `no-std`, use :\n\n```toml\n[dependencies]\nminicbor-ser = { version = \"0.1.*\", default-features = false }\n```\n\n# Note\nSome types of serialization and deserialization may be different from `minicbor`, depending on how `minicbor` is implemented.\nIf you need the default implementation of `minicbor`, please use `minicbor_ser::cbor` to access its API.\n\n\n\n[serde]: https://serde.rs/\n[minicbor]: https://crates.io/crates/minicbor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foh-wind%2Fminicbor-ser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foh-wind%2Fminicbor-ser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foh-wind%2Fminicbor-ser/lists"}