-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Tool for generating BUILD files from Cargo.toml #13
Comments
Now I'm trying to implement a In this effort, I realized that there are some language-independent features required by such The features are, for example,
|
Summary: Prepping for the implementation of the rust indexer, this commit sets up bazel builds for rust. Currently it only builds a hello world program but the project is split into two different components a library and an executable. Test Plan: Run bazel build //kythe/rust/indexer:release. If rust is present it will build, and //kythe/rust/indexer:test will run the tests. If rust is not present both will fail and display an error message. Reviewers: zarko, schroederc Reviewed By: schroederc Projects: #rust Differential Revision: https://phabricator-dot-kythe-repo.appspot.com/D931
+cc @kchodorow, @damienmg Those are some good ideas, @yugui. Ideally, it would be great to have a generic tool for generating BUILD/WORKSPACE with extensions that are specific to different languages and different build systems (e.g. Cargo for Rust, I am thinking perhaps the language-specific extension can be something like a separate command line tool that outputs data in a common format such as JSON (since most likely, most languages should have a JSON library) that would specify what should be added to the WORKSPACE file, the BUILD files to generate, etc. WDYT? As for naming, have you considered keeping the name of the tool as |
+cc @laurentlb has proposed making the skylark/build file parser from bazel an independent library. |
Update: a similar tool was created and it seems to do the job pretty ok: https://github.com/acmcarther/cargo-raze |
Raze now lives at https://github.com/google/cargo-raze |
Creating a tool for generating BUILD/WORKSPACE files from Cargo.toml+Cargo.lock would be very useful and would greatly lower the barrier for Rust developers who are used to Cargo to use Bazel to build Rust projects.
This would be similar in concept to the
glaze
tool for generating BUILD files for Go projects (bazel-contrib/rules_go#15).One possible fun name for this tool:
raze
The text was updated successfully, but these errors were encountered: