What / Where is Prim?

I see lots of import Prim "mo:prim"; around. However, I haven’t found a way to explore the source of capabilities. Is there a way to do this, I’m curious at peeking inside.

1 Like

Apparently it’s an OCaml file that hasn’t been open sourced yet.

https://forum.dfinity.org/t/bug-in-stdlib-array-mo/522/4?u=cryptoschindler

3 Likes

Dang! Thanks @cryptoschindler!

1 Like

Don’t use Prim in your code. Use base instead, as it reexports/wraps all functionality from Prim. Prim is a compiler internal interface that won’t offer any stability guarantees. (It might even go away at some point)

3 Likes