forked from Alexhuszagh/rust-lexical
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Cargo.toml
175 lines (149 loc) · 4.36 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[package]
authors = ["Alex Huszagh <ahuszagh@gmail.com>"]
autobenches = false
categories = ["parsing", "encoding", "no-std", "value-formatting"]
description = "Lexical, to- and from-string conversion routines."
documentation = "https://docs.rs/lexical"
edition = "2018"
keywords = ["parsing", "lexical", "encoding", "no_std"]
license = "MIT/Apache-2.0"
name = "lexical"
readme = "README.md"
repository = "https://github.com/Alexhuszagh/rust-lexical"
version = "5.2.0"
exclude = [
"data/*",
"benches/*",
"lexical-codegen/*",
"lexical-benchmark/*",
]
[badges]
travis-ci = { repository = "Alexhuszagh/rust-lexical" }
[dependencies]
cfg-if = "1.0"
lexical-core = { path = "lexical-core", version = "^0.7.4", default-features = false }
# The following are only required for comprehensive float unittests.
# IE, internal testing only:
rand = { version = "0.8", optional = true }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
toml = { version = "0.5", optional = true }
[dev-dependencies]
approx = "0.4.0"
criterion = "0.3"
dtoa = "0.4"
ryu_impl = { version = "1.0", package = "ryu" }
itoa = { version = "0.4", features = ["i128"] }
lazy_static = "1"
[features]
default = ["correct", "ryu", "std"]
# Use the correct atof parser.
correct = ["lexical-core/correct"]
# Add support for different float string formats.
format = ["lexical-core/format"]
# Use the optimized Grisu3 implementation from dtoa (not recommended).
grisu3 = ["lexical-core/grisu3"]
# Add support for [parsing non-decimal float and integer strings.
radix = ["lexical-core/radix"]
# Allow custom rounding schemes, at the cost of slower performance.
rounding = ["lexical-core/rounding"]
# Use the optimized Ryu implementation.
ryu = ["lexical-core/ryu"]
# Use the `std` library.
std = ["lexical-core/std"]
# Trim a trailing ".0" from an exported float string, and represent -0.0 as "0".
trim_floats = ["lexical-core/trim_floats"]
# Don't force bounds checking with indexing not-known to be valid at compile time.
# This may lead to memory safety issues.
unchecked_index = ["lexical-core/unchecked_index"]
# Don't inline when using perftools.
# Testing only.
noinline = ["lexical-core/noinline"]
# Build the comprehensive float parsing tests.
# Testing only.
comprehensive_float_test = ["rand/std", "serde/std", "serde_derive", "std", "toml"]
# Binaries
# Special testing binaries for the runtests.py scripts.
[[bin]]
name = "few_ones"
path = "data/test-parse-random/few_ones.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "huge-pow10"
path = "data/test-parse-random/huge-pow10.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "long-fractions"
path = "data/test-parse-random/long-fractions.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "many-digits"
path = "data/test-parse-random/many-digits.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "rand-f64"
path = "data/test-parse-random/rand-f64.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "short-decimals"
path = "data/test-parse-random/short-decimals.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "subnorm"
path = "data/test-parse-random/subnorm.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "tiny-pow10"
path = "data/test-parse-random/tiny-pow10.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "u32-small"
path = "data/test-parse-random/u32-small.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "u64-pow2"
path = "data/test-parse-random/u64-pow2.rs"
required-features = ["comprehensive_float_test"]
[[bin]]
name = "test-parse-unittests"
path = "data/test-parse-unittests/main.rs"
required-features = ["comprehensive_float_test"]
# Benchmarks
[[bench]]
name = "atof"
path = "benches/atof.rs"
harness = false
[[bench]]
name = "atof_malicious"
path = "benches/atof_malicious.rs"
harness = false
[[bench]]
name = "atof_real"
path = "benches/atof_real.rs"
harness = false
[[bench]]
name = "atoi"
path = "benches/atoi.rs"
harness = false
[[bench]]
name = "itoa"
path = "benches/itoa.rs"
harness = false
[[bench]]
name = "ftoa"
path = "benches/ftoa.rs"
harness = false
[profile.dev]
opt-level = 0
debug = true
lto = false
[profile.release]
opt-level = 3
debug = false
debug-assertions = false
lto = true
[profile.bench]
opt-level = 3
debug = false
debug-assertions = false
lto = true