-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
80 lines (67 loc) · 2.98 KB
/
Cargo.toml
File metadata and controls
80 lines (67 loc) · 2.98 KB
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
76
77
78
79
80
[package]
name = "soft-canonicalize"
version = "0.5.6"
edition = "2021"
authors = ["David Krasnitsky <dikaveman@gmail.com>"]
description = "Path canonicalization that works with non-existing paths."
license = "MIT OR Apache-2.0"
repository = "https://github.com/DK26/soft-canonicalize-rs"
homepage = "https://github.com/DK26/soft-canonicalize-rs"
documentation = "https://docs.rs/soft-canonicalize"
keywords = ["path", "canonicalize", "filesystem", "realpath", "symlink"]
categories = ["filesystem", "os", "development-tools"]
readme = "README.md"
rust-version = "1.70.0"
# Note: keep test helpers under `tests/test_helpers` and do not
# register separate ad-hoc test targets for helpers.
[dependencies]
# Optional: fixes std::fs::canonicalize for Linux /proc/PID/root magic symlinks.
# Enabled by default. Disable with `default-features = false` if you need std behavior.
proc-canonicalize = { version = "0.1.3", optional = true }
# Optional dunce dependency for path simplification (Windows-only)
[target.'cfg(windows)'.dependencies]
dunce = { version = "1.0", optional = true }
[dev-dependencies]
# MSRV guard: tempfile >=3.22 pulls windows-sys 0.61+ requiring rustc >=1.71.
# 3.21 is the last known version that builds cleanly on Rust 1.70.0.
tempfile = "=3.21" # Do not update
# Windows test helper: junctions for symlink tests when admin privileges unavailable
[target.'cfg(windows)'.dev-dependencies]
# We cannot use `junction` v1.4.1 crate because that would require
# us to bump our MSRV to Rust 1.71, and we only use this crate for testing.
# So, we stick to the workaround `junction-verbatim`
# Do not bump to `1.3.1` or we will get deprecation warnings about `junction-verbatim` crate.
junction-verbatim = "=1.3.0" # Do not update
[features]
default = ["proc-canonicalize"]
# Opt-in API exposing anchored_canonicalize() function. No extra deps. Disabled by default to reduce binary size.
anchored = []
# Optional: use proc-canonicalize for proper Linux /proc/PID/root magic symlink handling.
# Enabled by default. Disable with `default-features = false` to use std::fs::canonicalize.
proc-canonicalize = ["dep:proc-canonicalize"]
# Opt-in dunce behavior (Windows-only): simplify Windows UNC paths (\\?\C:\foo) to legacy format (C:\foo) when safe.
# This enables compatibility with legacy programs while maintaining non-existing path support.
# On non-Windows platforms, this feature has no effect and adds no dependencies.
# When proc-canonicalize is also enabled, forwards dunce feature to it; otherwise uses dunce directly.
dunce = ["dep:dunce", "proc-canonicalize?/dunce"]
[[example]]
name = "basic_usage"
required-features = []
[[example]]
name = "anchored_canonicalize"
required-features = ["anchored"]
[[example]]
name = "security_demo"
required-features = ["anchored"]
[[example]]
name = "virtual_filesystem_demo"
required-features = ["anchored"]
[[bench]]
name = "performance_comparison"
harness = false
[[bench]]
name = "throughput_analysis"
harness = false
[[bench]]
name = "precision_benchmark"
harness = false