Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crate_universe] Add README to examples/crate_universe directory #759

Merged
merged 4 commits into from
May 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions crate_universe/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@ Some areas have unit testing, there are a few (very brittle) integration tests,

## How to test local changes

To use a local version, first bootstrap it:

```console
rules_rust $ ./bootstrap.sh
```
To use a local version, first bootstrap it. See [crate_universe/private/bootstrap/README.md](./private/bootstrap/README.md) for instructions on how to do this.

This will build `crate_universe_resolver` and generate a `crate_universe.bazelrc` file which contains
[override_repository](https://docs.bazel.build/versions/master/command-line-reference.html#flag--override_repository)
bcmyers marked this conversation as resolved.
Show resolved Hide resolved
definitions fo the newly built binary. For more details on the build process, see
[crate_universe/private/bootstrap/README.md](./private/bootstrap/README.md).
definitions of the newly built binary.
bcmyers marked this conversation as resolved.
Show resolved Hide resolved

To get verbose logging, edit `defs.bzl` to set `RUST_LOG` to `debug` or `trace` instead of `info`. In particular, that will print out the generated `Cargo.toml`, and the path to the generated workspace file.

Expand Down
22 changes: 22 additions & 0 deletions examples/crate_universe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# `crate_universe` examples

### Instructions

Set the `RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP` environment variable to `true`

```bash
$ export RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP=true
```

Build the examples

```bash
$ bazel build //...
```

Run the examples' tests

```bash
$ bazel test //...
```