Expand description
Unicode validation and transcoding at billions of characters per second.
This crate is the Rust binding of simdutf.
§Compilation
This crate works out of the box as long as you have a C++11-compatible toolchain installed correctly.
simdutf links C++ standard library, which adds a dynamic linking dependency.
For more details, see simdutf documentation and cc documentation.
Here is an example for local benchmark:
export RUSTFLAGS='-C target-cpu=native'
export CXXFLAGS='-march=native'
cargo build --release
Structs§
- Encoding
- The encoding of a string, defined as a bitflags type.
- Result
- The result type of validation and transcoding.
Enums§
- Base64
Options - The error code type of validation and transcoding.
- Error
Code - The error code type of validation and transcoding.
Functions§
- autodetect_
encodings - Autodetect the possible encodings of the input in one pass.
- autodetect_
single_ encoding - Autodetect the encoding of the input.
- base64_
to_ ⚠binary_ safe - Convert base64 string into binary data.
- binary_
to_ ⚠base64 - Convert binary data into base64.
- change_
endianness_ ⚠utf16 - Change the endianness of UTF-16 string.
- convert_
latin1_ ⚠to_ utf8 - Convert possibly broken Latin1 string into UTF-8 string.
- convert_
latin1_ ⚠to_ utf16 - Convert possibly broken Latin1 string into UTF-16 string.
- convert_
latin1_ ⚠to_ utf32 - Convert possibly broken Latin1 string into UTF-32 string.
- convert_
latin1_ ⚠to_ utf16be - Convert possibly broken Latin1 string into UTF-16BE string.
- convert_
latin1_ ⚠to_ utf16le - Convert possibly broken Latin1 string into UTF-16LE string.
- convert_
utf8_ ⚠to_ latin1 - Convert possibly broken UTF-8 string into Latin1 string.
- convert_
utf8_ ⚠to_ latin1_ with_ errors - Convert possibly broken UTF-8 string into Latin1 string.
- convert_
utf8_ ⚠to_ utf16 - Convert possibly broken UTF-8 string into UTF-16 string.
- convert_
utf8_ ⚠to_ utf32 - Convert possibly broken UTF-8 string into UTF-32 string.
- convert_
utf8_ ⚠to_ utf16_ with_ errors - Convert possibly broken UTF-8 string into UTF-16 string.
- convert_
utf8_ ⚠to_ utf16be - Convert possibly broken UTF-8 string into UTF-16BE string.
- convert_
utf8_ ⚠to_ utf16be_ with_ errors - Convert possibly broken UTF-8 string into UTF-16BE string.
- convert_
utf8_ ⚠to_ utf16le - Convert possibly broken UTF-8 string into UTF-16LE string.
- convert_
utf8_ ⚠to_ utf16le_ with_ errors - Convert possibly broken UTF-8 string into UTF-16LE string.
- convert_
utf8_ ⚠to_ utf32_ with_ errors - Convert possibly broken UTF-8 string into UTF-32 string.
- convert_
utf16_ ⚠to_ latin1 - Convert possibly broken UTF-16 string into Latin1 string.
- convert_
utf16_ ⚠to_ latin1_ with_ errors - Convert possibly broken UTF-16 string into Latin1 string.
- convert_
utf16_ ⚠to_ utf8 - Convert possibly broken UTF-16 string into UTF-8 string.
- convert_
utf16_ ⚠to_ utf8_ with_ errors - Convert possibly broken UTF-16 string into UTF-8 string.
- convert_
utf16_ ⚠to_ utf32 - Convert possibly broken UTF-16 string into UTF-32 string.
- convert_
utf16_ ⚠to_ utf32_ with_ errors - Convert possibly broken UTF-16 string into UTF-32 string.
- convert_
utf16be_ ⚠to_ latin1 - Convert possibly broken UTF-16BE string into Latin1 string.
- convert_
utf16be_ ⚠to_ latin1_ with_ errors - Convert possibly broken UTF-16BE string into Latin1 string.
- convert_
utf16be_ ⚠to_ utf8 - Convert possibly broken UTF-16BE string into UTF-8 string.
- convert_
utf16be_ ⚠to_ utf8_ with_ errors - Convert possibly broken UTF-16BE string into UTF-8 string.
- convert_
utf16be_ ⚠to_ utf32 - Convert possibly broken UTF-16BE string into UTF-32 string.
- convert_
utf16be_ ⚠to_ utf32_ with_ errors - Convert possibly broken UTF-16BE string into UTF-32 string.
- convert_
utf16le_ ⚠to_ latin1 - Convert possibly broken UTF-16LE string into Latin1 string.
- convert_
utf16le_ ⚠to_ latin1_ with_ errors - Convert possibly broken UTF-16LE string into Latin1 string.
- convert_
utf16le_ ⚠to_ utf8 - Convert possibly broken UTF-16LE string into UTF-8 string.
- convert_
utf16le_ ⚠to_ utf8_ with_ errors - Convert possibly broken UTF-16LE string into UTF-8 string.
- convert_
utf16le_ ⚠to_ utf32 - Convert possibly broken UTF-16LE string into UTF-32 string.
- convert_
utf16le_ ⚠to_ utf32_ with_ errors - Convert possibly broken UTF-16LE string into UTF-32 string.
- convert_
utf32_ ⚠to_ latin1 - Convert possibly broken UTF-32 string into Latin1 string.
- convert_
utf32_ ⚠to_ utf8 - Convert possibly broken UTF-32 string into UTF-8 string.
- convert_
utf32_ ⚠to_ utf8_ with_ errors - Convert possibly broken UTF-32 string into UTF-8 string.
- convert_
utf32_ ⚠to_ utf16 - Convert possibly broken UTF-32 string into UTF-16 string.
- convert_
utf32_ ⚠to_ utf16_ with_ errors - Convert possibly broken UTF-32 string into UTF-16 string.
- convert_
utf32_ ⚠to_ utf16be - Convert possibly broken UTF-32 string into UTF-16BE string.
- convert_
utf32_ ⚠to_ utf16be_ with_ errors - Convert possibly broken UTF-32 string into UTF-16BE string.
- convert_
utf32_ ⚠to_ utf16le - Convert possibly broken UTF-32 string into UTF-16LE string.
- convert_
utf32_ ⚠to_ utf16le_ with_ errors - Convert possibly broken UTF-32 string into UTF-16LE string.
- convert_
valid_ ⚠utf8_ to_ latin1 - Convert valid UTF-8 string into Latin1 string.
- convert_
valid_ ⚠utf8_ to_ utf16 - Convert valid UTF-8 string into UTF-16 string.
- convert_
valid_ ⚠utf8_ to_ utf32 - Convert valid UTF-8 string into UTF-32 string.
- convert_
valid_ ⚠utf8_ to_ utf16be - Convert valid UTF-8 string into UTF-16BE string.
- convert_
valid_ ⚠utf8_ to_ utf16le - Convert valid UTF-8 string into UTF-16LE string.
- convert_
valid_ ⚠utf16_ to_ latin1 - Convert valid UTF-16 string into Latin1 string.
- convert_
valid_ ⚠utf16_ to_ utf8 - Convert valid UTF-16 string into UTF-8 string.
- convert_
valid_ ⚠utf16_ to_ utf32 - Convert valid UTF-16 string into UTF-32 string.
- convert_
valid_ ⚠utf16be_ to_ latin1 - Convert valid UTF-16BE string into Latin1 string.
- convert_
valid_ ⚠utf16be_ to_ utf8 - Convert valid UTF-16BE string into UTF-8 string.
- convert_
valid_ ⚠utf16be_ to_ utf32 - Convert valid UTF-16BE string into UTF-32 string.
- convert_
valid_ ⚠utf16le_ to_ latin1 - Convert valid UTF-16LE string into Latin1 string.
- convert_
valid_ ⚠utf16le_ to_ utf8 - Convert valid UTF-16LE string into UTF-8 string.
- convert_
valid_ ⚠utf16le_ to_ utf32 - Convert valid UTF-16LE string into UTF-32 string.
- convert_
valid_ ⚠utf32_ to_ utf8 - Convert valid UTF-32 string into UTF-8 string.
- convert_
valid_ ⚠utf32_ to_ utf16 - Convert valid UTF-32 string into UTF-16 string.
- convert_
valid_ ⚠utf32_ to_ utf16be - Convert valid UTF-32 string into UTF-16BE string.
- convert_
valid_ ⚠utf32_ to_ utf16le - Convert valid UTF-32 string into UTF-16LE string.
- count_
utf8 - Count the number of code points in the UTF-8 string.
- count_
utf16 - Count the number of code points in the UTF-16 string.
- count_
utf16be - Count the number of code points in the UTF-16BE string.
- count_
utf16le - Count the number of code points in the UTF-16LE string.
- latin1_
length_ from_ utf8 - Count the number of code units that the UTF-8 string would require in Latin1 format.
- latin1_
length_ from_ utf16 - Count the number of code units that the UTF-16 string would require in Latin1 format.
- latin1_
length_ from_ utf32 - Count the number of code units that the UTF-32 string would require in Latin1 format.
- utf8_
length_ from_ latin1 - Count the number of code units that the Latin1 string would require in UTF-8 format.
- utf8_
length_ from_ utf16 - Count the number of code units that the UTF-16 string would require in UTF-8 format.
- utf8_
length_ from_ utf32 - Count the number of code units that the UTF-32 string would require in UTF-8 format.
- utf8_
length_ from_ utf16be - Count the number of code units that the UTF-16BE string would require in UTF-8 format.
- utf8_
length_ from_ utf16le - Count the number of code units that the UTF-16LE string would require in UTF-8 format.
- utf16_
length_ from_ latin1 - Count the number of code units that the Latin1 string would require in UTF-16 format.
- utf16_
length_ from_ utf8 - Count the number of code units that the UTF-8 string would require in UTF-16 format.
- utf16_
length_ from_ utf32 - Count the number of code units that the UTF-32 string would require in UTF-16 format.
- utf32_
length_ from_ utf8 - Count the number of code units that the UTF-8 string would require in UTF-32 format.
- utf32_
length_ from_ utf16 - Count the number of code units that the UTF-16 string would require in UTF-32 format.
- utf32_
length_ from_ utf16be - Count the number of code units that the UTF-16BE string would require in UTF-32 format.
- utf32_
length_ from_ utf16le - Count the number of code units that the UTF-16LE string would require in UTF-32 format.
- validate_
ascii - Validate the ASCII string.
- validate_
ascii_ with_ errors - Validate the ASCII string.
- validate_
utf8 - Validate the UTF-8 string.
- validate_
utf8_ with_ errors - Validate the UTF-8 string.
- validate_
utf16 - Validate the UTF-16 string.
- validate_
utf32 - Validate the UTF-32 string.
- validate_
utf16_ with_ errors - Validate the UTF-16 string.
- validate_
utf16be - Validate the UTF-16BE string.
- validate_
utf16be_ with_ errors - Validate the UTF-16BE string.
- validate_
utf16le - Validate the UTF-16LE string.
- validate_
utf16le_ with_ errors - Validate the UTF-16LE string.
- validate_
utf32_ with_ errors - Validate the UTF-32 string.