diff options
author | nil0j <nil.jimeno@estudiant.fjaverianas.com> | 2024-09-21 10:17:23 +0200 |
---|---|---|
committer | nil0j <nil.jimeno@estudiant.fjaverianas.com> | 2024-09-21 10:17:23 +0200 |
commit | faa13839f898c60ff5618be6e916ad2e60958468 (patch) | |
tree | d785b9e7c66d092c0e5fbc296382289f39fea501 /rust |
init
Diffstat (limited to 'rust')
-rw-r--r-- | rust/.gitignore | 4 | ||||
-rw-r--r-- | rust/Cargo.toml | 6 | ||||
-rw-r--r-- | rust/src/main.rs | 5 | ||||
-rw-r--r-- | rust/src/structs.rs | 35 |
4 files changed, 50 insertions, 0 deletions
diff --git a/rust/.gitignore b/rust/.gitignore new file mode 100644 index 0000000..523b2b0 --- /dev/null +++ b/rust/.gitignore @@ -0,0 +1,4 @@ +lock/ +target/ +Cargo.lock +**/*.rs.bk diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..f9fe11c --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "ver1" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/rust/src/main.rs b/rust/src/main.rs new file mode 100644 index 0000000..486aa6f --- /dev/null +++ b/rust/src/main.rs @@ -0,0 +1,5 @@ +mod structs; + +fn main() { + println!("Hello, world!"); +} diff --git a/rust/src/structs.rs b/rust/src/structs.rs new file mode 100644 index 0000000..7535bb4 --- /dev/null +++ b/rust/src/structs.rs @@ -0,0 +1,35 @@ +#[allow(dead_code)] +struct Song { + //song variables + id: i32, + title: String, + lyrics: String, + + //album variables + album_id: i32, + genres: Vec<String>, + album_cover: String, + + //artist variables + artist_id: i32, + artist_name: String, +} + +#[allow(dead_code)] +struct Album { + id: i32, + title: String, + genres: Vec<String>, + cover: String, + songs: Vec<i32>, +} + +#[allow(dead_code)] +struct Artist { + id: i32, + name: String, + genres: Vec<String>, + albums: Vec<i32>, +} + +// lepht anonym |