mono/Embeddinator-4000


Tools to turn .NET libraries into native libraries that can be consumed on Android, iOS, Mac, Linux and other platforms.

License: MIT

Language: C#

Keywords: android, bindings, c, c-plus-plus, cplusplus, cppsharp, csharp, dotnet, interop, java, mobile, mono, monodroid, monotouch, objective-c, xamarin


Embeddinator-4000 Logo

Windows macOS
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.

Presently there is support for .NET to C, Objective-C (across the various Apple platforms) and Java (Android and regular Java), across Windows, Linux and macOS platforms.

Getting Started

Check out our documentation to get started

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 file Embeddinator-4000.sln with Visual Studio or Xamarin Studio and press F7.

Usage

To generate bindings for a managed library you invoke the Embeddinator-4000.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 Embeddinator-4000.exe.

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

Embeddinator-4000.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, 2017, 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:

Embeddinator-4000.exe -gen=c -out=foo Xamarin.Foo.dll

Project Statistics

Sourcerank 8
Repository Size 8.37 MB
Stars 620
Forks 75
Watchers 85
Open issues 110
Dependencies 36
Contributors 20
Tags 1
Created
Last updated
Last pushed

Top Contributors See all

João Matos Jonathan Peppers Sebastien Pouliot Rolf Bjarne Kvinge Chris Hamons Victor Peter Rouven Müller Alex Soto Vincent Dondain Miguel de Icaza Timothy Risi Miha Markič Atsushi Eno Jon Galloway Peter Tribe William Kent Zachary Gramana Lukas Rieger Ivan Cronyn Alex Lockhart postromantic

Packages Referencing this Repo

Embeddinator-4000
Embeddinator-4000 is a tool to turn existing .NET libraries into libraries that can be consumed b...
Latest release 0.3.0 - Updated - 620 stars

Recent Tags See all

v0.2.0.79 June 12, 2017

Interesting Forks See all

jonathanpeppers/Embeddinator-4000
Tools to turn .NET libraries into native libraries that can be consumed on Android, iOS, Mac, Lin...
C# - MIT - Last pushed - 2 stars

Something wrong with this page? Make a suggestion

Last synced: 2018-01-17 05:29:43 UTC

Login to resync this repository