commit 54c41c3680efd0056980fd6a9af32e31ba6f984b Author: Rokas Puzonas Date: Thu Jun 2 13:44:01 2022 +0300 feat: initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6985cf1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..1275ff5 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,3 @@ +hard_tabs = true +tab_spaces = 2 +max_width = 80 diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..2602e59 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "rust-wasm-snake" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/README.md b/README.md new file mode 100644 index 0000000..9995be4 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Snake using Rust & WASM + +Tutorial: https://www.youtube.com/watch?v=iR7Q_6quwSI diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..1b4a90c --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,8 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + let result = 2 + 2; + assert_eq!(result, 4); + } +}