{"id":27937405,"url":"https://github.com/tuemb/srec-rs","last_synced_at":"2025-05-07T07:52:41.573Z","repository":{"id":290306617,"uuid":"973972211","full_name":"TuEmb/srec-rs","owner":"TuEmb","description":"A Rust crate for parsing Motorola S-record (SRECORD/SREC) files","archived":false,"fork":false,"pushed_at":"2025-05-05T08:33:00.000Z","size":134,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T07:52:28.256Z","etag":null,"topics":[],"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/TuEmb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-28T04:16:47.000Z","updated_at":"2025-05-05T08:33:04.000Z","dependencies_parsed_at":"2025-05-05T09:45:38.384Z","dependency_job_id":null,"html_url":"https://github.com/TuEmb/srec-rs","commit_stats":null,"previous_names":["tuemb/srec-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fsrec-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fsrec-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fsrec-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuEmb%2Fsrec-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TuEmb","download_url":"https://codeload.github.com/TuEmb/srec-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252839277,"owners_count":21812084,"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":[],"created_at":"2025-05-07T07:52:40.818Z","updated_at":"2025-05-07T07:52:41.562Z","avatar_url":"https://github.com/TuEmb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# srec-rs\n\nA Rust library for parsing Motorola S-Record (SREC) files and extracting memory layout and data regions.\n\n## Features\n\n- Parse SREC files (S0, S1, S2, S3, S5, S7, S8, S9 records)\n- Validate checksums\n- Extract all data bytes from S1/S2/S3 records\n- Build memory layout regions, merging adjacent/overlapping regions up to a configurable maximum size\n- Simple API for accessing header, memory layout, and data\n\n## Usage\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\nsrec-rs = { path = \".\" }\n```\n\n### Example\n\n```rust\nuse std::fs::File;\nuse srec_rs::SRecord;\n\nfn main() {\n    let file = File::open(\"test_data/test.srec\").expect(\"Failed to open file\");\n    let srec = SRecord::\u003c0x8000\u003e::from_srec(file);\n\n    // Print header if present\n    if let Some(header) = srec.get_header() {\n        println!(\"Header: {}\", header);\n    }\n\n    // Print memory layout\n    for (addr, size) in srec.get_data_memory_layout() {\n        println!(\"Region: {:?}, size: {:#X}\", addr, size);\n    }\n\n    // Access raw data\n    let data = srec.get_data();\n    println!(\"Total data length: {}\", srec.get_data_length());\n}\n```\n\n## Testing\n\nTo run tests and see debug output:\n\n```sh\ncargo test -- --nocapture\n```\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE-MIT](LICENSE-MIT) for details.\n\n---\n\n**Author:** TuEmb  \n**Year:** 2025","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuemb%2Fsrec-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuemb%2Fsrec-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuemb%2Fsrec-rs/lists"}