What is the process of building native extension? #5627
-
|
I was thinking that it works like this:
But what we have in real life:
So:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Probably does not fully answer your question but gives some hint to investigate. I think there's some backwards compatibility stuff that makes the built extension live in several places: (By the way that TODO should be moved to "RubyGems 4", because it was obviously not removed in RubyGems 3 😅. |
Beta Was this translation helpful? Give feedback.
-
|
I have been doing quite a bit of looking at how native gems are built in a series of blog posts: https://notepad.onghu.com/2023/learning-by-reversing-s1-native-gems/ I hope that this helps at least a bit? |
Beta Was this translation helpful? Give feedback.
Probably does not fully answer your question but gives some hint to investigate. I think there's some backwards compatibility stuff that makes the built extension live in several places:
https://github.com/rubygems/rubygems/blob/5d65b7f259bc06ec6749938f1bd6b72f8a4852a6/lib/rubygems/ext/ext_conf_builder.rb#L68-L75
(By the way that TODO should be moved to "RubyGems 4", because it was obviously not removed in RubyGems 3 😅.