Skip to main content

Visibility

By default, all declarations are private to the file they are defined in. That means they cannot be accessed in any other file in your project. The pub keyword makes something public, which means it can be accessed in every file in the entire project.

// file1.easel
fn PrivateFunction() { }
pub fn PublicFunction() { }

// file2.easel
fn Example() {
PrivateFunction() // Compilation error: PrivateFunction is not defined
PublicFunction() // This is fine
}