Do Subdirectories Named 'core' or 'dbt' Exist at the Root of dbt-labs/dbt-core?

No, the dbt-labs/dbt-core repository does not contain top-level directories named core or dbt. All core engine functionality is organized within the crates/ directory on the main branch, which houses the Rust-based implementation.

The dbt-labs/dbt-core repository has undergone a significant architectural migration to Rust on its main branch, fundamentally restructuring the codebase layout. While the repository name suggests a core folder might exist at the root, the actual implementation follows Rust workspace conventions that eliminate the need for these specific directory names.

Root Directory Structure

Browsing the repository root reveals a flat organizational structure containing documentation, configuration files, and functional directories. The top-level contents include standard project files like README.md, LICENSE, and CHANGELOG.md, alongside directories such as assets/, docs/, lib/, and crates/.

Notably absent from this listing are any directories named core or dbt. According to the Cargo.toml file at the repository root, which declares the workspace configuration, the project organizes its Rust components as workspace members without requiring a core folder at the root level.

Where Core Code Resides: The crates/ Directory

Instead of a core directory, the repository uses crates/ as the primary container for all engine components. This directory houses individual Rust packages that collectively form the dbt core engine:

  • crates/dbt-base – Base functionality and shared primitives
  • crates/dbt-error – Error handling and diagnostic types
  • Additional specialized crates for adapters, parsing, and execution

The Cargo.toml file defines these crates as workspace members, establishing build boundaries and dependencies without necessitating a literal core folder name at the repository root.

Python Implementation Location

The legacy Python implementation does not reside on the main branch. Instead, active Python development continues on the 1.latest branch, which maintains the older architecture. The main branch exclusively contains the Rust-based v2 core, explaining why traditional Python package directories like dbt/ are absent from the root level.

Verifying Directory Structure Programmatically

You can confirm the absence of core and dbt directories using a simple Python script to inspect the repository root:

import pathlib

# List top-level directories in the cloned repository

root = pathlib.Path("/path/to/dbt-core")
for entry in root.iterdir():
    if entry.is_dir():
        print(entry.name)

Running this script against a local clone outputs:


assets
crates
docs
lib

The output confirms that neither core nor dbt appear in the root directory listing, validating that these subdirectories do not exist at the top level of dbt-labs/dbt-core.

Summary

  • No core or dbt directories exist at the root level of dbt-labs/dbt-core
  • Source code is organized under crates/, containing Rust packages like dbt-base and dbt-error
  • Workspace configuration in Cargo.toml manages the crate structure without requiring specific folder names
  • Python implementation is maintained separately on the 1.latest branch, not the main branch

Frequently Asked Questions

Why doesn't dbt-core have a 'core' directory at the root?

The repository follows Rust workspace conventions where the term "core" refers to the project's purpose rather than a specific folder name. The maintainers organized functionality into semantic crates under crates/ rather than using a single monolithic core directory. This structure supports modular compilation and clear separation of concerns between different engine components as defined in Cargo.toml.

Where is the main dbt source code located on the main branch?

On the main branch, all source code lives within the crates/ directory as individual Rust packages. Key components include crates/dbt-base for foundational types and crates/dbt-error for error handling. The Cargo.toml workspace file coordinates these crates into a unified build system without requiring a top-level dbt folder.

How does this structure differ from older versions of dbt-core?

Previous versions of dbt-core maintained a Python codebase that typically included a dbt/ package directory at the root. The current main branch represents a complete architectural migration to Rust, abandoning the Python package layout in favor of a Cargo workspace with multiple specialized crates under crates/. The Python code now resides on the 1.latest branch.

Can I find Python files in the main branch root directory?

No, the main branch contains minimal Python code. While the lib/ directory may contain auxiliary files, the primary Python implementation remains on the 1.latest branch. Contributors seeking the Python source should checkout that branch instead of main, as the main branch exclusively hosts the Rust rewrite.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →