Plutus Tx: Compiling Haskell Into Plutus Core
Get to the heart of writing smart contract applications on Cardano
Last updated
Get to the heart of writing smart contract applications on Cardano
Last updated
Last week saw the release of the refreshed version of the Plutus Playground. This is our showcase for the Plutus Platform, at the heart of which is the ability to write smart contract applications in a single, high-level language: Haskell.
Our toolchain allows a single Haskell program to produce not only an executable file that users can run on their own computers, but also the code that runs on the Cardano blockchain. This gives users a battle-tested, high-quality programming language, and makes use of standard tooling and library support. Nobody wants to learn a proprietary programming language and half-baked tools if they donβt have to!
The technology that powers this is called Plutus Tx, and is, in essence, a compiler from Haskell to Plutus Core β the language that runs on the chain β provided as a GHC plug-in. In this post weβll dive into how this works, and some of the technical challenges.
Contents:
Boiling Down Haskell
Down the Tube
Sneaking Into GHC
The Switcheroo
Finding the Source
Run Time Matters Too
Getting Out of the Way
Postscript: Show me the Money!
Source: https://iohk.io/en/blog/posts/2021/02/02/plutus-tx-compiling-haskell-into-plutus-core/