Cairo Modules and Scope
Overview
Guide module declarations, nesting, and visibility rules in Cairo.
Quick Use
- •Read
references/modules-scope.mdbefore answering. - •Show where
modmust appear and what file it refers to. - •Emphasize that items are private by default and require
pubto expose.
Response Checklist
- •Declare modules with
mod name;or inlinemod name { ... }. - •Use
pubto make modules or items public. - •Use
superorcrateto refer to parent or crate root.
Example Requests
- •"Why can't another module access my function?"
- •"Where should I put
mod hosting;?" - •"How do I make a module public?"