Skip to content

Commit

Permalink
Start automated aggregation and surfacing of internal documentation w…
Browse files Browse the repository at this point in the history
…ith rustdoc
  • Loading branch information
blakehatch committed Mar 2, 2024
1 parent 5df8a78 commit 1bc38d3
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nativelink-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ edition = "2021"
[dependencies]
serde = { version = "1.0.193", features = ["derive"] }
shellexpand = "3.1.0"

[package.metadata.docs.rs]
readme = "./README.md"
Empty file.
58 changes: 58 additions & 0 deletions nativelink-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,64 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]
#![doc = "\n\n"] // Add some spacing between the two README files
#![doc = "
<details>
<summary>Example Configuration Breakdown</summary>
"]
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/examples/README.md"))]
#![doc = "</details>"]
#![doc = "
<details>
<summary>Example Kubernetes Configuraton Breakdown</summary>
"]
#![doc = "
<details>
<summary>CAS JSON Config</summary>
"]
#![doc = "\n"]
#![doc = "```json"]
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../deployment-examples/kubernetes/cas.json"))]
#![doc = "```"]
#![doc = "\n"]
#![doc = "</details>"]
#![doc = "
<details>
<summary>Scheduler JSON Config</summary>
"]
#![doc = "\n"]
#![doc = "```json"]
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../deployment-examples/kubernetes/scheduler.json"))]
#![doc = "```"]
#![doc = "\n"]
#![doc = "</details>"]
#![doc = "
<details>
<summary>Scheduler YAML</summary>
"]
#![doc = "\n"]
#![doc = "```yaml"]
#![doc = "# Test"]
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../deployment-examples/kubernetes/scheduler.yaml"))]
#![doc = "```"]
#![doc = "\n"]
#![doc = "</details>"]
#![doc = "
<details>
<summary>CAS YAML</summary>
"]
#![doc = "\n"]
#![doc = "```yaml"]
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../deployment-examples/kubernetes/cas.yaml"))]
#![doc = "```"]
#![doc = "\n"]
#![doc = "</details>"]
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../deployment-examples/kubernetes/README.md"))]
#![doc = "</details>"]
#![doc = "\n\n"] // Add some spacing between the two README files
#![doc = "</details>"]

pub mod cas_server;
pub mod schedulers;
mod serde_utils;
Expand Down
Loading

0 comments on commit 1bc38d3

Please sign in to comment.