Deltachat is opensource for every platform it supports:
https://github.com/deltachat
It also includes a core library in C: https://github.com/deltachat/deltachat-core
The spec is documented here: https://github.com/deltachat/spec/blob/master/spec.md
EDIT: looks like delta.chat is open source https://github.com/deltachat/deltachat-desktop