Clone this repo:
  1. e7b8e28 Revert "Delete WORKSPACE" by Matt Stark · 1 year, 4 months ago factory-brox-16086.B factory-brya-15684.B factory-geralt-15840.B factory-nissa-16077.B factory-rex-15708.B firmware-R126-15885.B firmware-R127-15916.B firmware-R128-15963.B firmware-R129-16001.B firmware-R130-16032.B firmware-R131-16062.B firmware-android-15949.B firmware-android-geralt-15842.88.B firmware-brox-16080.B firmware-cr50-efi-15611.28.B firmware-cr50-mp-15611.B firmware-cr50-prepvt-15608.B firmware-ec-R131-16063.2.B firmware-ec-R132-16093.3.B firmware-geralt-15842.B firmware-hps-15892.B firmware-rex-15709.B firmware-ti50-mp-15980.B firmware-ti50-prepvt-15974.B main release-R117-15572.B release-R118-15604.B release-R119-15633.B release-R120-15662.B release-R121-15699.B release-R122-15753.B release-R123-15786.B release-R124-15823.B release-R125-15853.B release-R126-15886.B release-R127-15917.B release-R128-15964.B release-R129-16002.B release-R130-16033.B release-R131-16063.B release-R132-16093.B stabilize-15561.B stabilize-15562.B stabilize-15563.B stabilize-15564.B stabilize-15572.16.B stabilize-15572.39.B stabilize-15572.4.B stabilize-15572.50.B stabilize-15572.57.B stabilize-15572.63.B stabilize-15588.B stabilize-15604.16.B stabilize-15604.45.B stabilize-15604.56.B stabilize-15604.57.B stabilize-15610.B stabilize-15633.44.B stabilize-15633.58.B stabilize-15633.69.B stabilize-15642.B stabilize-15654.B stabilize-15662.64.B stabilize-15662.76.B stabilize-15662.78.B stabilize-15662.80.B stabilize-15662.88.B stabilize-15677.B stabilize-15699.58.B stabilize-15699.66.B stabilize-15714.B stabilize-15753.46.B stabilize-15753.55.B stabilize-15756.B stabilize-15786.48.B stabilize-15786.58.B stabilize-15793.B stabilize-15823.40.B stabilize-15828.B stabilize-15855.B stabilize-15857.B stabilize-15886.46.B stabilize-15886.63.B stabilize-15886.66.B stabilize-15888.B stabilize-15905.B stabilize-15917.61.B stabilize-15917.65.B stabilize-15926.B stabilize-15964.20.B stabilize-15964.42.B stabilize-15964.9.B stabilize-16002.44.B stabilize-16002.51.B stabilize-16033.43.B stabilize-16033.58.B stabilize-16055.B stabilize-FLEX-15662.115.B stabilize-hps-15890.B stabilize-quickfix-15662.77.B stabilize-quickfix-15786.49.B stabilize-quickfix-15823.44.B stabilize-quickfix-15886.43.B stabilize-starline-16056.B stabilize-starline-16082.B stabilize-starline-16084.B stabilize-starline-16093.2.B stabilize-starline-16095.B
  2. be836ab Revert "Update prebuilts for the new snapshot" by Shuhei Takahashi · 1 year, 7 months ago release-R115-15474.B release-R116-15509.B stabilize-15446.B stabilize-15474.38.B stabilize-15474.53.B stabilize-15474.70.B stabilize-15483.B stabilize-15485.B stabilize-15509.37.B stabilize-15509.63.B stabilize-15509.72.B stabilize-15511.B stabilize-15519.B stabilize-15531.B stabilize-15532.B
  3. 048f9a0 Update prebuilts for the new snapshot by Shuhei Takahashi · 1 year, 7 months ago
  4. 010683b Support live feedback for vscode rust code. by Matt Stark · 1 year, 8 months ago
  5. 5293edf bazelrcs/prebuilts: Update prebuilts for stabilize-15429.B by Raul E Rangel · 1 year, 7 months ago release-R114-15437.B stabilize-15437.42.B stabilize-15437.57.B stabilize-15437.59.B stabilize-15439.B

Chrome OS Bazel Rules

Overview

This repository provides common rules and configuration for Bazel projects in Chrome OS.

Documentation

The code is this directory is experimental and under active development. Stability and functionality is not guaranteed :)

Configuring dev experience

Rust

We use rust_analyzer to generate a rust-project.json file in the workspace root, which allows vscode to understand your dependencies.

Simply install the rust_analyzer VSCode plugin, and then add the following to your .vscode/tasks.json file, substituting TARGET for a label of any bazel target you want to depend on. VSCode will then analyze all the transitive dependencies of the specified targets.

For example, I might use the following line:

"args": ["run", "//rules_cros/toolchains/rust:gen_rust_project", "--", "//rules_cros/toolchains/rust/examples/use_local_crate/...", "//rules_cros/toolchains/rust/examples/hello_world:helllo_world"],

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Generate rust-project.json",
            "command": "bazel",
            "args": ["run", "//rules_cros/toolchains/rust:gen_rust_project", "--", "<TARGET1>", "<TARGET2>", "..."],
            "options": {
                "cwd": "${workspaceFolder}"
            },
            "group": "build",
            "problemMatcher": [],
            "presentation": {
                "reveal": "never",
                "panel": "dedicated",
            },
            "runOptions": {
                "runOn": "folderOpen"
            }
        },
    ]
}

If you add a new file, you may need to manually re-run the task.