# What's the use a Project.toml file and the the use of a Manifest.toml in a Julia project?

**URL:** <https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524>\
**Category:** New to Julia\
**Created:** [March 30, 2019, 2:11am UTC](https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524 "2019-03-30T02:11:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [March 30, 2019, 2:11am UTC](https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524/1 "2019-03-30T02:11:17Z")

</div>

Why are there two `.toml` files in a Julia project? How are they different?

From [here](https://discourse.julialang.org/t/does-manifest-toml-belong-in-the-repository/12029) it says that a manifest.toml allows other to replicate the set up of the project. So how is the `project.toml` different?

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [March 30, 2019, 3:07am UTC](https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524/2 "2019-03-30T03:07:03Z")

</div>

In an environment, the `Project.toml` file describes the packages you added explicitly. These can be thought of as the direct dependencies of your environment (which could be a package). `Manifest.toml` has all the packages that were pulled in either because you added them explicitly (so they also show up in `Project.toml`) or because they are dependencies of some package that you added. The `Manifest.toml` is like a screenshot of your current environment that has all the information needed to replicate this environment elsewhere, e.g. the URL of unregistered packages, branch, commit, etc. So how is the `Project.toml` useful? Well, it is kind of a minimal representation of the environment. It is also typically used to define direct and test dependencies of packages, including version constraints, since packages can be considered to be special types of environments. So a `Project.toml` works as a replacement to REQUIRE. Unfortunately, until now REQUIRE still has to be there beside the optional `Project.toml` because the transition is not complete yet.

When running Julia in REPL, you are running it in an environment, the default one. There is nothing special about this environment, you can change it if you want. When adding packages, the packages and their dependencies are pulled in, sometimes existing packages get upgraded or downgraded to have a “feasible” set of packages. This automatically updates the `Project.toml` and `Manifest.toml` files of the active environment. The `Project.toml` file will have the explicitly added packages added to it, and the `Manifest.toml` will have the whole environment’s new state, e.g. new versions, packages, branches, etc. A feasible set of packages is a set that satisfies the version constraints of all the `Project.toml` (or REQUIRE) files of all your packages.

When you are defining `Project.toml` for a package as a replacement to REQUIRE, you can activate the environment that is local to this package. This is possible because packages have `Project.toml` and `Manifest.toml` files. You can then add the dependencies and define the constraints as explained in [Convert REQUIRE to Project.toml and Manifest.toml - #2 by mohamed82008](https://discourse.julialang.org/t/convert-require-to-project-toml-and-manifest-toml/17775/2).

This is the best intuition I have for how the new package manager works. I may have missed a couple of things, so perhaps other people can correct me if I said something wrong.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 30, 2019, 6:37am UTC](https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524/3 "2019-03-30T06:37:44Z")

</div>

All of this is explained in the [manual](https://julialang.github.io/Pkg.jl/v1/glossary/# **9.** -Glossary-1).

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [March 30, 2019, 6:39am UTC](https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524/4 "2019-03-30T06:39:27Z")

</div>

Hopefully by asking it here it will help google index it better. Couldn’t find it on google. Maybe my google-fu is not good enough

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 30, 2019, 7:09am UTC](https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524/5 "2019-03-30T07:09:47Z")

</div>

See also [10. Project.toml and Manifest.toml · Pkg.jl](https://julialang.github.io/Pkg.jl/dev/toml-files/)

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [June 8, 2020, 7:20am UTC](https://discourse.julialang.org/t/whats-the-use-a-project-toml-file-and-the-the-use-of-a-manifest-toml-in-a-julia-project/22524/6 "2020-06-08T07:20:54Z")

</div>

> [@Tamas\_Papp](#):
>
> All of this is explained in the [manual](https://julialang.github.io/Pkg.jl/v1/glossary/# **9.** -Glossary-1).

I believe [this page](https://julialang.github.io/Pkg.jl/v1/toml-files/) of the manual addresses the question more specifically.
