Giter VIP home page Giter VIP logo

binding-tools-for-swift's Introduction

Xamarin Binding Tools For Swift

Welcome!

This module is the main repository for Binding Tools for Swift.

This is a set of tools that can consume a compiled Apple Swift library and generates wrappers that allow it to be surfaced as a .NET library.

Quickstart

Check out our quickstart guide to build and run the tool locally.

The packaging of BTFS is still evolving, and we expect to provide a binding project style interface to make this process easier in the future.

Caution ❗

In order to contribute to Binding-Tools-For-Swift, you will need Xcode 10.2 !

Current Status

What Binds?

  • Classes
  • Structs
  • Enums
  • Protocols without associated types
  • Top-level functions and variables
  • Generic classes, structs, and enums
  • Escaping closures
  • Support of @ObjC types
  • Protocol composition types in non-virtual methods
  • Exceptions
  • Extensions

What Doesn’t Bind Yet?

  • Protocols with associated types
  • Bound generic types with closures
  • Non-escaping closures

What Else Can I Expect?

  • An open class in Swift can be subclassed in C# and the subclass can be passed in to Swift. Overridden virtual methods in C# will be called when invoked from Swift.
  • A C# type implementing an interface bound to a Swift protocol can be passed in to Swift. Methods and properties in the C# interface implementation will be called when invoked from Swift.
  • At runtime, the generated code honors the Swift Automatic Reference Counting as well as .NET garbage collection.
  • When writing bindings, the code generator tries hard to generate something. If an API uses a type that’s not supported yet, that API will be flagged and skipped.

Technical Documentation

The docs directory contains a detailed walkthrough of how things work under the hood.

In particular the functional outline is a great place to start exploring.

Feedback

  • Discuss development and design on Gitter

Gitter

License

Copyright (c) .NET Foundation Contributors. All rights reserved. Licensed under the MIT License.

binding-tools-for-swift's People

Contributors

a-churchill avatar chamons avatar jingliancui avatar mandel-macaque avatar rolfbjarne avatar stephen-hawley avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.