Native Client(NaCl)程序可以用C或C++以外的语言编写吗?

Ale*_*xis 20 python google-chrome go google-chrome-extension google-nativeclient

是否可以在Python或Go中编写本机客户端应用程序,然后可以在浏览器中运行?

Bra*_*ick 8

习惯于编译成NaCl,但NaCl是一个移动目标,支持从Go中移除.如果/当NaCl稳定下来时,它可能会在某些时候复活.

  • 既然PNaCl正在生产中,为什么Go没有得到它的NaCl支持? (2认同)

gku*_*uan 6

它在架构上是可行的,但据我所知,目前的SDK只有C/C++工具链.他们将Python REPL作为基于浏览器的客户端运行(包括标准库和sqlite http://lackingrhoticity.blogspot.com/2009/06/python-standard-library-in-native.html).


Voj*_*tek 6

自Go 1.3以来,(再次)支持NaCL.

请参阅Golang 1.3发行说明.


Go 1.2中的过时答案:

据报道,Go 1.3将支持NaCl:

Go 1.3 Native Client支持文档引用:

Go 1.3将支持在Native Client(Google的基于SFI的执行沙箱)下运行命令行程序.

来自Inside Go Play Go博客引用:

Native Client(或"NaCl"),由Google开发的一项技术,允许在Web浏览器中安全执行x86程序.

(这个特殊的工具链将合并到Go 1.3的核心.要了解更多信息,请阅读设计文档.如果您想在此之前使用NaCl,您可以查看具有所有更改的分支.)

请参阅Go 1.3 NACL前叉.


小智 5

如果你下载NaCl工具链,你会看到:

$ ls toolchain/linux_x86/bin
i686-nacl-addr2line  i686-nacl-objcopy      x86_64-nacl-gcc-4.4.3
i686-nacl-ar         i686-nacl-objdump      x86_64-nacl-gccbug
i686-nacl-as         i686-nacl-ranlib       x86_64-nacl-gcov
i686-nacl-c++        i686-nacl-readelf      x86_64-nacl-gfortran
i686-nacl-c++filt    i686-nacl-size     x86_64-nacl-gprof
i686-nacl-cpp        i686-nacl-strings      x86_64-nacl-ld
i686-nacl-g++        i686-nacl-strip        x86_64-nacl-nm
i686-nacl-gcc        x86_64-nacl-addr2line  x86_64-nacl-objcopy
i686-nacl-gcc-4.4.3  x86_64-nacl-ar     x86_64-nacl-objdump
i686-nacl-gccbug     x86_64-nacl-as     x86_64-nacl-ranlib
i686-nacl-gcov       x86_64-nacl-c++        x86_64-nacl-readelf
i686-nacl-gfortran   x86_64-nacl-c++filt    x86_64-nacl-size
i686-nacl-gprof      x86_64-nacl-cpp        x86_64-nacl-strings
i686-nacl-ld         x86_64-nacl-g++        x86_64-nacl-strip
i686-nacl-nm         x86_64-nacl-gcc
Run Code Online (Sandbox Code Playgroud)

注意gfortran已经存在.同样,可以使用单声道支持(请参阅https://github.com/elijahtaylor/mono),因此任何.net语言原则上也是可行的.Unity3d游戏引擎框架使用C#和mono并导出到NativeClient.