input-output-hk / Developer-Experience-working-group

23 stars 15 forks source link

Plutus Multi-language support #21

Open Benjmhart opened 1 year ago

Benjmhart commented 1 year ago

Plutus was originally released with PlutusTx as the default Haskell API for building plutus onchain scripts. other tools have quickly emerged for writing plutus without Haskell, either as a standalone language, or as an embedded DSL in mainstream programming languages. Additionally, other tools have arisen for building transactions offchain in multiple languages. A problem that then arises from this plethora of choice is sharing types and interfaces across languages for convenience, and in the case of Haskell alternatives, there has been compiler compatibility issues that can make certain alternatives harder to use.

Smart Contract Languages (Onchain Scripts)

Transaction Builder Toolkits (Offchain Code)

** known to be used in production, or have large plutus projects actively adopted for production purposes

Cardano has a flourishing polyglot suite of tools, however there are going to be a number of gaps when attempting to compose these individual tools into a full-fledged application:

Benjmhart commented 1 year ago

Another key item is that all alternative languages utilize Untyped Plutus Core (UPLC) as the compilation target, so a strong suggestion to toolmakers is to allow for pluggable sourcemaps to better support alternative languages.

hajola commented 1 year ago

For the transaction builder list , I would add

zliu41 commented 1 year ago

I find it interesting that few of these languages, if any, target PIR.

Benjmhart commented 1 year ago

@zliu41 as far as I know Plutarch is the only one that targets PIR - and mainly at auditor request.

Benjmhart commented 1 year ago

Note: this issue doesn't really have 'next steps' per se, however, it is intended as a resource for anyone looking for cardano support in their language, and for IOG to see that we're already in a flourishing multi-language environment.