{"id":15032174,"url":"https://github.com/ryanavella/struct-pad","last_synced_at":"2025-09-17T11:48:15.118Z","repository":{"id":57668876,"uuid":"291887014","full_name":"ryanavella/struct-pad","owner":"ryanavella","description":"Padding types for Rust, to enable memory layout optimizations","archived":false,"fork":false,"pushed_at":"2023-09-03T01:04:45.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T23:15:23.088Z","etag":null,"topics":["padding","padding-types","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanavella.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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}},"created_at":"2020-09-01T03:32:40.000Z","updated_at":"2023-12-28T04:06:14.000Z","dependencies_parsed_at":"2025-02-15T21:32:38.095Z","dependency_job_id":"aaf1de9f-5961-46fc-9198-2e31116c1381","html_url":"https://github.com/ryanavella/struct-pad","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanavella%2Fstruct-pad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanavella%2Fstruct-pad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanavella%2Fstruct-pad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanavella%2Fstruct-pad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanavella","download_url":"https://codeload.github.com/ryanavella/struct-pad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248112909,"owners_count":21049749,"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":["padding","padding-types","rust"],"created_at":"2024-09-24T20:17:39.422Z","updated_at":"2025-09-17T11:48:10.060Z","avatar_url":"https://github.com/ryanavella.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# struct-pad\n\nPadding types to enable memory layout optimizations.\n\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ryanavella/struct-pad/blob/master/LICENSE-MIT) [![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](https://github.com/ryanavella/struct-pad/blob/master/UNLICENSE) [![crates.io](https://img.shields.io/crates/v/struct-pad.svg?colorB=319e8c)](https://crates.io/crates/struct-pad) [![docs.rs](https://img.shields.io/badge/docs.rs-struct--pad-yellowgreen)](https://docs.rs/struct-pad)\n\n## Example\n\n```rust\nuse struct_pad::{Pad, PadU0, PadU8, PadU16, PadU32};\n\nstruct Example {\n    field1: u64,\n    field2: u8,\n    // Padding fields\n    pad1: PadU8,\n    #[cfg(target_pointer_width = \"16\")]\n    pad2: PadU0,\n    #[cfg(not(target_pointer_width = \"16\"))]\n    pad2: PadU16,\n    #[cfg(target_pointer_width = \"64\")]\n    pad3: PadU32,\n    #[cfg(not(target_pointer_width = \"64\"))]\n    pad3: PadU0,\n }\n\nimpl Example {\n    const fn new(field1: u64, field2: u8) -\u003e Self {\n        Self {\n            field1,\n            field2,\n            pad1: Pad::VALUE,\n            pad2: Pad::VALUE,\n            pad3: Pad::VALUE,\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanavella%2Fstruct-pad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanavella%2Fstruct-pad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanavella%2Fstruct-pad/lists"}