v3.2.0
๐ฆ Leo 3.2.0 Release Notes
๐ฆ Modules
Leo 3.2.0 introduces a module system.
Example: Defining a Module
Given a file other_module.leo containing struct, const, and inline definitions:
const X: u32 = 2u32;
struct S {
a: field
}
inline increment(x: field) -> field {
return 1field;
}
You may refer to contents of the module as:
other_module::Xother_module::Sother_module::increment
๐ Example Directory Structure
src
โโโ common.leo
โโโ main.leo
โโโ outer.leo
โโโ outer
โโโ inner.leo
๐ฆ Module Access Paths
Given the structure above, the following modules are defined:
-
common.leoโ defines modulecommonAccessible frommain.leovia:common::<item>