I see your points and it is definitely much simpler to just contain a Compiler struct within compile.
pub fn compile(source: &str) -> Result<Chunk, String> {
let mut chunk = Chunk::new();
let mut compiler = Compiler::new(&mut chunk, source);
compiler.consume()?;
Ok(chunk)
}