Coder Social home page Coder Social logo

any-platform-lib's Introduction

Djinni Library

GitHub release (latest by date) GitHub

A template for a Djinni library that can be used in Java/Kotlin on Android, ObjC/Swift on iOS/macOS and C# on Windows.

Features

  • ๐Ÿงžโ€โ™‚๏ธ Develop your library once in C++, use it in Code written in Java, C++/CLI (.NET 6) or Swift thanks to Djinni.
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ Can build & bundle binaries for
    • macOS, iOS (XCFramework)
    • Android (AAR)
    • Windows .NET 6.0 (NuGet)
    • Linux
  • ๐ŸŽฃ Dependency Management with Conan
  • ๐Ÿงถ Easy to use CLI to configure build output for different platforms
  • ๐Ÿ“‘ Building Doxygen docs for all target languages

How to use this template

  • Create a new repository using this template. Check it out on your local machine.
  • Create a VERSION file specifying a temporary version for local development. The build process relies on the existence of either a VERSION-file (e.g. 0.0.1), or a Git release tag (e.g. v0.0.1) for determining the library version.
  • Make sure you understand how to use it in your project & how to build & run for development before you change something.
  • Search for all occurrences of "MyDjinniLibrary", "DjinniLibrary", "My" in the project to replace all occurrences of the template target and/or namespaces. You can ignore anything inside lib/djinni-generated, as it will be updated by Djinni automatically.

Installation

This template integrates into each build system by providing a package format native to each platform.

Android (Android Library)

  1. Add the repository to your project
    repositories {
        maven {
            url "https://maven.pkg.github.com/jothepro/djinni-library-template"
        }
    }
  2. Add the package dependencies to your applications build.gradle file:
    dependencies {
        implementation 'my.djinnilibrary:mydjinnilibrary'
    }

Visual Studio 17 2022 (NuGet Package)

The NuGet package only works for .NET 6 (Core) Projects!

  1. Add the Package Source.
    https://nuget.pkg.github.com/jothepro/index.json
    
  2. In the NuGet Package Manager search for MyDjinniLibrary and install the package.

XCode (Swift Package)

  1. Add the repository jothepro/djinni-library-template-swiftpackage as Package dependency to your XCode project. It contains the XCFramework with the Objective-C binaries.
  2. Add this import to the swift code:
     import MyDjinniLibrary

Linux (Conan Recipe)

This template is meant to be used in a C++ project on Linux, e.g. together with gtkmm-3.0. The binary for Linux consists of just the C++ interface without any wrapper.

  1. Add the conan remote.
    conan remote add djinni_library_template https://gitlab.com/api/v4/projects/27897297/packages/conan
  2. Add the library as dependency in your conanfile.
    [requires]
    my_djinni_library/1.0.0@jothepro/release

Read Next: Development

any-platform-lib's People

Contributors

andr-ggn avatar

Watchers

 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.