Commit graph

35 commits

Author SHA1 Message Date
Remo Senekowitsch
dc086c6bf1 Improve initialization in workspace
- Detect if we are in a cargo project more reliably.
  (e.g. if `rustlings init` is run in the `src/` directory)

- Refuse to initialize rustlings in a non-workspace cargo project.

- Automatically populate the `workspace.members` field if `rustlings init` is
  run in a workspace.

  This may be considered risky, as there is no guarantee that's what the user
  wanted to do. However, it is consistent with the behavior of `cargo new`.
  Also, newcomers to Rust are unlikely to accidentally be in a cargo workspace,
  as they won't know how to create one in the first place.

  The use case for initialization in a workspace is when a workshop organizer
  wants to use rustlings alongside other exerices and provide a single
  repository with everything in one place.
2024-08-08 13:34:27 +02:00
mo8it
8df66f7991 Allow initialization in a workspace 2024-08-08 02:45:18 +02:00
mo8it
693bb708b2 Add README to the solutions dir 2024-08-08 00:41:12 +02:00
mo8it
97719fe8da Remove state file and solutions dir from .gitignore 2024-08-08 00:41:12 +02:00
mo8it
1937b4bf66 Use the rexported crossterm from ratatui 2024-07-25 16:26:48 +02:00
mo8it
beb7b24e8e Add solutions to bins 2024-05-25 18:19:30 +02:00
mo8it
700605ff35 Document init 2024-05-14 00:35:12 +02:00
mo8it
3c7e7368b2 Add solutions to the initialized .gitignore 2024-04-28 23:25:44 +02:00
mo8it
5920a58e83 Include dev/Cargo.toml 2024-04-25 19:58:55 +02:00
mo8it
8bf8b19a5d Improve output after initialization 2024-04-25 15:51:12 +02:00
mo8it
6d1d42d2dd Try to run git init 2024-04-25 15:41:52 +02:00
mo8it
212c82c6f6 Don't ignore .vscode/extensions.json when developing third-party exercises 2024-04-25 15:34:58 +02:00
mo8it
b3b4b7d59c Update initialized .gitignore 2024-04-25 15:23:24 +02:00
mo8it
2dac8e509b Refactor embedded files to add solutions 2024-04-23 19:18:25 +02:00
mo8it
642c3bd37e Fix the generated Cargo.toml after rustlings init 2024-04-21 20:22:01 +02:00
mo8it
501b973c25 Add "dev update" 2024-04-17 15:55:50 +02:00
mo8it
aa813fbce1 Update Cargo.toml on dev check 2024-04-16 03:30:28 +02:00
mo8it
df448c069c Fix running dev commands 2024-04-16 03:15:14 +02:00
mo8it
25e7696565 Done dev init 2024-04-16 03:08:45 +02:00
mo8it
6f04570dd0 Revert "Implement third-party exercises trust handling"
This reverts commit 15ca847c37.
See https://rust-lang.zulipchat.com/#narrow/stream/334454-rustlings/topic/Proposal.3A.20Third-party.20exercises/near/433183449
2024-04-15 03:36:12 +02:00
mo8it
15ca847c37 Implement third-party exercises trust handling 2024-04-15 02:11:27 +02:00
mo8it
3da860927d Use push instead of extend_from_slice on chars 2024-04-14 14:53:32 +02:00
mo8it
9dcc4b7df5 Simplify the state file 2024-04-14 05:13:27 +02:00
mo8it
5c0073a948 Tolerate changes in the state file 2024-04-14 01:15:43 +02:00
mo8it
8bd03093eb Add newline at the end of the generated .gitignore 2024-04-12 18:57:39 +02:00
mo8it
2a95a3e966 Deal with long strings 2024-04-12 01:24:01 +02:00
mo8it
db25cc9157 Ignore .rustlings-state.json 2024-04-07 23:54:32 +02:00
mo8it
93f8d1610d Some renamings 2024-04-07 23:37:40 +02:00
mo8it
b6c434c445 Remove optional version field 2024-04-04 15:45:53 +02:00
mo8it
569a68eb73 Minify generated Cargo.toml 2024-04-04 15:44:48 +02:00
mo8it
b711dd692a Add .gitignore 2024-03-31 02:04:41 +01:00
mo8it
8e3cc9d70c Improve printed information 2024-03-29 01:52:05 +01:00
mo8it
2b01811fe9 Fix typo 2024-03-29 01:51:22 +01:00
mo8it
a561a0f7f0 Avoid reinitialization by mistake 2024-03-29 01:51:08 +01:00
mo8it
36a8e3ac0e Replace rust-project.json with Cargo.toml 2024-03-29 01:29:41 +01:00