RubyMotion 开发出来的应用到底和原生应用有差别没呢?到底是开发完后直接转成一模一样的原生 IOS 或者安卓 APP 还是在运行的时候有一个 ruby 的运行时呢?看了很多文章还是没搞清楚这一点,有知道的出来分享一下额
Real native apps
RubyMotion apps are essentially the same as Objective-C, Swift or Java apps, as they run on top of the exact same runtime technologies and are also compiled into optimized machine code. You get to access the entire APIs set of the platform you target.
http://www.rubymotion.com/tour/why-rubymotion/ http://www.rubymotion.com/tour/how-it-works/
开发完后不需要 Ruby 运行时的,这些官网都有介绍
写 RubyMotion 和写 MacRuby 似乎是同一个人。有了早期 MacRuby 跑在 Objective-C Runtime 上面的基础,再去实现一遍 ios 的 sdk 调用,应该也不难吧。至于安卓我就不太了解了,是用的 JRuby 跑在 JVM 上的原理一样吗?
找到这一篇文章:http://www.sitepoint.com/laurent-sansonetti-on-rubymotion-internals/ 说得很详细了。
Absolutely; there’s actually no VM – virtual machine – in LLVM. Sometimes people think it’s a replacement for the JVM. They say: “We need to port this language from JVM to LLVM.” But LLVM is just a compiler. There is no runtime there.