| 1 |
[package] |
| 2 |
name = "libc" |
| 3 |
version = "0.2.180" |
| 4 |
keywords = ["libc", "ffi", "bindings", "operating", "system"] |
| 5 |
categories = ["external-ffi-bindings", "no-std", "os"] |
| 6 |
exclude = ["/ci/*", "/.github/*", "/.cirrus.yml", "/triagebot.toml", "cherry-pick-stable.sh"] |
| 7 |
description = "Raw FFI bindings to platform libraries like libc." |
| 8 |
authors = ["The Rust Project Developers"] |
| 9 |
edition = "2021" |
| 10 |
license = "MIT OR Apache-2.0" |
| 11 |
repository = "https://github.com/rust-lang/libc" |
| 12 |
rust-version = "1.63" |
| 13 |
|
| 14 |
[package.metadata.docs.rs] |
| 15 |
features = ["extra_traits"] |
| 16 |
default-target = "x86_64-unknown-linux-gnu" |
| 17 |
targets = [ |
| 18 |
"aarch64-apple-darwin", |
| 19 |
"aarch64-apple-ios", |
| 20 |
"aarch64-linux-android", |
| 21 |
"aarch64-pc-windows-msvc", |
| 22 |
"aarch64-unknown-freebsd", |
| 23 |
"aarch64-unknown-fuchsia", |
| 24 |
"aarch64-unknown-hermit", |
| 25 |
"aarch64-unknown-linux-gnu", |
| 26 |
"aarch64-unknown-linux-musl", |
| 27 |
"aarch64-unknown-netbsd", |
| 28 |
"aarch64-unknown-openbsd", |
| 29 |
"aarch64-wrs-vxworks", |
| 30 |
"arm-linux-androideabi", |
| 31 |
"arm-unknown-linux-gnueabi", |
| 32 |
"arm-unknown-linux-gnueabihf", |
| 33 |
"arm-unknown-linux-musleabi", |
| 34 |
"arm-unknown-linux-musleabihf", |
| 35 |
"armebv7r-none-eabi", |
| 36 |
"armebv7r-none-eabihf", |
| 37 |
"armv5te-unknown-linux-gnueabi", |
| 38 |
"armv5te-unknown-linux-musleabi", |
| 39 |
"armv7-linux-androideabi", |
| 40 |
"armv7-unknown-linux-gnueabihf", |
| 41 |
"armv7-unknown-linux-musleabihf", |
| 42 |
"armv7-wrs-vxworks-eabihf", |
| 43 |
"armv7r-none-eabi", |
| 44 |
"armv7r-none-eabihf", |
| 45 |
# FIXME(hexagon): excluded due to duplicate symbol errors |
| 46 |
# "hexagon-unknown-linux-musl", |
| 47 |
"i586-unknown-linux-gnu", |
| 48 |
"i586-unknown-linux-musl", |
| 49 |
"i686-linux-android", |
| 50 |
"i686-pc-windows-gnu", |
| 51 |
"i686-pc-windows-msvc", |
| 52 |
"i686-pc-windows-msvc", |
| 53 |
"i686-unknown-freebsd", |
| 54 |
"i686-unknown-haiku", |
| 55 |
"i686-unknown-linux-gnu", |
| 56 |
"i686-unknown-linux-musl", |
| 57 |
"i686-unknown-netbsd", |
| 58 |
"i686-unknown-openbsd", |
| 59 |
"i686-wrs-vxworks", |
| 60 |
"mips-unknown-linux-gnu", |
| 61 |
"mips-unknown-linux-musl", |
| 62 |
"mips64-unknown-linux-gnuabi64", |
| 63 |
"mips64-unknown-linux-muslabi64", |
| 64 |
"mips64el-unknown-linux-gnuabi64", |
| 65 |
"mips64el-unknown-linux-muslabi64", |
| 66 |
"mipsel-sony-psp", |
| 67 |
"mipsel-unknown-linux-gnu", |
| 68 |
"mipsel-unknown-linux-musl", |
| 69 |
"nvptx64-nvidia-cuda", |
| 70 |
"powerpc-unknown-linux-gnu", |
| 71 |
"powerpc-unknown-linux-gnuspe", |
| 72 |
"powerpc-unknown-netbsd", |
| 73 |
"powerpc-wrs-vxworks", |
| 74 |
"powerpc-wrs-vxworks-spe", |
| 75 |
"powerpc64-ibm-aix", |
| 76 |
"powerpc64-unknown-freebsd", |
| 77 |
"powerpc64-unknown-linux-gnu", |
| 78 |
"powerpc64-wrs-vxworks", |
| 79 |
"powerpc64le-unknown-linux-gnu", |
| 80 |
"powerpc64le-unknown-linux-musl", |
| 81 |
"riscv32gc-unknown-linux-gnu", |
| 82 |
"riscv32i-unknown-none-elf", |
| 83 |
"riscv32imac-unknown-none-elf", |
| 84 |
"riscv32imc-unknown-none-elf", |
| 85 |
"riscv32-wrs-vxworks", |
| 86 |
"riscv64gc-unknown-freebsd", |
| 87 |
"riscv64gc-unknown-hermit", |
| 88 |
"riscv64gc-unknown-linux-gnu", |
| 89 |
"riscv64gc-unknown-linux-musl", |
| 90 |
"riscv64gc-unknown-none-elf", |
| 91 |
"riscv64imac-unknown-none-elf", |
| 92 |
"riscv64-wrs-vxworks", |
| 93 |
"s390x-unknown-linux-gnu", |
| 94 |
"s390x-unknown-linux-musl", |
| 95 |
"sparc-unknown-linux-gnu", |
| 96 |
"sparc64-unknown-linux-gnu", |
| 97 |
"sparc64-unknown-netbsd", |
| 98 |
"sparcv9-sun-solaris", |
| 99 |
"thumbv6m-none-eabi", |
| 100 |
"thumbv7em-none-eabi", |
| 101 |
"thumbv7em-none-eabihf", |
| 102 |
"thumbv7m-none-eabi", |
| 103 |
"thumbv7neon-linux-androideabi", |
| 104 |
"thumbv7neon-unknown-linux-gnueabihf", |
| 105 |
"wasm32-unknown-emscripten", |
| 106 |
"wasm32-unknown-unknown", |
| 107 |
"x86_64-apple-darwin", |
| 108 |
"x86_64-apple-ios", |
| 109 |
"x86_64-fortanix-unknown-sgx", |
| 110 |
"x86_64-linux-android", |
| 111 |
"x86_64-pc-solaris", |
| 112 |
"x86_64-pc-windows-gnu", |
| 113 |
"x86_64-pc-windows-msvc", |
| 114 |
"x86_64-unknown-dragonfly", |
| 115 |
"x86_64-unknown-freebsd", |
| 116 |
"x86_64-unknown-fuchsia", |
| 117 |
"x86_64-unknown-haiku", |
| 118 |
"x86_64-unknown-hermit", |
| 119 |
"x86_64-unknown-illumos", |
| 120 |
"x86_64-unknown-l4re-uclibc", |
| 121 |
"x86_64-unknown-linux-gnu", |
| 122 |
"x86_64-unknown-linux-gnux32", |
| 123 |
"x86_64-unknown-linux-musl", |
| 124 |
"x86_64-unknown-netbsd", |
| 125 |
"x86_64-unknown-openbsd", |
| 126 |
"x86_64-unknown-redox", |
| 127 |
"x86_64-wrs-vxworks" |
| 128 |
] |
| 129 |
cargo-args = ["-Zbuild-std=core"] |
| 130 |
|
| 131 |
[dependencies] |
| 132 |
rustc-std-workspace-core = { version = "1.0.1", optional = true } |
| 133 |
|
| 134 |
[features] |
| 135 |
default = ["std"] |
| 136 |
std = [] |
| 137 |
rustc-dep-of-std = ['align', 'rustc-std-workspace-core'] |
| 138 |
extra_traits = [] |
| 139 |
|
| 140 |
# `const-extern-function` is deprecated and no longer does anything |
| 141 |
const-extern-fn = [] |
| 142 |
|
| 143 |
# `align` is deprecated and no longer does anything |
| 144 |
align = [] |
| 145 |
|
| 146 |
# use_std is deprecated, use `std` instead |
| 147 |
use_std = ['std'] |
| 148 |
|
| 149 |
[workspace] |
| 150 |
members = [ |
| 151 |
"ctest", |
| 152 |
"libc-test", |
| 153 |
] |
| 154 |
|
| 155 |
# FIXME(msrv): These should be renamed as `[workspace.lints.*]` once MSRV is above 1.64 |
| 156 |
# This way all crates can use it with `[lints] workspace=true` section |
| 157 |
|
| 158 |
[lints.rust] |
| 159 |
# FIXME(cleanup): make ident usage consistent in each file |
| 160 |
unused_qualifications = "allow" |
| 161 |
|
| 162 |
[lints.clippy] |
| 163 |
# Enable pedantic lints - use this manually once in a while, but don't enable by default |
| 164 |
# pedantic = { level = "warn", priority = -1 } |
| 165 |
|
| 166 |
# We are okay with the current state of these lints |
| 167 |
explicit_iter_loop = "warn" |
| 168 |
identity_op = "allow" # some expressions like `0 | x` are clearer for bit ops |
| 169 |
manual_assert = "warn" |
| 170 |
map_unwrap_or = "warn" |
| 171 |
missing_safety_doc = "allow" # safety? in libc? seriously? |
| 172 |
non_minimal_cfg = "allow" # for some reason cfg_if! sometimes trigger this |
| 173 |
ptr_as_ptr = "warn" |
| 174 |
unnecessary_semicolon = "warn" |
| 175 |
|
| 176 |
# FIXME(clippy): these should be fixed if possible |
| 177 |
expl_impl_clone_on_copy = "allow" |
| 178 |
uninlined_format_args = "allow" |
| 179 |
unnecessary_cast = "allow" # some casts like `as usize` are only needed for some targets |
| 180 |
used_underscore_binding = "allow" |
| 181 |
|
| 182 |
[package.metadata.cargo-semver-checks.lints] |
| 183 |
# Alignment is an internal detail that users must not rely upon |
| 184 |
repr_align_removed = "warn" |
| 185 |
# We deprecate things all the time |
| 186 |
global_value_marked_deprecated = "warn" |