summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
Diffstat (limited to 'rust')
-rw-r--r--rust/.gitignore4
-rw-r--r--rust/Cargo.toml6
-rw-r--r--rust/src/main.rs5
-rw-r--r--rust/src/structs.rs35
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