-
Notifications
You must be signed in to change notification settings - Fork 6
/
Cargo.toml
75 lines (65 loc) · 2.22 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# libpathrs: safe path resolution on Linux
# Copyright (C) 2019-2024 Aleksa Sarai <[email protected]>
# Copyright (C) 2019-2024 SUSE LLC
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
[package]
name = "pathrs"
version = "0.1.3+dev"
license = "LGPL-3.0-or-later"
authors = ["Aleksa Sarai <[email protected]>"]
description = "C-friendly API to make path resolution safer on Linux."
repository = "https://github.com/openSUSE/libpathrs"
readme = "README.md"
keywords = ["file", "fs", "security", "linux"]
categories = ["filesystem"]
edition = "2021"
rust-version = "1.63"
[badges]
maintenance = { status = "experimental" }
[lib]
# When building the CAPI, our Makefile adds --crate-type={cdylib,staticlib}.
crate-type = ["rlib"]
[features]
capi = ["dep:rand", "dep:open-enum"]
# Only used for tests.
_test_as_root = []
[profile.release]
# Enable link-time optimisations.
lto = true
[dependencies]
bitflags = "^2"
itertools = "^0.13"
libc = "^0.2"
memchr = "^2"
# MSRV(1.80): Use LazyLock.
once_cell = "^1"
# MSRV(1.65): Update to >=0.4.1 which uses let_else. 0.4.0 was broken.
open-enum = { version = "=0.3.0", optional = true }
rand = { version = "^0.8", optional = true }
rustix = { version = "^0.38", features = ["fs", "process", "thread", "mount"] }
thiserror = "^1"
[dev-dependencies]
anyhow = "^1"
clap = { version = "^3", features = ["cargo"] }
errno = "^0.3"
tempfile = "^3"
paste = "^1"
pretty_assertions = "^1"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
# We have special handling for coverage runs (which set cfg(coverage)).
'cfg(coverage)',
# We set these cfgs when building with --features=capi.
'cfg(cdylib)', 'cfg(staticlib)'
] }