Closed lopopolo closed 2 years ago
Will wait for https://github.com/artichoke/strftime-ruby/pull/55 to be merged and will rebase.
READMEs looks good. Only broken link is the docs.rs
link, which will be fixed when we release: https://github.com/artichoke/strftime-ruby/pull/59.
@x-hgg-x what do you think of these release notes? Do you think they could double as the announcement text?
blocked on resolving all outstanding PRs.
@x-hgg-x what do you think of these release notes? Do you think they could double as the announcement text?
Yes it is a good summary of the crate capabilities.
Release Notes
Release 1.0.0 of strftime-ruby.
strftime-ruby
is available on crates.io.strftime-ruby
is a Ruby 3.1.2 compatible implementation of theTime#strftime
method. Thestrftime
routines provided by this crate are POSIX-compatible, except for intentionally ignoring theE
andO
modified conversion specifiers.API
There are 5
strftime
functions in this crate which vary in the type of format specifier they take and how they write the formatted output:strftime::buffered::strftime
: Takes a&[u8]
format specifier and writes to the provided byte slice.strftime::fmt::strftime
: Takes a&str
format specifier and writes to the providedcore::fmt::Write
object.strftime::bytes::strftime
: Takes a&[u8]
format specifier and writes to a newly allocatedVec
, which is returned.strftime::string::strftime
: Takes a&str
format specifier and writes to a newly allocatedString
, which is returned.strftime::io::strftime
: Takes a&[u8]
format specifier and writes to the providedstd::io::Write
object.Allocations
The only routines that allocate in this crate are
strftime::bytes::strftime
andstrftime::string::strftime
. These routines use fallible allocation APIs fromalloc
and return errors to callers.strftime::fmt::strftime
andstrftime::io::strftime
perform no allocations on their own, but the provided writers may allocate.Cargo Features
strftime-ruby
has alloc and std features. All features are enabled by default.strftime::buffered::strftime
andstrftime::fmt::strftime
are available when this crate is compiled without any features and are usable in ano_std
context.The alloc feature enables
strftime::bytes::strftime
andstrftime::string::strftime
.The std feature enables
strftime::io::strftime
.Test Coverage
strftime-ruby
has 100% line coverage, which is enforced by CI, and is fuzzed regularly.