我可以使用scala-native在没有JVM的情况下运行我的scala程序吗? [英] Can I run my scala program without JVM using scala-native?

查看:122
本文介绍了我可以使用scala-native在没有JVM的情况下运行我的scala程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近听说过scala-native,这听起来很有趣!
我很好奇原生在这里意味着什么?
提前编译器"是什么意思?
我认为网站

I heard about scala-native recently and it sounds very interesting !
I'm curious about what does native means here ?
what does "ahead-of-time compiler" means ?
I think descriptions in the web site and github repository are not clear.

推荐答案

我可以使用scala-native在没有JVM的情况下运行我的scala程序吗?

Can I run my scala program without JVM using scala-native?

是的,Scala Native的目标是在没有任何类型的VM的情况下支持Scala程序的编译.我们还没有一个稳定的版本,在Twitter上关注我们,它是第一个知道何时发生这种情况的人.

Yes, the goal of Scala Native is to support compilation of Scala programs without any kind of VM. We've not had a stable release yet, follow us on twitter to be the first to know when this happens.

我很好奇本地人在这里意味着什么?

I'm curious about what does native means here ?

Scala一直是在Java虚拟机上运行的语言.与本机应用程序不同,Java应用程序构建在附加的间接层之上,该层将虚拟机指令映射到基础硬件指令.该代码最终仍会编译为本机代码,唯一的区别是它稍后会在应用程序运行期间发生.这也称为即时编译策略.

Scala has historically been a language that runs on Java Virtual Machine. Unlike native applications, Java applications are built on top of an additional indirection layer that maps virtual machine instructions to underlying hardware instructions. The code is still eventually compiled to native code, the only difference is that it happens later on, during the run of the application. This is also known as just-in-time compilation strategy.

提前编译器"是什么意思?

what does "ahead-of-time compiler" means ?

提前"是指在实际运行应用程序之前预先完成从高级Scala代码到低级本机代码的映射.这样可以节省一些间接开销,并减少总体资源消耗.

"Ahead-of-time" means that mapping from high-level Scala code to low-level native code is done in advance, before the application is actually run. This saves us some indirection overhead, and reduces overall resource consumption.

这篇关于我可以使用scala-native在没有JVM的情况下运行我的scala程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆