tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6.1k stars 525 forks source link

Investigate options for implementing SDK #6427

Closed charlag closed 9 months ago

charlag commented 9 months ago

Mobile integrations will require us to interact with API from the native code. We would like to have an SDK that can be used from all apps, from both web and native contexts.

Requirements:

Some options:

charlag commented 9 months ago

It seems like JS is out because JsEngine does not allow injecting callbacks and running node directly seems to be infinite pain.

It seems like Dart is out because it can generate Dart bindings from other languages but doesn't seem to be consumable from other languages.

charlag commented 9 months ago

Rust would be possible in native with uniffi. It should work in web with wasm_bindgen.

charlag commented 9 months ago

Kotlin/WASM does not work on Safari currently and d.ts output is experimental

charlag commented 9 months ago

We did a writeup with results here: https://github.com/tutao/tutanota/pull/6453#issuecomment-1935704047