With no output_dir set, the rust generator writes to <project>/../baml_sdk — a sibling of the project root, outside the project directory entirely.
For a repo-rooted BAML project (baml.toml at the repo root, baml_src/ beside it) that means baml generate creates a directory in the repo's parent — outside version control, outside the container build context, and in a shared checkout, potentially beside somebody else's project.
output_dir = "crates" works fine and is what we use, so this is a default-value report rather than a blocker.
Suggestion
Default to a path inside the project (e.g. ./baml_sdk). A generator writing outside its own project on the default path is surprising in a way that is easy to not notice: it succeeds, and the artifact is simply somewhere unexpected.
With no
output_dirset, the rust generator writes to<project>/../baml_sdk— a sibling of the project root, outside the project directory entirely.For a repo-rooted BAML project (
baml.tomlat the repo root,baml_src/beside it) that meansbaml generatecreates a directory in the repo's parent — outside version control, outside the container build context, and in a shared checkout, potentially beside somebody else's project.output_dir = "crates"works fine and is what we use, so this is a default-value report rather than a blocker.Suggestion
Default to a path inside the project (e.g.
./baml_sdk). A generator writing outside its own project on the default path is surprising in a way that is easy to not notice: it succeeds, and the artifact is simply somewhere unexpected.