From 814abf5bb2dc622eeb3ff0aced132736e8616c11 Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Sat, 30 Dec 2023 08:05:10 -0500 Subject: [PATCH] create project --- .gitignore | 14 ++ .gitmodules | 3 + godot/.gitattributes | 2 + godot/.gitignore | 2 + godot/icon.svg | 1 + godot/icon.svg.import | 37 +++++ godot/project.godot | 19 +++ godot/rust.gdextension | 13 ++ rust/.Cargo.toml.kate-swp | Bin 0 -> 116 bytes rust/Cargo.lock | 296 ++++++++++++++++++++++++++++++++++++++ rust/Cargo.toml | 14 ++ rust/src/lib.rs | 6 + rust/vmc_rs | 1 + 13 files changed, 408 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 godot/.gitattributes create mode 100644 godot/.gitignore create mode 100644 godot/icon.svg create mode 100644 godot/icon.svg.import create mode 100644 godot/project.godot create mode 100644 godot/rust.gdextension create mode 100644 rust/.Cargo.toml.kate-swp create mode 100644 rust/Cargo.lock create mode 100644 rust/Cargo.toml create mode 100644 rust/src/lib.rs create mode 160000 rust/vmc_rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0b33b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Generated by Cargo +# will have compiled files and executables +rust/debug/ +rust/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/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d6c0463 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vmc_rs"] + path = rust/vmc_rs + url = gitea@gitea.cass-dlcm.dev:cassdlcm/vmc_rs.git diff --git a/godot/.gitattributes b/godot/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/godot/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/godot/.gitignore b/godot/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/godot/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/godot/icon.svg b/godot/icon.svg new file mode 100644 index 0000000..b370ceb --- /dev/null +++ b/godot/icon.svg @@ -0,0 +1 @@ + diff --git a/godot/icon.svg.import b/godot/icon.svg.import new file mode 100644 index 0000000..0bfc1b7 --- /dev/null +++ b/godot/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bwtuj0osv72oi" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/godot/project.godot b/godot/project.godot new file mode 100644 index 0000000..67bfdd8 --- /dev/null +++ b/godot/project.godot @@ -0,0 +1,19 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="3d_live_puppetry_rs" +config/features=PackedStringArray("4.2", "Forward Plus") +config/icon="res://icon.svg" + +[dotnet] + +project/assembly_name="3d_live_puppetry_rs" diff --git a/godot/rust.gdextension b/godot/rust.gdextension new file mode 100644 index 0000000..7198b9f --- /dev/null +++ b/godot/rust.gdextension @@ -0,0 +1,13 @@ +[configuration] +entry_symbol = "gdext_rust_init" +compatibility_minimum = 4.1 + +[libraries] +linux.debug.x86_64 = "res://../rust/target/debug/liblibthree_d_live_puppetry_rs.so" +linux.release.x86_64 = "res://../rust/target/release/liblibthree_d_live_puppetry_rs.so" +windows.debug.x86_64 = "res://../rust/target/debug/libthree_d_live_puppetry_rs.dll" +windows.release.x86_64 = "res://../rust/target/release/libthree_d_live_puppetry_rs.dll" +macos.debug = "res://../rust/target/debug/liblibthree_d_live_puppetry_rs.dylib" +macos.release = "res://../rust/target/release/liblibthree_d_live_puppetry_rs.dylib" +macos.debug.arm64 = "res://../rust/target/debug/liblibthree_d_live_puppetry_rs.dylib" +macos.release.arm64 = "res://../rust/target/release/liblibthree_d_live_puppetry_rs.dylib" diff --git a/rust/.Cargo.toml.kate-swp b/rust/.Cargo.toml.kate-swp new file mode 100644 index 0000000000000000000000000000000000000000..b9cec35ec13243c9e805c16a8d79b504126e8808 GIT binary patch literal 116 zcmZQzU=Z?7EJ;-eE>A2_aLdd|RWQ;sU|?Vn37UI)j#X4nvB|C%Mp>*z9$IVpHUxVD qWtf3j5QrI*UBP@FAR7c&6o9}rI0(pu3qiQNV0i`x{!k!;&lLc<(i1ZP literal 0 HcmV?d00001 diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 0000000..0aeea8f --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,296 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "gensym" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913dce4c5f06c2ea40fc178c06f777ac89fc6b1383e90c254fafb1abe4ba3c82" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "uuid", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "glam" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e4afd9ad95555081e109fe1d21f2a30c691b5f0919c67dfa690a2e1eb6bd51c" + +[[package]] +name = "godot" +version = "0.1.0" +source = "git+https://github.com/godot-rust/gdext?branch=master#5e18af87a13bf8d40b4f50bfcb180228e227b773" +dependencies = [ + "godot-core", + "godot-macros", +] + +[[package]] +name = "godot-bindings" +version = "0.1.0" +source = "git+https://github.com/godot-rust/gdext?branch=master#5e18af87a13bf8d40b4f50bfcb180228e227b773" +dependencies = [ + "godot4-prebuilt", +] + +[[package]] +name = "godot-codegen" +version = "0.1.0" +source = "git+https://github.com/godot-rust/gdext?branch=master#5e18af87a13bf8d40b4f50bfcb180228e227b773" +dependencies = [ + "godot-bindings", + "godot-fmt", + "heck", + "nanoserde", + "proc-macro2", + "quote", + "regex", +] + +[[package]] +name = "godot-core" +version = "0.1.0" +source = "git+https://github.com/godot-rust/gdext?branch=master#5e18af87a13bf8d40b4f50bfcb180228e227b773" +dependencies = [ + "glam", + "godot-bindings", + "godot-codegen", + "godot-ffi", +] + +[[package]] +name = "godot-ffi" +version = "0.1.0" +source = "git+https://github.com/godot-rust/gdext?branch=master#5e18af87a13bf8d40b4f50bfcb180228e227b773" +dependencies = [ + "gensym", + "godot-bindings", + "godot-codegen", + "paste", +] + +[[package]] +name = "godot-fmt" +version = "0.1.0" +source = "git+https://github.com/godot-rust/gdext?branch=master#5e18af87a13bf8d40b4f50bfcb180228e227b773" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "godot-macros" +version = "0.1.0" +source = "git+https://github.com/godot-rust/gdext?branch=master#5e18af87a13bf8d40b4f50bfcb180228e227b773" +dependencies = [ + "godot-bindings", + "proc-macro2", + "quote", + "venial", +] + +[[package]] +name = "godot4-prebuilt" +version = "0.0.0" +source = "git+https://github.com/godot-rust/godot4-prebuilt?branch=4.2#3328a4cded2da9c9a3e2c4f7e42f649f677648ce" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nanoserde" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a983d0b19ed0fcd803c4f04f9b20d5e6dd17e06d44d98742a0985ac45dab1bc" +dependencies = [ + "nanoserde-derive", +] + +[[package]] +name = "nanoserde-derive" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4dc96541767a4279572fdcf9f95af9cc1c9b2a2254e7a079203c81e206a9059" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "proc-macro2" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rosc" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e63d9e6b0d090be1485cf159b1e04c3973d2d3e1614963544ea2ff47a4a981" +dependencies = [ + "byteorder", + "nom", +] + +[[package]] +name = "syn" +version = "2.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "three_d_live_puppetry_rs" +version = "0.1.0" +dependencies = [ + "godot", + "rosc", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom", +] + +[[package]] +name = "venial" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61584a325b16f97b5b25fcc852eb9550843a251057a5e3e5992d2376f3df4bb2" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "vmc_rs" +version = "0.1.0" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..529dcb9 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,14 @@ +workspace = { members = ["vmc_rs"] } +[package] +name = "three_d_live_puppetry_rs" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib"] # Compile this crate to a dynamic C library. + +[dependencies] +godot = { git = "https://github.com/godot-rust/gdext", branch = "master" } +rosc = "0.10.1" diff --git a/rust/src/lib.rs b/rust/src/lib.rs new file mode 100644 index 0000000..3aa7156 --- /dev/null +++ b/rust/src/lib.rs @@ -0,0 +1,6 @@ +use godot::prelude::*; + +struct MyExtension; + +#[gdextension] +unsafe impl ExtensionLibrary for MyExtension {} diff --git a/rust/vmc_rs b/rust/vmc_rs new file mode 160000 index 0000000..1fc7e6c --- /dev/null +++ b/rust/vmc_rs @@ -0,0 +1 @@ +Subproject commit 1fc7e6c316708a97fa03b758b3a477fe8784abdd