Rellum Rellum

S0001: program must define exactly one main!

Generated from rellum-diagnostics/src/db.rs.

Explanation

A Rellum executable needs one reactive entry point so the runtime knows which effect graph to run. With no main! binding there is no program entry point; with multiple main! bindings the compiler cannot choose which one owns the program lifecycle.

Common causes

Canonical fixes

Before:

value = 42

After:

value = 42
main! = print!(value)

Before:

main! = print!("ready")
main! = write!("build/log.txt", "ready")

After:

main! = print!("ready") -> write!("build/log.txt", "ready")

Code example

value = 42