Cairo Packages and Crates
Overview
Explain how Scarb organizes Cairo packages and crates and where crate roots live.
Quick Use
- •Read
references/packages-crates.mdbefore answering. - •Call out the default
src/lib.cairocrate root. - •Mention that a package can contain multiple crates defined in Scarb.toml.
Response Checklist
- •Distinguish package (project) from crate (compilation unit).
- •Point to
Scarb.tomlas the package manifest. - •Identify the crate root file used by the compiler.
Example Requests
- •"What is the difference between a package and a crate in Cairo?"
- •"Where is the crate root for a new Scarb project?"
- •"How do I add another crate to a package?"