Skip to content

Commit d4f0f4d

Browse files
committed
Add a deprecation notice to the rtthost crate
1 parent f7cb7cc commit d4f0f4d

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ keywords = ["embedded"]
1212
license = "MIT OR Apache-2.0"
1313

1414
[workspace]
15-
members = ["cargo-embed", "cargo-flash", "probe-rs-debugger", "probe-rs-cli"]
15+
members = ["cargo-embed", "cargo-flash", "probe-rs-debugger", "probe-rs-cli", "rtthost"]

rtthost/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "rtthost"
3+
version.workspace = true
4+
edition.workspace = true
5+
description.workspace = true
6+
documentation.workspace = true
7+
homepage.workspace = true
8+
repository.workspace = true
9+
readme.workspace = true
10+
license.workspace = true
11+
categories.workspace = true
12+
keywords.workspace = true
13+
14+
[badges]
15+
maintenance = { status = "deprecated" }

rtthost/build.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
fn main() {
2+
const TEMPLATE: &str = r#"
3+
!!!!!!!!!!!!!!!!!!!!!!!!
4+
`rtthost` has been fully moved to `probe-rs`. To install it, {shell}:
5+
6+
{install-command}
7+
8+
To use the installed program, run `probe-rs run` for full `rtthost` functionality.
9+
10+
For more information, please refer to the documentation at https://probe.rs/docs/tools/probe-rs/.
11+
!!!!!!!!!!!!!!!!!!!!!!!!
12+
"#;
13+
14+
let (shell, install_command) = match std::env::consts::OS {
15+
"windows" => ("run the following PowerShell command", "irm https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.ps1 | iex"),
16+
"linux" | "macos" => ("run the following command", "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh"),
17+
_ => ("see the installation instructions on the website:", "https://probe.rs/docs/getting-started/installation/"),
18+
};
19+
20+
panic!(
21+
"{}",
22+
TEMPLATE
23+
.replace("{shell}", shell)
24+
.replace("{install-command}", install_command)
25+
);
26+
}

rtthost/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)