flowey_lib_hvlite/
cfg_rustup_version.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! A configuration node that configures the Rust toolchain version to use in
5//! OpenVMM pipelines. Having a separate node dedicated for this allows us to
6//! patch this node internally where the rustup toolchain is not available.
7//! This node also allows us to decouple the rustup version used in oss/internal.
8
9use flowey::node::prelude::*;
10
11pub const RUSTUP_TOOLCHAIN: &str = "1.91.1";
12
13new_simple_flow_node!(struct Node);
14
15impl SimpleFlowNode for Node {
16    type Request = Request;
17
18    fn imports(ctx: &mut ImportCtx<'_>) {
19        ctx.import::<flowey_lib_common::install_rust::Node>();
20    }
21
22    fn process_request(_: Self::Request, ctx: &mut NodeCtx<'_>) -> anyhow::Result<()> {
23        ctx.req(flowey_lib_common::install_rust::Request::Version(
24            RUSTUP_TOOLCHAIN.into(),
25        ));
26        Ok(())
27    }
28}
29
30flowey_request! {
31    pub enum Request {
32        Init,
33    }
34}