Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
/ Either Public archive

Proof of concept for implementing an Either type for Djinni

Notifications You must be signed in to change notification settings

Wattpad/Either

Repository files navigation

Either and Djinni

This is a proof of concept demonstrating the use of an Either type in cross-platform code for Android and iOS using Djinni.

Requirements

To build for Android and iOS, the following are recommended:

Generating Sources from Djinni

Before you can build the Android and iOS projects, you need to run git submodule init and git submodule update in the root directory, then run make all in the Either directory.

If you don't want to download all of Boost pre-compiled for iOS, you can just grab the subdirectory ofxiOSBoost/libs/boost/include/boost/optional for the ofxiOSBoost submodule.

Configuring the Android Project

Before you can build the Android project, you will need to add ndk.dir to your local.properties file. Here is mine exactly as it appears, for reference:

## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/Users/tony/Library/Android/sdk
ndk.dir=/Users/tony/Library/Android/ndk

What to Expect

The Android and iOS apps don't do anything visible, but you can set a breakpoint in MainActivity.onCreate (Android) and ViewController -viewDidLoad (iOS) to see the result of calling into a common C++ component using Djinni and getting back an Either result type.

About

Proof of concept for implementing an Either type for Djinni

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published