The Package Manager
Fe includes built-in package management through the fe command-line tool. This handles project creation, building, and dependency resolution.
Core Commands
Section titled “Core Commands”Building Projects
Section titled “Building Projects”Compile your Fe project:
fe buildThis compiles all source files in src/ and resolves dependencies defined in fe.toml.
Checking Code
Section titled “Checking Code”Verify your code compiles without producing output:
fe checkUseful for quick validation during development.
Dependency Resolution
Section titled “Dependency Resolution”When you build a project, the Fe compiler:
- Reads
fe.tomlto find dependencies - Resolves local path dependencies from the filesystem
- Fetches git dependencies from remote repositories
- Compiles dependencies before your project
- Makes dependency exports available for import
Workflow
Section titled “Workflow”A typical development workflow:
- Create project structure with
fe.tomlandsrc/lib.fe - Add dependencies to
fe.tomlas needed - Write code in
src/directory - Build with
fe buildto compile and check for errors - Iterate on your code
Build Output
Section titled “Build Output”When you run fe build, the compiler produces:
- Compiled contract artifacts
- ABI definitions for contract interfaces
- Yul intermediate representation (optional)
Output location and format depend on your build configuration.
Error Messages
Section titled “Error Messages”The Fe compiler provides helpful error messages:
error: Cannot find value `undefined_var` in this scope --> src/lib.fe:10:5 |10 | undefined_var | ^^^^^^^^^^^^^ not found in this scopeUse these messages to locate and fix issues in your code.
Next Steps
Section titled “Next Steps”See Dependencies to learn how to add external ingots to your project.