1[package]
2authors = ["Alex Huszagh <ahuszagh@gmail.com>"]
3autobenches = false
4categories = ["parsing", "encoding", "no-std", "value-formatting"]
5description = "Lexical, to- and from-string conversion routines."
6documentation = "https://docs.rs/lexical-core"
7edition = "2018"
8keywords = ["parsing", "lexical", "encoding", "no_std"]
9license = "MIT/Apache-2.0"
10name = "lexical-core"
11readme = "README.md"
12repository = "https://github.com/Alexhuszagh/rust-lexical/tree/master/lexical-core"
13version = "0.7.6"
14build = "build.rs"
15exclude = [
16    "fuzz/*",
17    "scripts/*",
18    "ffi/*",
19]
20
21[badges]
22travis-ci = { repository = "Alexhuszagh/rust-lexical" }
23
24[dependencies]
25bitflags = "1.2"
26cfg-if = "1.0"
27# Use static_assertions for correct or format features.
28static_assertions = { version = "1", optional = true }
29# Use arrayvec for the correct parser.
30arrayvec = { version = "0.5", default-features = false, optional = true, features = ["array-sizes-33-128"] }
31# Optimized Grisu3 implementation, a well-tested, correct algorithm.
32dtoa = { version = "0.4", optional = true }
33# Optimized Ryu implementation, the fastest correct algorithm.
34ryu = { version = "1.0", optional = true }
35# Enable quickcheck for newer Rustc versions.
36quickcheck = { version = "1.0.3", optional = true }
37# Enable proptest for newer Rustc versions.
38proptest = { version = "0.10.1", optional = true }
39# Use libm in a stable, no_std environment.
40libm = { version = "0.2.1", optional = true }
41
42[dev-dependencies]
43approx = "0.4.0"
44
45[features]
46default = ["correct", "ryu", "std"]
47# Use the correct atof parser.
48correct = ["arrayvec", "static_assertions", "table"]
49# Add support for different float string formats.
50format = ["static_assertions"]
51# Use the optimized Grisu3 implementation from dtoa (not recommended).
52grisu3 = ["dtoa"]
53# Add support for parsing non-decimal float and integer strings.
54radix = []
55# Allow custom rounding schemes, at the cost of slower performance.
56rounding = []
57# Use the `std` library.
58std = []
59# Use precompiled tables for faster performance and accuracy, at the cost of larger binaries.
60table = []
61# Trim a trailing ".0" from an exported float string, and represent -0.0 as "0".
62trim_floats = []
63# Don't force bounds checking with indexing not-known to be valid at compile time.
64# This may lead to memory safety issues.
65unchecked_index = []
66# Don't inline when using perftools
67# Testing only.
68noinline = []
69# Undocumented. Disable quickcheck for older Rustc versions.
70property_tests = ["quickcheck", "proptest"]
71
72# Use heavy optimizations for release builds, and make our panics to detect
73# internal logic errors safe for FFI, via abort.
74[profile.dev]
75opt-level = 0
76debug = true
77lto = false
78
79[profile.release]
80opt-level = 3
81debug = false
82debug-assertions = false
83lto = true
84