Tools to turn .NET libraries into native libraries that can be consumed on Android, iOS, Mac, Linux and other platforms.
Перейти к файлу
Joao Matos 63c5c04fa1 [build] Added shell script to compile the project. 2017-04-28 18:52:42 +01:00
binder [gen] Fixed generation of sources to contain Embeddinator tool name. 2017-04-28 01:41:22 +01:00
build [build] Added shell script to compile the project. 2017-04-28 18:52:42 +01:00
docs [docs] Update ObjC documentation so it's visible from GitHub Pages (#213) 2017-04-28 13:37:37 -04:00
external Link 2017-04-28 10:29:34 -04:00
objcgen [objc] Add basic (readonly) support for fields (#129) 2017-04-17 10:03:46 -04:00
support [java] Stub out GString marshaling. 2017-04-27 20:42:19 +01:00
tests [tests][java] Added Java tests for managed constructors. 2017-04-20 15:33:11 +01:00
.gitignore [git] Updated Git ignore patterns to ignore Java build artifacts. 2017-04-10 19:57:44 +01:00
.gitmodules Change Xamarin.Android.Tools sub-module to use HTTPS Git URL. 2017-01-25 13:46:12 +00:00
.travis.yml Remove Linux configuration from CI since we're not supporting it yet. 2017-04-01 23:14:42 +01:00
LICENSE Pushed initial work-in-progress code for managed-to-native bindings generator. 2016-07-25 16:34:57 +01:00
README.md Update the output showcase to the latest one 2017-04-22 16:02:47 +02:00
e4000-logo.png Add Logo 2016-11-09 15:13:18 -08:00
generator.sln [objc] Add memory leak tests, and fix a few issues those found. (#65) 2017-04-06 15:50:43 +02:00

README.md

Embeddinator-4000 Logo

windows-vs-x86 osx-clang-x86
windows-vs-x86 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.

Community

Feel free to join us at our #managed-interop Gitter discussion channel.

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.

Important: please follow the instructions in objcgen's README to use the new and improved Objective-C generator (will eventually fusion with MonoEmbeddinator4000.exe.

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 generator (C, C++, Obj-C, Java)
  -p, --platform=VALUE       target platform (iOS, macOS, Android, Windows)
  -o, --out, --outdir=VALUE  output directory
  -c, --compile              compiles the generated output
  -d, --debug                enables debug mode for generated native and
                               managed code
  -t, --target=VALUE         compilation target (static, shared, app)
      --dll, --shared        compiles as a shared library
      --static               compiles as a static library
      --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