Skip to main content

single_entry_module

Function single_entry_module 

Source
pub fn single_entry_module(root: &Path) -> Result<String, ToolchainError>
Expand description

Derives the single entry module declared by <root>/workflow.toml.

Submitting source is only meaningful for a single-workflow project: the submitted Gleam is written to that one entry module’s source file. A project declaring zero or many workflows is rejected rather than guessed.

§Errors

Returns ToolchainError::Io when the descriptor cannot be read, ToolchainError::InvalidProject when it cannot be parsed or does not declare exactly one workflow.