num2words icon indicating copy to clipboard operation
num2words copied to clipboard

Add no_std support

Open TTWNO opened this issue 1 year ago • 3 comments

Hi there,

I'm working on a project to get an extremely minimal TTS working in Rust. As part of the requirements, my library needs to be #![no_std]. It'd be nice to take advantage of existing libraries; and yours is very easily adapted to no_std. This makes that simple change.

The only two future consideration are:

  • anything that does depend on std will need to be behind a feature flag, and
  • you may want to enable std_instead_of_alloc; this will suggest that any imports from std:: be changed to alloc:: where possible.

Thanks for putting in the hard work for this!

TTWNO avatar May 17 '24 19:05 TTWNO

Hey, thanks for opening that PR!

I am relatively busy lately so I might take a bit of time to take a look and answer your PR (the other PR dates back from 1+ month which is completely horrendous...), even though it doesn't look that complicated.

Thanks for taking the time to participate in this project. I'll answer ASAP.

Ballasi avatar May 20 '24 00:05 Ballasi

I'm not in particular hurry since I was planning to see if I could change from a loop into an iterator Update: I couldn't make it work with an Iterator. (I wanted to reduce allocations mainly)

Laifsyn avatar May 23 '24 21:05 Laifsyn

@Ballasi just checking in. No rush, I just had to use my git version of the project again for a no_std target and wanted to see if progress could be made regarding a review.

TTWNO avatar Sep 13 '24 00:09 TTWNO