IMPORTANT: The Bazel docs have moved! Please update your bookmark to

You can read about the migration, and let us know what you think.

Extensions > API reference > root


A root for files. The roots are the directories containing files, and they are mapped together into a single directory tree to form the execution environment.



string root.path

Returns the relative path from the exec root to the actual root.