Expand description
Utility items shared between forc crates.
Re-exports§
pub use ansiterm;
pub use paste;
pub use serial_test;
Modules§
- bytecode
- cli
- fs_
locking - restricted
- Helpers for validating and checking names like package and organization names.
- tx_
utils
Macros§
Structs§
- Forc
CliResult - A wrapper around
ForcResult
. Designed to be returned from entry points as it handles error reporting and exits with correct exit code. - Forc
Error - A forc error type which is a wrapper around
anyhow::Error
. It enables propagation of custom exit code alongisde the original error. - Regex
- A compiled regular expression for searching Unicode haystacks.
Constants§
Functions§
- create_
diagnostics_ renderer - Creates Renderer for printing warnings and errors.
- default_
output_ directory - find_
file_ name - format_
diagnostic - git_
checkouts_ directory - The location at which
forc
will checkout git repositories. - kebab_
to_ snake_ case - Simple function to convert kebab-case to snake_case.
- lock_
path - path_
lock - Create an advisory lock over the given path.
- print_
compiling - print_
on_ failure - print_
warnings - program_
type_ str - user_
forc_ directory - Returns the user’s
.forc
directory,$HOME/.forc
by default. - validate_
name - validate_
project_ name
Type Aliases§
- Forc
Result - A result type for forc operations. This shouldn’t be returned from entry points, instead return
ForcCliResult
to exit with correct exit code.