calc_rational

CLI calculator for rational numbers.
git clone https://git.philomathiclife.com/repos/calc_rational
Log | Files | Refs | README

Cargo.toml (9372B)


      1 [package]
      2 authors = ["Zack Newman <zack@philomathiclife.com>"]
      3 categories = ["algorithms", "mathematics", "science", "command-line-utilities"]
      4 description = "CLI calculator for rational numbers."
      5 documentation = "https://crates.io/crates/calc_rational"
      6 edition = "2024"
      7 keywords = ["calculator", "mathematics", "numerics"]
      8 license = "MIT OR Apache-2.0"
      9 name = "calc_rational"
     10 readme = "README.md"
     11 repository = "https://git.philomathiclife.com/repos/calc_rational/"
     12 rust-version = "1.97.0"
     13 version = "3.1.0"
     14 
     15 [lib]
     16 name = "calc_lib"
     17 path = "src/lib.rs"
     18 
     19 [[bin]]
     20 name = "calc"
     21 path = "src/main.rs"
     22 required-features = ["std"]
     23 
     24 [lints.rust]
     25 deprecated-safe = { level = "deny", priority = -1 }
     26 future-incompatible = { level = "deny", priority = -1 }
     27 keyword-idents = { level = "deny", priority = -1 }
     28 let-underscore = { level = "deny", priority = -1 }
     29 nonstandard-style = { level = "deny", priority = -1 }
     30 refining-impl-trait = { level = "deny", priority = -1 }
     31 rust-2018-compatibility = { level = "deny", priority = -1 }
     32 rust-2018-idioms = { level = "deny", priority = -1 }
     33 rust-2021-compatibility = { level = "deny", priority = -1 }
     34 rust-2024-compatibility = { level = "deny", priority = -1 }
     35 unknown-or-malformed-diagnostic-attributes = { level = "deny", priority = -1 }
     36 unused = { level = "deny", priority = -1 }
     37 warnings = { level = "deny", priority = -1 }
     38 ambiguous-negative-literals = { level = "deny", priority = -1 }
     39 closure-returning-async-block = { level = "deny", priority = -1 }
     40 dead-code-pub-in-binary = { level = "deny", priority = -1 }
     41 deprecated-in-future = { level = "deny", priority = -1 }
     42 #deprecated-llvm-intrinsic = { level = "deny", priority = -1 }
     43 deref-into-dyn-supertrait = { level = "deny", priority = -1 }
     44 ffi-unwind-calls = { level = "deny", priority = -1 }
     45 #fuzzy-provenance-casts = { level = "deny", priority = -1 }
     46 impl-trait-redundant-captures = { level = "deny", priority = -1 }
     47 linker-info = { level = "deny", priority = -1 }
     48 #lossy-provenance-casts = { level = "deny", priority = -1 }
     49 macro-use-extern-crate = { level = "deny", priority = -1 }
     50 meta-variable-misuse = { level = "deny", priority = -1 }
     51 missing-copy-implementations = { level = "deny", priority = -1 }
     52 missing-debug-implementations = { level = "deny", priority = -1 }
     53 missing-docs = { level = "deny", priority = -1 }
     54 #multiple-supertrait-upcastable = { level = "deny", priority = -1 }
     55 #must-not-suspend = { level = "deny", priority = -1 }
     56 non-ascii-idents = { level = "deny", priority = -1 }
     57 #non-exhaustive-omitted-patterns = { level = "deny", priority = -1 }
     58 redundant-imports = { level = "deny", priority = -1 }
     59 redundant-lifetimes = { level = "deny", priority = -1 }
     60 #resolving-to-items-shadowing-supertrait-items = { level = "deny", priority = -1 }
     61 #shadowing-supertrait-items = { level = "deny", priority = -1 }
     62 single-use-lifetimes = { level = "deny", priority = -1 }
     63 trivial-casts = { level = "deny", priority = -1 }
     64 trivial-numeric-casts = { level = "deny", priority = -1 }
     65 unit-bindings = { level = "deny", priority = -1 }
     66 unnameable-types = { level = "deny", priority = -1 }
     67 #unqualified-local-imports = { level = "deny", priority = -1 }
     68 unreachable-pub = { level = "deny", priority = -1 }
     69 unsafe-code = { level = "deny", priority = -1 }
     70 unstable-features = { level = "deny", priority = -1 }
     71 unused-crate-dependencies = { level = "deny", priority = -1 }
     72 unused-import-braces = { level = "deny", priority = -1 }
     73 unused-lifetimes = { level = "deny", priority = -1 }
     74 unused-qualifications = { level = "deny", priority = -1 }
     75 unused-results = { level = "deny", priority = -1 }
     76 variant-size-differences = { level = "deny", priority = -1 }
     77 # Before publishing to crates.io, comment above and uncomment below.
     78 #warnings = { level = "allow", priority = -1 }
     79 #ambiguous-associated-items = { level = "allow", priority = -1 }
     80 #ambiguous-glob-imports = { level = "allow", priority = -1 }
     81 #arithmetic-overflow = { level = "allow", priority = -1 }
     82 #binary-asm-labels = { level = "allow", priority = -1 }
     83 #bindings-with-variant-name = { level = "allow", priority = -1 }
     84 #conflicting-repr-hints = { level = "allow", priority = -1 }
     85 #dangerous-implicit-autorefs = { level = "allow", priority = -1 }
     86 #default-overrides-default-fields = { level = "allow", priority = -1 }
     87 #dependency-on-unit-never-type-fallback = { level = "allow", priority = -1 }
     88 #deref-nullptr = { level = "allow", priority = -1 }
     89 #duplicate-features = { level = "allow", priority = -1 }
     90 #elided-lifetimes-in-associated-constant = { level = "allow", priority = -1 }
     91 #enum-intrinsics-non-enums = { level = "allow", priority = -1 }
     92 #explicit-builtin-cfgs-in-flags = { level = "allow", priority = -1 }
     93 #ill-formed-attribute-input = { level = "allow", priority = -1 }
     94 #incomplete-include = { level = "allow", priority = -1 }
     95 #ineffective-unstable-trait-impl = { level = "allow", priority = -1 }
     96 #invalid-atomic-ordering = { level = "allow", priority = -1 }
     97 #invalid-from-utf8-unchecked = { level = "allow", priority = -1 }
     98 #invalid-macro-export-arguments = { level = "allow", priority = -1 }
     99 #invalid-null-arguments = { level = "allow", priority = -1 }
    100 #invalid-reference-casting = { level = "allow", priority = -1 }
    101 #invalid-type-param-default = { level = "allow", priority = -1 }
    102 #legacy-derive-helpers = { level = "allow", priority = -1 }
    103 #let-underscore-lock = { level = "allow", priority = -1 }
    104 #long-running-const-eval = { level = "allow", priority = -1 }
    105 #macro-expanded-macro-exports-accessed-by-absolute-paths = { level = "allow", priority = -1 }
    106 #mutable-transmutes = { level = "allow", priority = -1 }
    107 #named-asm-labels = { level = "allow", priority = -1 }
    108 #never-type-fallback-flowing-into-unsafe = { level = "allow", priority = -1 }
    109 #no-mangle-const-items = { level = "allow", priority = -1 }
    110 #out-of-scope-macro-calls = { level = "allow", priority = -1 }
    111 #overflowing-literals = { level = "allow", priority = -1 }
    112 #patterns-in-fns-without-body = { level = "allow", priority = -1 }
    113 #proc-macro-derive-resolution-fallback = { level = "allow", priority = -1 }
    114 #pub-use-of-private-extern-crate = { level = "allow", priority = -1 }
    115 #repr-transparent-non-zst-fields = { level = "allow", priority = -1 }
    116 #semicolon-in-expressions-from-macros = { level = "allow", priority = -1 }
    117 #test-unstable-lint = { level = "allow", priority = -1 }
    118 #text-direction-codepoint-in-comment = { level = "allow", priority = -1 }
    119 #text-direction-codepoint-in-literal = { level = "allow", priority = -1 }
    120 #unconditional-panic = { level = "allow", priority = -1 }
    121 #undropped-manually-drops = { level = "allow", priority = -1 }
    122 #uninhabited-static = { level = "allow", priority = -1 }
    123 #unknown-crate-types = { level = "allow", priority = -1 }
    124 #useless-deprecated = { level = "allow", priority = -1 }
    125 #varargs-without-pattern = { level = "allow", priority = -1 }
    126 
    127 [lints.clippy]
    128 cargo = { level = "deny", priority = -1 }
    129 complexity = { level = "deny", priority = -1 }
    130 correctness = { level = "deny", priority = -1 }
    131 nursery = { level = "deny", priority = -1 }
    132 pedantic = { level = "deny", priority = -1 }
    133 perf = { level = "deny", priority = -1 }
    134 restriction = { level = "deny", priority = -1 }
    135 style = { level = "deny", priority = -1 }
    136 suspicious = { level = "deny", priority = -1 }
    137 # Noisy, opinionated, and likely don't prevent bugs or improve APIs.
    138 arbitrary_source_item_ordering = "allow"
    139 blanket_clippy_restriction_lints = "allow"
    140 exhaustive_enums = "allow"
    141 implicit_return = "allow"
    142 min_ident_chars = "allow"
    143 missing_trait_methods = "allow"
    144 pub_use = "allow"
    145 question_mark_used = "allow"
    146 ref_patterns = "allow"
    147 return_and_then = "allow"
    148 semicolon_outside_block = "allow"
    149 self_named_module_files = "allow"
    150 single_call_fn = "allow"
    151 single_char_lifetime_names = "allow"
    152 unseparated_literal_suffix = "allow"
    153 # Before publishing to crates.io, comment above and uncomment below.
    154 #cargo = "allow"
    155 #complexity = "allow"
    156 #correctness = "allow"
    157 #nursery = "allow"
    158 #pedantic = "allow"
    159 #perf = "allow"
    160 #restriction = "allow"
    161 #style = "allow"
    162 #suspicious = "allow"
    163 
    164 [lints.rustdoc]
    165 # Before publishing to crates.io, comment below and uncomment below that.
    166 all = { level = "deny", priority = -1 }
    167 #all = "allow"
    168 
    169 [package.metadata.docs.rs]
    170 all-features = true
    171 default-target = "x86_64-unknown-linux-gnu"
    172 targets = [
    173   "aarch64-apple-darwin",
    174   "aarch64-pc-windows-msvc",
    175   "aarch64-unknown-linux-gnu",
    176   "i686-pc-windows-msvc",
    177   "i686-unknown-linux-gnu",
    178   "x86_64-pc-windows-gnu",
    179   "x86_64-pc-windows-msvc",
    180   "x86_64-unknown-freebsd",
    181   "x86_64-unknown-linux-musl",
    182   "x86_64-unknown-netbsd"
    183 ]
    184 
    185 [dependencies]
    186 num-bigint = { version = "0.4.8", default-features = false }
    187 num-integer = { version = "0.1.46", default-features = false }
    188 num-rational = { version = "0.4.2", default-features = false, features = ["num-bigint"] }
    189 num-traits = { version = "0.2.19", default-features = false }
    190 rand = { version = "0.10.2", default-features = false, features = ["thread_rng"], optional = true }
    191 
    192 [target.'cfg(target_os = "openbsd")'.dependencies]
    193 priv_sep = { version = "3.0.0-alpha.5.1", default-features = false }
    194 
    195 
    196 ### FEATURES #################################################################
    197 
    198 [features]
    199 default = ["rand"]
    200 
    201 # Provide random functions.
    202 rand = ["dep:rand", "std"]
    203 
    204 # Provide std support. This must be enabled when compiling the binary crate.
    205 std = []
    206 
    207 [profile.release]
    208 codegen-units = 1
    209 lto = true
    210 panic = 'abort'
    211 strip = true