IntersectMBO / plutus

The Plutus language implementation and tools
Apache License 2.0
1.57k stars 479 forks source link

Move the builtins to a common component #6102

Open ana-pantilie opened 5 months ago

ana-pantilie commented 5 months ago

UPLC depends on the builtins, so they should be in the common component.

ana-pantilie commented 5 months ago

Also another, older, issue discussing this:

Especially if we move towards really having multiple sets of builtins, our current setup feels a little lacking:

We have one set of builtins we call “default”

The implementation bits are spread out all over the place

I suggest that we do something like this:

Have a PlutusCore.Cardano module (hierarchy)

Put all the stuff for the current Cardano builtins in there

Aim to have it be self-contained, so in principle it could be moved to a separate package (if we wanted to make the distinction between plutus core and the instantiation of it on Cardano very clear, which we probably don’t care about right now)

As a Plutus Core developer I want to be able to easily understand how our builtins are organized and which versions are used where, so that I can more easily understand the codebase.