atoi
Parse integers directly from `[u8]` slices in safe code
3.1.0
177M downloads/mo
#552 most downloaded on crates.io
pacman82/atoi-rs
What this package is like to depend on
Last release 1 months ago
25 Jun 2026
Release timing varies
gaps range from 3 weeks to 3.6 years
Most releases are documented
notes for 10 of 15 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
15 releases · first in 2017
2 releases in the last 12 months
see the full history below
Release timeline
15 releases · Jun 2017 to Jun 2026Releases
latest 15-
3.1.025 Jun 2026 -
3.0.004 Jun 2026Release notes
Open source →🚀 Features
-
[breaking] Minimal supported rust compiler now 1.86.0
-
[breaking] Remove ascii_to_digit
-
[breaking] Remove trait MaxNumDigits
-
[breaking] Remove enumeration
SignIt is now an implementation detail of integer
🚜 Refactor
- [breaking]
FromRadix10and its sibling traits used to be implement for any type with a neutral element of additionZero, its successorOne,AddAssignandMulAssign. This allowed it to work not only for builtin types likei32, but also for big integer implementations from other crates. However, it made it also hard to optimize for builtin types.FromRadix10and its sibling traitsFromRadix10Signed,FromRadixSignedChecked,FromRadix16are now explicitly implemented for builtin types. The generic implementation can still be used by wrapping the type in the newIntegerwrapper.
⚡ Performance
-
Inline from_radix_* functions for builtin types
Since these are no longer generic, we do not get the inlining for free.
Benchmarks show significant regressions otherwise -
Speed up hexdigit parsing by using masks to unify ascii cases
Thanks to okaneco for the idea
⚙️ Miscellaneous Tasks
- [breaking] Minimal toolchain is now 1.86.0
- [breaking] Remove
Signfrom public interface
Release notes
Open source →🚀 Features
-
[breaking] Minimal supported rust compiler now 1.86.0
-
[breaking] Remove ascii_to_digit
-
[breaking] Remove trait MaxNumDigits
-
[breaking] Remove enumeration
SignIt is now an implementation detail of integer
🚜 Refactor
- [breaking]
FromRadix10and its sibling traits used to be implement for any type with a neutral element of additionZero, its successorOne,AddAssignandMulAssign. This allowed it to work not only for builtin types likei32, but also for big integer implementations from other crates. However, it made it also hard to optimize for builtin types.FromRadix10and its sibling traitsFromRadix10Signed,FromRadixSignedChecked,FromRadix16are now explicitly implemented for builtin types. The generic implementation can still be used by wrapping the type in the newIntegerwrapper.
⚡ Performance
-
Inline from_radix_* functions for builtin types
Since these are no longer generic, we do not get the inlining for free. Benchmarks show significant regressions otherwise
-
Speed up hexdigit parsing by using masks to unify ascii cases
Thanks to okaneco for the idea
⚙️ Miscellaneous Tasks
- [breaking] Minimal toolchain is now 1.86.0
- [breaking] Remove
Signfrom public interface
-
-
2.0.011 Oct 2022Release notes
Open source →- Minimal supported compiler is Rust 1.57.0
- Support for
no-stdby makingstda default feature which can be opted out of.
-
1.0.022 Jan 2022Release notes
Open source →- Minimal supported compiler is Rust 1.56.0
- Changed Rust edition to 2021
- Stabilized interface
-
0.4.020 Nov 2020Release notes
Open source →- The
atoifunction now supports parsing signed integers. Use theFromRadix10trait directly if you wish to not allow leading+or-signs.
- The
-
0.3.325 Oct 2020Release notes
Open source →- Introduce
FromRadix10SignedandFromRadix10SignedCheckedfor parsing signed integers.
- Introduce
-
0.3.205 Nov 2019Release notes
Open source →- Add support for hex numbers through
FromRadix16andFromRadix16Checked. - Fix: Documentation of
FromRadix10Checkednow has code samples using this trait.
- Add support for hex numbers through
-
0.3.116 Dec 2018 -
0.3.016 Dec 2018Release notes
Open source →- Added
From_radix_10_checked. - Breaking change: atoi now returns
Noneon overflow
- Added
-
0.2.416 Dec 2018 -
0.2.305 Mar 2018Nothing published for this version
-
0.2.205 Jul 2017Nothing published for this version
-
0.2.105 Jul 2017Nothing published for this version
-
0.2.029 Jun 2017Nothing published for this version
-
0.1.029 Jun 2017Nothing published for this version