是否有使用Mono编译C#代码的示例,以便该exe可以在Google的本机客户端支持下运行? [英] Are there any examples of compiling C# code using Mono so that the exe can run with Google's native client support?

查看:93
本文介绍了是否有使用Mono编译C#代码的示例,以便该exe可以在Google的本机客户端支持下运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现一个新闻稿指出,Mono现在支持本机客户端的编译.目前尚不清楚这是否仅可从单独的github mono fork获得,还是作为标准发行版的一部分获得.

I have found a press release that states that Mono now support compilation for native client. It's unclear whether this is only available from the separate github mono fork, or as part of the standard distribution.

我已经构建了派生的Mono发行版,但是我找不到任何有关如何构建本机客户端可执行文件的示例,以便可以在Chrome中运行它.

I've built the forked mono distribution, but I have been unable to find any examples on how to build a native client executable so that I can run it in Chrome.

有人知道一个示例项目吗?或者您可以提供一个有关如何为NaCl构建Mono应用程序的示例吗?

Is anyone aware of an example project, or can you provide an example for how to build a Mono application for NaCl?

推荐答案

我认为某些更改可能已在上游进行,但是截至今天(11/16/11),肯定存在仅在github中存在的错误修正.分叉( https://github.com/elijahtaylor/mono/).要为nacl构建mono,请按照mono/nacl目录中的说明进行操作( https://github .com/elijahtaylor/mono/tree/master/nacl ).您需要mono运行时,它将构建一个可以嵌入到nacl模块中并可以JIT编译.NET程序集的mono. (还有一个可在linux/mac上运行并生成nacl模块的mono AOT编译器,但我敢肯定,由于没有人使用或测试它,它现在无法正常工作.)

I think some of the changes may have been upstreamed, but as of today (11/16/11) there are definitely bugfixes that are still only in the github fork ( https://github.com/elijahtaylor/mono/ ). To build mono for nacl, follow the instructions in the mono/nacl directory ( https://github.com/elijahtaylor/mono/tree/master/nacl ). You want the mono runtime, which will build a mono which can be embedded in your nacl module and can JIT-compile .NET assemblies. (There is also a mono AOT compiler which runs on linux/mac and generates nacl modules, but I'm pretty sure it doesn't work right now, as nobody is using or testing it).

有关如何从nacl模块调用Mono运行时到JIT代码的示例,请参见nacl/test/my.c和mono/mini/fsacheck.c.在浏览器内部,您必须提出自己的方式(例如,pepper和/或nacl-mounts)才能将字节码输入到nacl模块中.

See nacl/test/my.c and mono/mini/fsacheck.c for examples of how to call the mono runtime to JIT code from your nacl module. Inside the browser you'll have to come up with your own way (e.g. pepper and/or nacl-mounts) to get the bytcode into your nacl module.

这篇关于是否有使用Mono编译C#代码的示例,以便该exe可以在Google的本机客户端支持下运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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