Are there any examples of compiling C# code using Mono so that the exe can run with Google's native client support?

前端 未结 3 1399
广开言路
广开言路 2021-02-09 00:53

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

3条回答
  •  难免孤独
    2021-02-09 01:27

    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).

    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.

提交回复
热议问题