Tools to turn .NET libraries into native libraries that can be consumed on Android, iOS, Mac, Linux and other platforms.
Перейти к файлу
Joao Matos a9a58326ef Bump to latest CppSharp. 2017-02-27 20:31:04 +00:00
binder Bump to latest CppSharp. 2017-02-27 20:31:04 +00:00
build Renamed CheckKeywords pass to CheckReservedKeywords. 2017-02-23 16:55:38 +00:00
external Bump to latest CppSharp. 2017-02-27 20:31:04 +00:00
support Remove some C99 inline code from eglib. 2017-01-17 23:25:37 +00:00
tests/Basic Renamed namespaces to MonoEmbeddinator4000. 2016-11-14 19:52:27 +00:00
.gitignore Update .gitignore. 2017-02-17 16:15:59 +00:00
.gitmodules Change Xamarin.Android.Tools sub-module to use HTTPS Git URL. 2017-01-25 13:46:12 +00:00
.travis.yml Require Travis image with sudo support. 2017-02-19 00:05:34 +00:00
LICENSE Pushed initial work-in-progress code for managed-to-native bindings generator. 2016-07-25 16:34:57 +01:00
README.md added argument for Visual Studio version specification 2017-01-25 17:22:54 +01:00
e4000-logo.png Add Logo 2016-11-09 15:13:18 -08:00

README.md

Embeddinator-4000 Logo

windows-vs-x86 linux-gcc-x86_64 osx-clang-x86
windows-vs-x86 linux-gcc-x86_64 osx-clang-x86

Embeddinator-4000 is a tool to turn existing .NET libraries into libraries that can be consumed by other languages.

It is a tool that takes a .NET assembly and generates the necessary glue to surface the .NET API as a native API. The goal is to surface .NET libraries to all ecosystems where Mono/Xamarin run, and for each platform we provide an interface that is native to that platform as well as the tools needed to turn a .NET library into something that can be consumed on that platform.

This is a work in progress, the initial goals for this project are to surface .NET to C, C++, Objective-C (across the various Apple platforms) and Java (Android and regular Java).

The project is still under heavy development. Usage under mission-critical production scenarios is not advised. Please report any bugs or suggestions so we can improve the tool.

Building

Clone this repository and initialize/update submodules as well as solution depends on them.

Open the solution in build/MonoEmbeddinator4000.sln with Visual Studio or Xamarin Studio and press F7.

Usage

To generate bindings for a managed library you invoke the MonoEmbeddinator4000.exe command line tool.

If you do not pass any arguments, you will get a list of the tool options:

MonoEmbeddinator4000.exe [options]+ ManagedAssembly.dll
Generates target language bindings for interop with managed code.

      --gen=VALUE            target language: c, c++, obj-c (defaults to c)
      --platform=VALUE       target platform: android, windows, macos, ios, watchos, tvos
  -o, --out=VALUE            output directory
  -c, --compile              compiles the generated output
      --dll, --shared        compiles as a shared library / DLL
      --vs=VALUE             Visual Studio version for compilation: 2012, 2013, 2015, Latest (defaults to Latest)
  -v, --verbose              generates diagnostic verbose output
  -h, --help                 show this message and exit

To generate C bindings for a Xamarin.Foo.dll assembly you would call the tool like:

MonoEmbeddinator4000.exe -gen=c -out=foo Xamarin.Foo.dll