Tools to turn .NET libraries into native libraries that can be consumed on Android, iOS, Mac, Linux and other platforms.
C# Objective-C C Java C++ Shell Other
Switch branches/tags
Nothing to show
Clone or download
jonathanpeppers [windows] .gitattributes for proper line endings settings (#667)
Context: https://help.github.com/articles/dealing-with-line-endings/

If you work on this repo on Windows, you quickly see the `.gitattributes` are not setup right for development on Windows.

1. Certain files had mixed line endings, which causes Visual Studio to prompt to adjust.

2. Running `premake` yields Windows line endings on Windows, and so every `*.csproj` file appears to have changes.

`xamarin-android` has a well-used `.gitattributes` file, so I used it as a starting point and added an entry for `*.cake` files.

The way it works (as I understand it):
- `git` stores everything with unix line endings
- on checkout, clients convert the line endings according to settings in the `.gitattributes` file

So, for example:
- All `*.csproj` files will have Windows line endings, as Visual Studio expects (both Mac and Windows)
- `*.cs` files will have Windows line endings on Windows, and unix line endings on Mac
Latest commit d697cdf May 4, 2018
Permalink
Failed to load latest commit information.
.cake Update to Cake 0.23.0. Oct 18, 2017
binder [windows] .gitattributes for proper line endings settings (#667) May 4, 2018
build [windows] .gitattributes for proper line endings settings (#667) May 4, 2018
docs Remove release notes which will move to official site (#652) May 1, 2018
external Bump to xamarin-android-tools/938b4f4 (#648) Apr 10, 2018
objcgen Restored: missing code for extension support on Mac + bitcode for iOS… ( Apr 24, 2018
samples [objc] Add `--nowarn:` and `--warnaserror:` options to the driver (#339) May 12, 2017
support Native exception handling (#629) Mar 23, 2018
tests [windows] .gitattributes for proper line endings settings (#667) May 4, 2018
tools/diff Add technical documents and improve readme (#646) Apr 10, 2018
.gitattributes [windows] .gitattributes for proper line endings settings (#667) May 4, 2018
.gitignore [build] remove anything related to AppVeyor (#666) May 1, 2018
.gitmodules Bump Xamarin.Android.Tools Jun 29, 2017
.travis.yml [ci] Use OpenJDK 8 from Travis. Sep 6, 2017
CODEOWNERS CODEOWNERS for all *.cake files (#639) Mar 27, 2018
Contributing.md Add technical documents and improve readme (#646) Apr 10, 2018
Embeddinator-4000.nuspec [nuget] Added Nuget package spec. Jul 31, 2017
Embeddinator-4000.sln [objc] Fix issue blocking all F# libraries (#632) Mar 27, 2018
ISSUE_TEMPLATE.md Add issue template (#623) Mar 19, 2018
LICENSE Pushed initial work-in-progress code for managed-to-native bindings g… Jul 25, 2016
ProjectStructure.md Add technical documents and improve readme (#646) Apr 10, 2018
README.md [build] remove anything related to AppVeyor (#666) May 1, 2018
Usage.md Add technical documents and improve readme (#646) Apr 10, 2018
build.cake [build] remove anything related to AppVeyor (#666) May 1, 2018
build.ps1 [cake] Do NOT remove our custom NuGet config file... Sep 8, 2017
build.sh [cake] Use a custom NuGet config. Sep 8, 2017
e4000-logo.png Logo - Fixed kerning between A and T Nov 29, 2017

README.md

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
  • Initialize/update submodules: git submodule update --recursive --init
  • Open the solution file Embeddinator-4000.sln with Visual Studio or Visual Studio For Mac
  • Build

If you prefer to build from the command line Cake or Make can be used to build instead of Visual Studio For Mac.

Cake

The Android/C portions of the project can also be built with Cake using the build.ps1 / build.sh scripts.

On OS X, you can setup your environment for Android by running a shell script:

./build.sh -t Generate-Android -v diagnostic

On Windows, in Powershell:

.\build.ps1 -t Generate-Android -v diagnostic

This will download a master build of Xamarin.Android and extract it into /external/Xamarin.Android.

Embeddinator-4000.exe will be compiled to build/lib/Release. The Cake script will also run Embeddinator against a test assembly, so you can be sure your system is setup properly.

Makefile

The Objective-C portions of the project can be built with make in objcgen.

Nuget Generation

To generate the nuget one can use either (they both invoke the same build process):

  • make nuget in objcgen
  • Cake :./build.sh -t Create-Package

Usage

The getting started documentation walks through basic usage of the Embeddinator.

More details on platform specific invocations can be found here.

Development

The contributing guide covers a number of areas to consider when contributing to Embeddinator-4000.

A number of internal documentation files exist describing the project and internal structure of Embeddinator: