Skip to content

Standalone binary #1931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e5efc68
Done macro
mo8it Mar 28, 2024
dd02539
Make everything static
mo8it Mar 28, 2024
39bdd08
Use concat explicitly from std
mo8it Mar 28, 2024
d5ed749
Add embedded.rs
mo8it Mar 28, 2024
5b4103b
Remove unneeded ./ from relative paths
mo8it Mar 28, 2024
3ff9b0c
POC done
mo8it Mar 28, 2024
3959570
Bump version to v6
mo8it Mar 29, 2024
0f18d59
Add panic = "abort"
mo8it Mar 29, 2024
36a8e3a
Replace rust-project.json with Cargo.toml
mo8it Mar 29, 2024
a561a0f
Avoid reinitialization by mistake
mo8it Mar 29, 2024
2b01811
Fix typo
mo8it Mar 29, 2024
8e3cc9d
Improve printed information
mo8it Mar 29, 2024
fe7d775
Remove the installation scripts
mo8it Mar 30, 2024
79ca821
Fix tests
mo8it Mar 30, 2024
23f0fae
Show a success message after resetting
mo8it Mar 30, 2024
b5e17c9
Add an error message when a file is not embedded
mo8it Mar 30, 2024
1e1f031
Fix path comparison
mo8it Mar 30, 2024
b711dd6
Add .gitignore
mo8it Mar 31, 2024
82b563f
Use Cargo instead of rustc
mo8it Mar 31, 2024
c1de4d4
Some improvements to error handling
mo8it Mar 31, 2024
7090fff
Fix tests
mo8it Mar 31, 2024
fb32d0b
Remove redundant test
mo8it Mar 31, 2024
7560aec
Inline reset
mo8it Mar 31, 2024
8ad18de
Use var_os to avoid conversion to String
mo8it Mar 31, 2024
14f3585
Make `cargo run` work
mo8it Apr 1, 2024
2f30eac
Remove unneeded .iter()
mo8it Apr 1, 2024
fdd7de0
Improvements to `verify`
mo8it Apr 1, 2024
def8d2c
Add VerifyState
mo8it Apr 1, 2024
1909453
Add comments about dev/Cargo.toml
mo8it Apr 1, 2024
1885ece
Merge branch 'main'
mo8it Apr 4, 2024
569a68e
Minify generated Cargo.toml
mo8it Apr 4, 2024
b6c434c
Remove optional version field
mo8it Apr 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*.swp
target/
/tests/fixture/*/Cargo.lock
/dev/Cargo.lock

*.swp
**/*.rs.bk
.DS_Store
*.pdb
exercises/22_clippy/Cargo.toml
exercises/22_clippy/Cargo.lock
rust-project.json
.idea
.vscode/*
!.vscode/extensions.json
Expand Down
10 changes: 9 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 28 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,51 @@
[package]
name = "rustlings"
description = "Small exercises to get you used to reading and writing Rust code!"
version = "5.6.1"
[workspace]
resolver = "2"
exclude = [
"tests/fixture/failure",
"tests/fixture/state",
"tests/fixture/success",
"dev",
]

[workspace.package]
version = "6.0.0"
authors = [
"Liv <[email protected]>",
"Carol (Nichols || Goulding) <[email protected]>",
]
license = "MIT"
edition = "2021"

[package]
name = "rustlings"
description = "Small exercises to get you used to reading and writing Rust code!"
default-run = "rustlings"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true

[dependencies]
anyhow = "1.0.81"
clap = { version = "4.5.4", features = ["derive"] }
console = "0.15.8"
indicatif = "0.17.8"
notify-debouncer-mini = "0.4.1"
rustlings-macros = { path = "rustlings-macros" }
serde_json = "1.0.115"
serde = { version = "1.0.197", features = ["derive"] }
shlex = "1.3.0"
toml_edit = { version = "0.22.9", default-features = false, features = ["parse", "serde"] }
which = "6.0.1"
winnow = "0.6.5"

[[bin]]
name = "rustlings"
path = "src/main.rs"

[dev-dependencies]
assert_cmd = "2.0.14"
glob = "0.3.0"
predicates = "3.1.0"

[profile.release]
panic = "abort"

[profile.dev]
panic = "abort"
106 changes: 106 additions & 0 deletions dev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# 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`.

bin = [
{ name = "intro1", path = "../exercises/00_intro/intro1.rs" },
{ name = "intro2", path = "../exercises/00_intro/intro2.rs" },
{ name = "variables1", path = "../exercises/01_variables/variables1.rs" },
{ name = "variables2", path = "../exercises/01_variables/variables2.rs" },
{ name = "variables3", path = "../exercises/01_variables/variables3.rs" },
{ name = "variables4", path = "../exercises/01_variables/variables4.rs" },
{ name = "variables5", path = "../exercises/01_variables/variables5.rs" },
{ name = "variables6", path = "../exercises/01_variables/variables6.rs" },
{ name = "functions1", path = "../exercises/02_functions/functions1.rs" },
{ name = "functions2", path = "../exercises/02_functions/functions2.rs" },
{ name = "functions3", path = "../exercises/02_functions/functions3.rs" },
{ name = "functions4", path = "../exercises/02_functions/functions4.rs" },
{ name = "functions5", path = "../exercises/02_functions/functions5.rs" },
{ name = "if1", path = "../exercises/03_if/if1.rs" },
{ name = "if2", path = "../exercises/03_if/if2.rs" },
{ name = "if3", path = "../exercises/03_if/if3.rs" },
{ name = "quiz1", path = "../exercises/quiz1.rs" },
{ name = "primitive_types1", path = "../exercises/04_primitive_types/primitive_types1.rs" },
{ name = "primitive_types2", path = "../exercises/04_primitive_types/primitive_types2.rs" },
{ name = "primitive_types3", path = "../exercises/04_primitive_types/primitive_types3.rs" },
{ name = "primitive_types4", path = "../exercises/04_primitive_types/primitive_types4.rs" },
{ name = "primitive_types5", path = "../exercises/04_primitive_types/primitive_types5.rs" },
{ name = "primitive_types6", path = "../exercises/04_primitive_types/primitive_types6.rs" },
{ name = "vecs1", path = "../exercises/05_vecs/vecs1.rs" },
{ name = "vecs2", path = "../exercises/05_vecs/vecs2.rs" },
{ name = "move_semantics1", path = "../exercises/06_move_semantics/move_semantics1.rs" },
{ name = "move_semantics2", path = "../exercises/06_move_semantics/move_semantics2.rs" },
{ name = "move_semantics3", path = "../exercises/06_move_semantics/move_semantics3.rs" },
{ name = "move_semantics4", path = "../exercises/06_move_semantics/move_semantics4.rs" },
{ name = "move_semantics5", path = "../exercises/06_move_semantics/move_semantics5.rs" },
{ name = "move_semantics6", path = "../exercises/06_move_semantics/move_semantics6.rs" },
{ name = "structs1", path = "../exercises/07_structs/structs1.rs" },
{ name = "structs2", path = "../exercises/07_structs/structs2.rs" },
{ name = "structs3", path = "../exercises/07_structs/structs3.rs" },
{ name = "enums1", path = "../exercises/08_enums/enums1.rs" },
{ name = "enums2", path = "../exercises/08_enums/enums2.rs" },
{ name = "enums3", path = "../exercises/08_enums/enums3.rs" },
{ name = "strings1", path = "../exercises/09_strings/strings1.rs" },
{ name = "strings2", path = "../exercises/09_strings/strings2.rs" },
{ name = "strings3", path = "../exercises/09_strings/strings3.rs" },
{ name = "strings4", path = "../exercises/09_strings/strings4.rs" },
{ name = "modules1", path = "../exercises/10_modules/modules1.rs" },
{ name = "modules2", path = "../exercises/10_modules/modules2.rs" },
{ name = "modules3", path = "../exercises/10_modules/modules3.rs" },
{ name = "hashmaps1", path = "../exercises/11_hashmaps/hashmaps1.rs" },
{ name = "hashmaps2", path = "../exercises/11_hashmaps/hashmaps2.rs" },
{ name = "hashmaps3", path = "../exercises/11_hashmaps/hashmaps3.rs" },
{ name = "quiz2", path = "../exercises/quiz2.rs" },
{ name = "options1", path = "../exercises/12_options/options1.rs" },
{ name = "options2", path = "../exercises/12_options/options2.rs" },
{ name = "options3", path = "../exercises/12_options/options3.rs" },
{ name = "errors1", path = "../exercises/13_error_handling/errors1.rs" },
{ name = "errors2", path = "../exercises/13_error_handling/errors2.rs" },
{ name = "errors3", path = "../exercises/13_error_handling/errors3.rs" },
{ name = "errors4", path = "../exercises/13_error_handling/errors4.rs" },
{ name = "errors5", path = "../exercises/13_error_handling/errors5.rs" },
{ name = "errors6", path = "../exercises/13_error_handling/errors6.rs" },
{ name = "generics1", path = "../exercises/14_generics/generics1.rs" },
{ name = "generics2", path = "../exercises/14_generics/generics2.rs" },
{ name = "traits1", path = "../exercises/15_traits/traits1.rs" },
{ name = "traits2", path = "../exercises/15_traits/traits2.rs" },
{ name = "traits3", path = "../exercises/15_traits/traits3.rs" },
{ name = "traits4", path = "../exercises/15_traits/traits4.rs" },
{ name = "traits5", path = "../exercises/15_traits/traits5.rs" },
{ name = "quiz3", path = "../exercises/quiz3.rs" },
{ name = "lifetimes1", path = "../exercises/16_lifetimes/lifetimes1.rs" },
{ name = "lifetimes2", path = "../exercises/16_lifetimes/lifetimes2.rs" },
{ name = "lifetimes3", path = "../exercises/16_lifetimes/lifetimes3.rs" },
{ name = "tests1", path = "../exercises/17_tests/tests1.rs" },
{ name = "tests2", path = "../exercises/17_tests/tests2.rs" },
{ name = "tests3", path = "../exercises/17_tests/tests3.rs" },
{ name = "tests4", path = "../exercises/17_tests/tests4.rs" },
{ name = "iterators1", path = "../exercises/18_iterators/iterators1.rs" },
{ name = "iterators2", path = "../exercises/18_iterators/iterators2.rs" },
{ name = "iterators3", path = "../exercises/18_iterators/iterators3.rs" },
{ name = "iterators4", path = "../exercises/18_iterators/iterators4.rs" },
{ name = "iterators5", path = "../exercises/18_iterators/iterators5.rs" },
{ name = "box1", path = "../exercises/19_smart_pointers/box1.rs" },
{ name = "rc1", path = "../exercises/19_smart_pointers/rc1.rs" },
{ name = "arc1", path = "../exercises/19_smart_pointers/arc1.rs" },
{ name = "cow1", path = "../exercises/19_smart_pointers/cow1.rs" },
{ name = "threads1", path = "../exercises/20_threads/threads1.rs" },
{ name = "threads2", path = "../exercises/20_threads/threads2.rs" },
{ name = "threads3", path = "../exercises/20_threads/threads3.rs" },
{ name = "macros1", path = "../exercises/21_macros/macros1.rs" },
{ name = "macros2", path = "../exercises/21_macros/macros2.rs" },
{ name = "macros3", path = "../exercises/21_macros/macros3.rs" },
{ name = "macros4", path = "../exercises/21_macros/macros4.rs" },
{ name = "clippy1", path = "../exercises/22_clippy/clippy1.rs" },
{ name = "clippy2", path = "../exercises/22_clippy/clippy2.rs" },
{ name = "clippy3", path = "../exercises/22_clippy/clippy3.rs" },
{ name = "using_as", path = "../exercises/23_conversions/using_as.rs" },
{ name = "from_into", path = "../exercises/23_conversions/from_into.rs" },
{ name = "from_str", path = "../exercises/23_conversions/from_str.rs" },
{ name = "try_from_into", path = "../exercises/23_conversions/try_from_into.rs" },
{ name = "as_ref_mut", path = "../exercises/23_conversions/as_ref_mut.rs" },
]

[package]
name = "rustlings"
edition = "2021"
publish = false
94 changes: 0 additions & 94 deletions install.ps1

This file was deleted.

Loading