diff --git a/tp2/Cargo.lock b/tp2/Cargo.lock new file mode 100644 index 0000000000000000000000000000000000000000..d2be7f1af251dfad3e1754e1cc6a6408e44b4dbb --- /dev/null +++ b/tp2/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "tp2" +version = "0.1.0" diff --git a/tp2/Cargo.toml b/tp2/Cargo.toml new file mode 100644 index 0000000000000000000000000000000000000000..1d772e49be8655949d374be421f1944c49876ff0 --- /dev/null +++ b/tp2/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "tp2" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/tp2/README.md b/tp2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3d64ce5c01ed5a32a5887788cf60b77320d9345a --- /dev/null +++ b/tp2/README.md @@ -0,0 +1,38 @@ +# COA-VANDEWAETER + +Dépôt : https://gitlab.univ-lille.fr/fabio.vandewaeter.etu/coa-vandewaeter + +# TP2 + +src : https://moodle.univ-lille.fr/pluginfile.php/4467521/mod_resource/content/1/tp-02.html + +```bash +cargo run +``` + +# 1. Ownership, borrowing + +## 1.1. Problem 1 +## 1.2. Problem 2 +## 1.3. Problem 3 +## 1.4. Problem 4 +## 1.5. Problem 5 + +# 2. Lifetimes annotation +## 2.1. Elided lifetimes +### 2.1.1. Elided 1 +### 2.1.2. Elided 2 +### 2.1.3. Elided 3 + +## 2.2. Explicit lifetimes annotation needed +### 2.2.1. Explicit 1 +### 2.2.2. Explicit 2 +### 2.2.3. Explicit 3 + +## 2.3. Lifetimes on types +### 2.3.1. Types 1 +### 2.3.2. Types 2 + +# 3. Long exercise : a mini web server +## 3.1. Description of work +## 3.2. Hints and references diff --git a/tp2/src/main.rs b/tp2/src/main.rs new file mode 100644 index 0000000000000000000000000000000000000000..e7a11a969c037e00a796aafeff6258501ec15e9a --- /dev/null +++ b/tp2/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}