| Crates.io | size-rs |
| lib.rs | size-rs |
| version | 0.2.0 |
| created_at | 2023-10-16 19:48:51.509412+00 |
| updated_at | 2025-10-27 14:12:21.549203+00 |
| description | Tells the size of some structures available on the system |
| homepage | |
| repository | https://github.com/laura-projects/size-rs |
| max_upload_size | |
| id | 1005067 |
| size | 46,625 |
size-rs will give you the size in memory that some rust and libc
structures takes on your system. Tested only on Linux systems.
Invoking size-rs will give you all categories outputs (as shown
below) but one may use --print option to print only one category.
$ size-rs
Integer sizes:
u8: 1 byte - 8 bits
u16: 2 bytes - 16 bits
u32: 4 bytes - 32 bits
u64: 8 bytes - 64 bits
u128: 16 bytes - 128 bits
Ids types:
pid_t: 4 bytes - 32 bits
uid_t: 4 bytes - 32 bits
gid_t: 4 bytes - 32 bits
id_t: 4 bytes - 32 bits
Files related sizes:
ino_t: 8 bytes - 64 bits
off_t: 8 bytes - 64 bits
loff_t: 8 bytes - 64 bits
dev_t: 8 bytes - 64 bits
dirent: 280 bytes - 2240 bits
ino64_t: 8 bytes - 64 bits
off64_t: 8 bytes - 64 bits
dirent64: 280 bytes - 2240 bits
Length sizes:
size_t: 8 bytes - 64 bits
ssize_t: 8 bytes - 64 bits