Skip to content

What is the process to 'vendor' third party dependencies? #387

Answered by dtolnay
svermeulen asked this question in Q&A
Discussion options

You must be logged in to vote

https://github.com/dtolnay/cxx/blob/f4453bc6bda5742a804732e3212c284272374623/third-party/BUCK has an example of http_archive. You can run git submodule update --init followed by buck2 build //third-party: in that repository to try it out.

Git dependencies are supported a very similar way, using https://buck2.build/docs/api/rules/#git_fetch. Buck2 itself uses them. You can run reindeer buckify in this directory and you'll see the generated BUCK file contains some, corresponding to this and this git dependency. (Reindeer: https://github.com/facebookincubator/reindeer.)

For vendoring, using https://github.com/dtolnay/cxx as an example, you can run cargo vendor --versioned-dirs --locked > .ca…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@svermeulen
Comment options

@svermeulen
Comment options

@thoughtpolice
Comment options

@c00t
Comment options

Answer selected by svermeulen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants