rhai icon indicating copy to clipboard operation
rhai copied to clipboard

What's the minium Flash memory does Rhai need for microchips?

Open youngzhaozju opened this issue 1 year ago • 2 comments

Hey, I want to utilize Rhai on STM32. I found some advices from the book that it is not advised to utilized it on microchips. I am wondering what's the minimum requirements? And, how to make it to be minimum? Thank you! Yang

youngzhaozju avatar May 06 '23 01:05 youngzhaozju

Well, mainly code size. I think for a full-build Rhai engine, the code size is at least of the order of 700-800KB. That may be too large for embedded. If your device can contain that, then it should be fine for you.

Of course, you can prune down features and you should be able to get the size down, but I see 300-400KB as a practical lower limit.

Performance-wise, I've seen a few users use Rhai on the STM32 quite successfully. You may search for some of those projects.

schungx avatar May 06 '23 02:05 schungx

@youngzhaozju did you end up finding out?

schungx avatar May 12 '23 01:05 schungx