1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-12-26 00:11:49 +02:00

Compare commits

..

4 Commits
5.5.0 ... 5.5.1

Author SHA1 Message Date
liv
f2de12aa34 release: 5.5.1 2023-05-17 21:05:51 +02:00
liv
2d544f18b5 fix: revert back to using relative paths 2023-05-17 21:04:32 +02:00
liv
0667ee7c4d fix: add oranda-hide class to readme 2023-05-17 17:11:49 +02:00
liv
19cee73209 chore: set up oranda
Sets up oranda so we can get nice website things for free. Some caveats we have right now:

- Absolutely manual, I have to do `oranda build` and the deploy manually right now
- I had to pop the Readme into a new Markdown file because the first header in there was looking very strange
2023-05-17 16:56:01 +02:00
9 changed files with 36 additions and 11 deletions

4
.gitignore vendored
View File

@@ -11,3 +11,7 @@ rust-project.json
!.vscode/extensions.json
*.iml
*.o
public/
# Local Netlify folder
.netlify

View File

@@ -1,3 +1,10 @@
<a name="5.5.1"></a>
## 5.5.1 (2023-05-17)
#### Fixed
- Reverted `rust-project.json` path generation due to an upstream `rust-analyzer` fix.
<a name="5.5.0"></a>
## 5.5.0 (2023-05-17)

2
Cargo.lock generated
View File

@@ -441,7 +441,7 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "rustlings"
version = "5.5.0"
version = "5.5.1"
dependencies = [
"argh",
"assert_cmd",

View File

@@ -1,6 +1,7 @@
[package]
name = "rustlings"
version = "5.5.0"
description = "Small exercises to get you used to reading and writing Rust code!"
version = "5.5.1"
authors = [
"Liv <mokou@fastmail.com>",
"Carol (Nichols || Goulding) <carol.nichols@gmail.com>",

View File

@@ -1,5 +1,9 @@
<div class="oranda-hide">
# rustlings 🦀❤️
</div>
Greetings and welcome to `rustlings`. This project contains small exercises to get you used to reading and writing Rust code. This includes reading and responding to compiler messages!
_...looking for the old, web-based version of Rustlings? Try [here](https://github.com/rust-lang/rustlings/tree/rustlings-1)_
@@ -36,8 +40,8 @@ This will install Rustlings and give you access to the `rustlings` command. Run
Basically: Clone the repository at the latest tag, finally run `nix develop` or `nix-shell`.
```bash
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.0)
git clone -b 5.5.0 --depth 1 https://github.com/rust-lang/rustlings
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.1)
git clone -b 5.5.1 --depth 1 https://github.com/rust-lang/rustlings
cd rustlings
# if nix version > 2.3
nix develop
@@ -74,8 +78,8 @@ If you get a permission denied message, you might have to exclude the directory
Basically: Clone the repository at the latest tag, run `cargo install --path .`.
```bash
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.0)
git clone -b 5.5.0 --depth 1 https://github.com/rust-lang/rustlings
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.1)
git clone -b 5.5.1 --depth 1 https://github.com/rust-lang/rustlings
cd rustlings
cargo install --force --path .
```

View File

@@ -22,7 +22,7 @@
rustlings =
pkgs.rustPlatform.buildRustPackage {
name = "rustlings";
version = "5.5.0";
version = "5.5.1";
buildInputs = cargoBuildInputs;

10
oranda.json Normal file
View File

@@ -0,0 +1,10 @@
{
"homepage": "https://rustlings.cool",
"repository": "https://github.com/rust-lang/rustlings",
"analytics": {
"plausible": {
"domain": "rustlings.cool"
}
},
"changelog": true
}

View File

@@ -26,7 +26,7 @@ mod run;
mod verify;
// In sync with crate version
const VERSION: &str = "5.5.0";
const VERSION: &str = "5.5.1";
#[derive(FromArgs, PartialEq, Debug)]
/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code

View File

@@ -1,9 +1,9 @@
use glob::glob;
use serde::{Deserialize, Serialize};
use std::env;
use std::error::Error;
use std::path::PathBuf;
use std::process::Command;
use std::{env, fs};
/// Contains the structure of resulting rust-project.json file
/// and functions to build the data required to create the file
@@ -42,9 +42,8 @@ impl RustAnalyzerProject {
fn path_to_json(&mut self, path: PathBuf) -> Result<(), Box<dyn Error>> {
if let Some(ext) = path.extension() {
if ext == "rs" {
let abspath = fs::canonicalize(path)?;
self.crates.push(Crate {
root_module: abspath.display().to_string(),
root_module: path.display().to_string(),
edition: "2021".to_string(),
deps: Vec::new(),
// This allows rust_analyzer to work inside #[test] blocks