{"id":28478851,"url":"https://github.com/klaussilveira/iab-rust","last_synced_at":"2026-02-26T18:14:09.578Z","repository":{"id":291628946,"uuid":"978267429","full_name":"klaussilveira/iab-rust","owner":"klaussilveira","description":"Provides idiomatic Rust data structures for IAB OpenRTB, AdCOM and other specs.","archived":false,"fork":false,"pushed_at":"2025-05-05T18:50:20.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T01:04:11.099Z","etag":null,"topics":["adcom","iab","openrtb","rtb"],"latest_commit_sha":null,"homepage":"","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/klaussilveira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-05-05T18:13:30.000Z","updated_at":"2025-05-05T20:49:24.000Z","dependencies_parsed_at":"2025-05-05T18:53:59.967Z","dependency_job_id":"d5010c60-b6c6-45f6-8113-be20e2550a14","html_url":"https://github.com/klaussilveira/iab-rust","commit_stats":null,"previous_names":["klaussilveira/iab-rust"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/klaussilveira/iab-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaussilveira%2Fiab-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaussilveira%2Fiab-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaussilveira%2Fiab-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaussilveira%2Fiab-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klaussilveira","download_url":"https://codeload.github.com/klaussilveira/iab-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaussilveira%2Fiab-rust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263300213,"owners_count":23445200,"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":["adcom","iab","openrtb","rtb"],"created_at":"2025-06-07T18:07:18.838Z","updated_at":"2026-02-26T18:14:09.569Z","avatar_url":"https://github.com/klaussilveira.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IAB Rust\n\nThis library provides strongly-typed structures for OpenRTB, AdCOM, and other specifications published by the Interactive Advertising Bureau (IAB) for the Rust programming language.\n\nThe primary goal is to define these types in an idiomatic Rust way, adhering strictly to the official specifications. This allows for easier integration and validation of OpenRTB-based protocols within Rust applications.\n\n## Complete\n\n- [OpenRTB 2.6](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md)\n- [AdCOM 1.0](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md)\n\n## Roadmap\n\nThe following specifications are planned for future implementation:\n\n- [OpenRTB Dynamic Native Ads 1.2](https://github.com/InteractiveAdvertisingBureau/Native-Ads/blob/main/OpenRTB-Native-Ads-Specification-Final-1.2.md)\n\n## Creating a Bid Request\n\nBelow is an example of creating a bid request:\n\n```rust\nuse iab::openrtb2::*;\nuse serde_json;\n\nlet request = BidRequest {\n    id: \"80ce30c53c16e6ede735f123ef6e32361bfc7b22\".to_string(),\n    at: Some(1),\n    cur: Some(vec![\"USD\".to_string()]),\n    imp: vec![Imp {\n        id: \"1\".to_string(),\n        bidfloor: Some(0.03),\n        banner: Some(Banner {\n            h: Some(250),\n            w: Some(300),\n            pos: Some(0),\n            ..Default::default()\n        }),\n        ..Default::default()\n    }],\n    site: Some(Site {\n        id: Some(\"102855\".to_string()),\n        cat: Some(vec![\"IAB3-1\".to_string()]),\n        domain: Some(\"www.foobar.com\".to_string()),\n        page: Some(\"http://www.foobar.com/1234.html\".to_string()),\n        publisher: Some(Publisher {\n            id: Some(\"8953\".to_string()),\n            name: Some(\"foobar.com\".to_string()),\n            cat: Some(vec![\"IAB3-1\".to_string()]),\n            domain: Some(\"foobar.com\".to_string()),\n            ..Default::default()\n        }),\n        ..Default::default()\n    }),\n    user: Some(User {\n        id: Some(\"55816b39711f9b5acf3b90e313ed29e51665623f\".to_string()),\n        ..Default::default()\n    }),\n    ..Default::default()\n};\n\nlet output = serde_json::to_string_pretty(\u0026request).expect(\"Failed to serialize BidRequest\");\n```\n\n## Parsing a Bid Request\n\nBelow is an example of parsing a bid request:\n\n```rust\nuse iab::openrtb2::*;\nuse serde_json::{Result};\n\nlet data = r#\"\n    {\n      \"id\": \"80ce30c53c16e6ede735f123ef6e32361bfc7b22\",\n      \"at\": 1,\n      \"cur\": [\"USD\"],\n      \"imp\": [\n        { \"id\": \"1\", \"bidfloor\": 0.03, \"banner\": {\"h\": 250, \"w\": 300, \"pos\": 0} }\n      ],\n      \"site\": {\n        \"id\": \"102855\",\n        \"cat\": [\"IAB3-1\"],\n        \"domain\": \"www.foobar.com\",\n        \"page\": \"http://www.foobar.com/1234.html\",\n        \"publisher\": {\n          \"id\": \"8953\",\n          \"name\": \"foobar.com\",\n          \"cat\": [\"IAB3-1\"],\n          \"domain\": \"foobar.com\"\n        }\n      },\n      \"user\": {\"id\": \"55816b39711f9b5acf3b90e313ed29e51665623f\"}\n    }\"#;\n\n// Parse the Bid Request JSON\nlet br: BidRequest = serde_json::from_str(data).unwrap();\n\n// Do things just like with any other Rust data structure\nprintln!(\n    \"Bid Request {}, with impression {} on {:?}\",\n    br.id,\n    br.imp[0].id,\n    br.site.unwrap().domain\n);\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklaussilveira%2Fiab-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklaussilveira%2Fiab-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklaussilveira%2Fiab-rust/lists"}