Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation for thumbv6m-none-eabi #717

Merged
merged 2 commits into from
May 2, 2023
Merged

Fix compilation for thumbv6m-none-eabi #717

merged 2 commits into from
May 2, 2023

Conversation

LinuxHeki
Copy link
Contributor

I was trying to get rhai running on Raspberry Pi Pico but no-std-compat failed compiling. no-std-compat already fixed that years ago but its not yet been (and may never will be) to crates.io. First commit fixex that, second one fixes error ".swap() not found for AtomicUsize" on thumbv6m-none-eabi.

This merge request fixes compilation but I can't test it because rhai binary is larger than 2MiB (rpi pico flash size).

@schungx
Copy link
Collaborator

schungx commented May 2, 2023

Thanks for this. Ild have to trust you on this as I dont have such a device to test on.

Also, you should be able to get a sub-MB build of rhai if you prune down features. Build for size and omit unnecessary language features.

@schungx schungx merged commit 988a35d into rhaiscript:main May 2, 2023
@LinuxHeki
Copy link
Contributor Author

I got it down to 550 KiB with Engine::RAW and it works. Engine::new() doesn't work, one possible reason is not enough RAM (only 264 KiB). Raw engine is good enough for me 👍

@schungx
Copy link
Collaborator

schungx commented May 2, 2023

Remember that raw engine really has nothing other than some basic builtins. You might want to at least pull in a few packages for minimal functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants