Standard library code

If you want a nose around the standard library imports, you can currently find them in this directory after installing the canister sdk and running dfx build on a project:
~/.cache/dfinity/versions/<version_no>/stdlib

Standard Library Documentation:
https://sdk.dfinity.org/language-guide/index.html#appendix-stdlib

Download and install the DFINITY Canister SDK:
https://sdk.dfinity.org/developers-guide/quickstart.html

9 Likes

Very sneaky! Thanks Ori. Beyond helping us learn the APIs, these should come in handy as code samples.

2 Likes

welcome nick, great to have you here :slight_smile:

You can now also populate this directory by running ‘dfx cache install’ after installing or upgrading the sdk.

1 Like

You can find details on how to import from the standard library here:
https://sdk.dfinity.org/language-guide/index.html#intro-stdlib

And a tutorial including this:
https://sdk.dfinity.org/developers-guide/tutorials/phonebook.html

1 Like