A demo project that showcase how to use C++ to conquer the universe, with the help of Djinni and WebAssembly :)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
android_project
cpp_project
djinni
ios_project
src/cpp
.gitignore
LICENSE
README.md
run_djinni.sh

README.md

CppUniverse

A demo project that showcase how to use C++ to conquer the universe, with the help of Djinni and WebAssembly :)

This demo implement exactly the same feature as JavaUniverse, but write the main logic in C++.

Dependencies

Due to GitHub file size limit, the libs directory is ignored, you can download it here, and extract it as libs.

CPP Project

  • ./run_djinni.sh
  • cd cpp_project
  • xcake make
  • open CppUniverse.xcodeproj

Android Project

  • ./run_djinni.sh
  • Just open the android_project folder in Android Studio.

iOS Project

  • ./run_djinni.sh
  • cd ios_project
  • xcake make
  • open CppUniverse.xcodeproj

Web Project

WIP...

Caveat

  • Add -DCMAKE_INSTALL_PREFIX=`pwd`/out to cmake command to specify install dir;
  • 'cpprest/http_client.h' file not found with <angled> include; use "quotes" instead problem solution;
  • Arithmetic on a pointer to an incomplete type 'cpp_universe::Window': add #include "window.hpp" to get the complete type info of cpp_universe::Window;
  • Extend djinni record to add utility method which is only used by one language;
  • Djinni record is immutable;
  • Building for Android:
    • openssl need use r15c;
    • boost 1.65.1 need r16;
    • can't use nfs shared folder;
    • find boost error;
    • 'BOOST_STDLIB' macro redefined;
    • no matching member function for call to 'expires_from_now';
  • Building for iOS:
    • find_package(Threads REQUIRED) fail, solution;

All changes on C++ REST SDK can be found there.