Make gen-dev-cargo-toml a separate package

so that `cargo install` only installs `rustlings`
pull/1942/head
mo8it 3 months ago
parent 34375b2ebf
commit 445441ce25

9
Cargo.lock generated

@ -330,6 +330,15 @@ dependencies = [
"libc",
]
[[package]]
name = "gen-dev-cargo-toml"
version = "0.0.0"
dependencies = [
"anyhow",
"serde",
"toml_edit",
]
[[package]]
name = "glob"
version = "0.3.1"

@ -6,6 +6,9 @@ exclude = [
"tests/fixture/success",
"dev",
]
members = [
"gen-dev-cargo-toml",
]
[workspace.package]
version = "6.0.0"
@ -16,6 +19,11 @@ authors = [
license = "MIT"
edition = "2021"
[workspace.dependencies]
anyhow = "1.0.81"
serde = { version = "1.0.197", features = ["derive"] }
toml_edit = { version = "0.22.9", default-features = false, features = ["parse", "serde"] }
[package]
name = "rustlings"
description = "Small exercises to get you used to reading and writing Rust code!"
@ -26,7 +34,7 @@ license.workspace = true
edition.workspace = true
[dependencies]
anyhow = "1.0.81"
anyhow.workspace = true
clap = { version = "4.5.4", features = ["derive"] }
console = "0.15.8"
crossterm = "0.27.0"
@ -34,8 +42,8 @@ notify-debouncer-mini = "0.4.1"
ratatui = "0.26.1"
rustlings-macros = { path = "rustlings-macros" }
serde_json = "1.0.115"
serde = { version = "1.0.197", features = ["derive"] }
toml_edit = { version = "0.22.9", default-features = false, features = ["parse", "serde"] }
serde.workspace = true
toml_edit.workspace = true
which = "6.0.1"
winnow = "0.6.5"

@ -1,5 +1,5 @@
# This file is a hack to allow using `cargo r` to test `rustlings` during development.
# You shouldn't edit it manually. It is created and updated by running `cargo run --bin gen-dev-cargo-toml`.
# This file is a hack to allow using `cargo run` to test `rustlings` during development.
# You shouldn't edit it manually. It is created and updated by running `cargo run -p gen-dev-cargo-toml`.
bin = [
{ name = "intro1", path = "../exercises/00_intro/intro1.rs" },

@ -0,0 +1,10 @@
[package]
name = "gen-dev-cargo-toml"
publish = false
license.workspace = true
edition.workspace = true
[dependencies]
anyhow.workspace = true
serde.workspace = true
toml_edit.workspace = true

@ -1,5 +1,5 @@
// Generates `dev/Cargo.toml` such that it is synced with `info.toml`.
// `dev/Cargo.toml` is a hack to allow using `cargo r` to test `rustlings`
// `dev/Cargo.toml` is a hack to allow using `cargo run` to test `rustlings`
// during development.
use anyhow::{bail, Context, Result};
@ -30,8 +30,8 @@ fn main() -> Result<()> {
let mut buf = Vec::with_capacity(1 << 14);
buf.extend_from_slice(
b"# This file is a hack to allow using `cargo r` to test `rustlings` during development.
# You shouldn't edit it manually. It is created and updated by running `cargo run --bin gen-dev-cargo-toml`.
b"# This file is a hack to allow using `cargo run` to test `rustlings` during development.
# You shouldn't edit it manually. It is created and updated by running `cargo run -p gen-dev-cargo-toml`.
bin = [\n",
);

@ -1,5 +1,5 @@
// Makes sure that `dev/Cargo.toml` is synced with `info.toml`.
// When this test fails, you just need to run `cargo run --bin gen-dev-cargo-toml`.
// When this test fails, you just need to run `cargo run -p gen-dev-cargo-toml`.
use serde::Deserialize;
use std::fs;

Loading…
Cancel
Save