2 ms·
> where they write their thing in Ruby/Rails and kick out the slower parts to Crystal What's the story on Crystal/Ruby interop these days? I work on a Rails ap
by Toutouxc 3y ago
> where they write their thing in Ruby/Rails and kick out the slower parts to Crystal
What's the story on Crystal/Ruby interop these days? I work on a Rails app that does document automation, and I could definitely find some specific < 1000 LOC segments that would benefit hugely from being 1:1 rewritten into Crystal and integrated with the rest of the app.
- DistractionRect 3y agoAFAIK, it's the same as any other language w/ Ruby. Http micro service, IPC, or FFI. There were some attempts to do inline crystal, like what Mojo does in Python, but I don't know if any of them became stable long term solutions. There's probably a way to get native C ext speed, you can see an old attempt here: https://www.akitaonrails.com/2016/07/06/trying-to-match-c-based-fast-blank-with-crystal https://www.akitaonrails.com/2016/07/06/trying-to-match-c-ba... But at any rate, it'll be better than ruby.