unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.73k stars 266 forks source link

All builtins needed for first release of Unison Cloud JIT #3742

Open pchiusano opened 1 year ago

pchiusano commented 1 year ago

Ultimately we want to have the JIT support the full language, but for a first milestone, we're trying to get it to compile all the things needed for Unison Cloud so we can run the JIT on all the cloud nodes. The cloud nodes don't allow arbitrary I/O so there's some builtins (particularly STM) that we can get away with not implementing for now.

Once we do a first release, we'll go back and implement STM and probably will do our own threading and async I/O implementations.

Here's primops that have not yet been implemented:

Note, things like Nat.+ are wrappers around primop instructions. The wrapper code gets compiled to scheme just like any other unison (intermediate) function, so the primops are what need to be implemented (unless the builtin corresponding to a primop is being replaced completely, but that is a separate mechanism).

I might come back and annotate these with their meanings later, and possibly delete some as irrelevant.

Must have

Needs research

Not needed for now:

ceedubs commented 1 year ago

Link.Term.toText is another primop that this list seems to be missing.

dolio commented 10 months ago

Everything on the necessary list is now checked off.

aryairani commented 4 months ago
  • [x] HashAlgorithm.Blake2b_256 : HashAlgorithm
  • [x] HashAlgorithm.Blake2b_512 : HashAlgorithm
  • [x] HashAlgorithm.Blake2s_256 : HashAlgorithm

Question: Why do we need HashAlgorithm.Blake2b_256 if we have the other two?