leo/stdlib
2022-01-27 12:57:52 -08:00
..
prelude prelude stuff auto included 2021-09-10 05:55:07 -07:00
src added new errors 2021-09-10 06:42:01 -07:00
unstable prelude stuff auto included 2021-09-10 05:55:07 -07:00
Cargo.toml reorder dependencies 2022-01-27 12:57:52 -08:00
LICENSE.md prelude stuff auto included 2021-09-10 05:55:07 -07:00
README.md deprecate blake2s 2022-01-25 13:31:02 -08:00

leo-stdlib

Crates.io Authors License

This directory includes the standard library for Leo.

Usage

The src directory is the Rust code that makes the Leo folders and files statically built into the compiler. So any added Leo folders and files under the stdlib directory will be automatically included at compile time.

See the Structure section for more info.

Structure

The structure for this repository is a bit special.

One important thing to note is the prelude directory. Any Leo files defined in this directory will have all importable objects automatically imported to every Leo program. For example, the following program is valid without any imports:

function main() {
  let s: string = "Hello, string type alias!";
}

The above type alias is auto imported from stdlib/prelude/string.leo.

The other directories must have explicit imports.