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

发布于 2024-12-10 07:58:01 字数 49 浏览 0 评论 0原文

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

Would it be possible to write a native client application in Python or Go that could then run in the browser?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

尴尬癌患者 2024-12-17 07:58:01

Go 曾经编译为 NaCl,但 NaCl 一直是一个不断变化的目标,以至于 Go 中删除了支持。如果/当氯化钠稳定下来时,它可能会在某个时候复活。

Go used to compile to NaCl, but NaCl's been such a moving target that the support was removed from Go. It'll probably be resurrected at some point if/when NaCl settles down.

昔梦 2024-12-17 07:58:01

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

It is architecturally possible, but the current SDK only has C/C++ toolchains as far as I can tell. They have the Python REPL running as a browser-based client (complete with standard library and sqlite http://lackingrhoticity.blogspot.com/2009/06/python-standard-library-in-native.html ).

诗化ㄋ丶相逢 2024-12-17 07:58:01

从 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 的执行沙箱。

引自Go Playground 内部 Go 博客:

<块引用>

Native Client(或“NaCl”),一项由 Google 开发的技术,允许在网络浏览器内安全执行 x86 程序。

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

请参阅 Go 1.3 NACL 分支

The NaCL is (again) supported since Go 1.3.

See Golang 1.3 release notes.


Obsolete answer as of Go 1.2:

The NaCl will be supported in Go 1.3 reportedly:

Quote from Go 1.3 Native Client Support document:

Go 1.3 will include support for running command-line programs under
Native Client, Google’s SFI-based execution sandbox.

Quote from Inside the Go Playground Go Blog:

Native Client (or "NaCl"), a technology developed by Google to permit the safe execution of x86 programs inside web browsers.

(This special tool chain will be merged into the core for Go 1.3. To learn more, read the design document. If you want to play with NaCl before then, you can check out a fork that has all the changes.)

See Go 1.3 NACL fork.

瀟灑尐姊 2024-12-17 07:58:01

如果您下载 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

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

if you download the NaCl toolchain, you'll see:

$ 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

Note gfortran is already present. Likewise, mono support is available (see https://github.com/elijahtaylor/mono), and thus any .net language is also in principle feasible. The Unity3d game engine framework uses C# and mono and exports to NativeClient.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文