Extensions 1.0
Language: JavaScript
Runtime: JavaScript interpreter in Go (GitHub - robertkrimen/otto: A JavaScript interpreter in Go (golang))
What was good:
- Programming language support (JS)
What was bad:
- No extension code validation
- Bad UI interface in extension’s code
- Interpreter didn’t support all EcmaScript specification
- Because of the bridge between App and extensions, UI was laggy
Extensions 2.0
Language: Clojure like Markup language
Runtime: Pluto engine (GitHub - status-im/pluto)
What was good:
- Extension is run in the app (no bridge)
- Extension’s code validation
- Hooks
- Queries
- Events
- Extensions db
What was bad:
- No programming language
What was wrong in both versions, we were trying to develop extensions engine without understanding what developers of extensions really need. Our focus was on command cli, but it’s too complex, and most devs didn’t understand how it works and development of extensions was complex
Proposal for Extensions 3.0
Language: Clojure
Runtime: Status app
Because clojure code is data , we can validate it easily, we could use clojure spec (Clojure - clojure.spec - Rationale and Overview) to validate extensions written in clojure
Also clojurescript can compile itself, that means we could run validated extensions’s code right in the app
And instead of cli we could give developers a blank screen and they could do whatever they want without complex rules etc, like dapp in browser but native in status app
MVP could be done in 1m / 1dev