8 releases

Uses old Rust 2015

0.2.3 Jul 12, 2019
0.2.2 Jan 7, 2018
0.2.1 Feb 21, 2017
0.2.0 Nov 5, 2016
0.1.0 Sep 28, 2016

#150 in Finance

Download history 8/week @ 2023-12-04 15/week @ 2023-12-11 17/week @ 2023-12-18 5/week @ 2023-12-25 28/week @ 2024-01-08 5/week @ 2024-01-15 18/week @ 2024-02-05 34/week @ 2024-02-12 30/week @ 2024-02-19 40/week @ 2024-02-26 23/week @ 2024-03-04 34/week @ 2024-03-11 21/week @ 2024-03-18

120 downloads per month
Used in 4 crates (3 directly)


1.5K SLoC

steel-cent, currency and money values for Rust

See examples, docs, etc. at duelinmarkers.gitlab.io/steel-cent or just browse the rustdocs in the source.


  • Two value types for monetary amounts: Money and SmallMoney
  • A value type for currencies: Currency
  • Customizable output formatting and input parsing of money values
  • Currency lookup by ISO 4217 alpha (e.g., "USD") or numeric (e.g, 840) codes


  • Should checked_{add,sub} return None on mismatched currency instead of panicking?
  • Look up currency by country code
  • Support omitting zero minor part in FormatSpec
  • Accept Into in Money ops (maybe)
  • Support for adding custom currencies to lookup table
  • Include pseudo-currencies w/o decimal places (not sure how that should work)
  • Include historical currencies (maybe)
  • Include non-standard (crypto-)currencies (maybe)
  • BigMoney (not limited to minor-unit precision) backed by BigInt
  • Is there a better way to do pre-defined FormatSpecs?
  • meta: Unify README w/ site/index.html
  • meta: Customize rustdocs


The design of steel-cent is largely inspired by the excellent Joda Money Java library. It also uses Joda Money's currency data.

steel-cent is Copyright 2016 John D. Hume.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall have its copyright assigned to John D. Hume and be dual licensed as above, keeping it free for you and anyone else to use, without any additional terms or conditions.