Update dependencies
parent: tbd commit: 931e8eb
Showing 13 changed files with 79 insertions and 864 deletions
Cargo.lock
@@ -121,7 +121,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" | ||
121 | 121 | dependencies = [ |
122 | 122 | "proc-macro2", |
123 | 123 | "quote", |
124 | "syn 2.0.38", | |
124 | "syn 2.0.39", | |
125 | 125 | ] |
126 | 126 | |
127 | 127 | [[package]] |
@@ -156,12 +156,6 @@ dependencies = [ | ||
156 | 156 | |
157 | 157 | [[package]] |
158 | 158 | name = "base64" |
159 | version = "0.13.1" | |
160 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
161 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" | |
162 | ||
163 | [[package]] | |
164 | name = "base64" | |
165 | 159 | version = "0.21.5" |
166 | 160 | source = "registry+https://github.com/rust-lang/crates.io-index" |
167 | 161 | checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" |
@@ -495,7 +489,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" | ||
495 | 489 | dependencies = [ |
496 | 490 | "proc-macro2", |
497 | 491 | "quote", |
498 | "syn 2.0.38", | |
492 | "syn 2.0.39", | |
499 | 493 | ] |
500 | 494 | |
501 | 495 | [[package]] |
@@ -530,9 +524,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" | ||
530 | 524 | |
531 | 525 | [[package]] |
532 | 526 | name = "errno" |
533 | version = "0.3.5" | |
527 | version = "0.3.6" | |
534 | 528 | source = "registry+https://github.com/rust-lang/crates.io-index" |
535 | checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" | |
529 | checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" | |
536 | 530 | dependencies = [ |
537 | 531 | "libc", |
538 | 532 | "windows-sys", |
@@ -683,7 +677,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" | ||
683 | 677 | dependencies = [ |
684 | 678 | "proc-macro2", |
685 | 679 | "quote", |
686 | "syn 2.0.38", | |
680 | "syn 2.0.39", | |
687 | 681 | ] |
688 | 682 | |
689 | 683 | [[package]] |
@@ -727,9 +721,9 @@ dependencies = [ | ||
727 | 721 | |
728 | 722 | [[package]] |
729 | 723 | name = "getrandom" |
730 | version = "0.2.10" | |
724 | version = "0.2.11" | |
731 | 725 | source = "registry+https://github.com/rust-lang/crates.io-index" |
732 | checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" | |
726 | checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" | |
733 | 727 | dependencies = [ |
734 | 728 | "cfg-if", |
735 | 729 | "libc", |
@@ -754,11 +748,11 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" | ||
754 | 748 | |
755 | 749 | [[package]] |
756 | 750 | name = "git2" |
757 | version = "0.17.2" | |
751 | version = "0.18.1" | |
758 | 752 | source = "registry+https://github.com/rust-lang/crates.io-index" |
759 | checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" | |
753 | checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" | |
760 | 754 | dependencies = [ |
761 | "bitflags 1.3.2", | |
755 | "bitflags 2.4.1", | |
762 | 756 | "libc", |
763 | 757 | "libgit2-sys", |
764 | 758 | "log", |
@@ -811,7 +805,7 @@ dependencies = [ | ||
811 | 805 | "anyhow", |
812 | 806 | "argon2", |
813 | 807 | "async-trait", |
814 | "base64 0.21.5", | |
808 | "base64", | |
815 | 809 | "bincode", |
816 | 810 | "chrono", |
817 | 811 | "deadpool", |
@@ -863,7 +857,7 @@ version = "0.1.0" | ||
863 | 857 | dependencies = [ |
864 | 858 | "anyhow", |
865 | 859 | "async-trait", |
866 | "base64 0.21.5", | |
860 | "base64", | |
867 | 861 | "bincode", |
868 | 862 | "chrono", |
869 | 863 | "git2", |
@@ -1215,11 +1209,11 @@ dependencies = [ | ||
1215 | 1209 | |
1216 | 1210 | [[package]] |
1217 | 1211 | name = "jsonwebtoken" |
1218 | version = "8.3.0" | |
1212 | version = "9.1.0" | |
1219 | 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1220 | checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" | |
1214 | checksum = "155c4d7e39ad04c172c5e3a99c434ea3b4a7ba7960b38ecd562b270b097cce09" | |
1221 | 1215 | dependencies = [ |
1222 | "base64 0.21.5", | |
1216 | "base64", | |
1223 | 1217 | "pem", |
1224 | 1218 | "ring", |
1225 | 1219 | "serde", |
@@ -1244,9 +1238,9 @@ checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" | ||
1244 | 1238 | |
1245 | 1239 | [[package]] |
1246 | 1240 | name = "libgit2-sys" |
1247 | version = "0.15.2+1.6.4" | |
1241 | version = "0.16.1+1.7.1" | |
1248 | 1242 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1249 | checksum = "a80df2e11fb4a61f4ba2ab42dbe7f74468da143f1a75c74e11dee7c813f694fa" | |
1243 | checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" | |
1250 | 1244 | dependencies = [ |
1251 | 1245 | "cc", |
1252 | 1246 | "libc", |
@@ -1301,9 +1295,9 @@ dependencies = [ | ||
1301 | 1295 | |
1302 | 1296 | [[package]] |
1303 | 1297 | name = "linux-raw-sys" |
1304 | version = "0.4.10" | |
1298 | version = "0.4.11" | |
1305 | 1299 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1306 | checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" | |
1300 | checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" | |
1307 | 1301 | |
1308 | 1302 | [[package]] |
1309 | 1303 | name = "lock_api" |
@@ -1562,7 +1556,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" | ||
1562 | 1556 | dependencies = [ |
1563 | 1557 | "proc-macro2", |
1564 | 1558 | "quote", |
1565 | "syn 2.0.38", | |
1559 | "syn 2.0.39", | |
1566 | 1560 | ] |
1567 | 1561 | |
1568 | 1562 | [[package]] |
@@ -1631,11 +1625,12 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" | ||
1631 | 1625 | |
1632 | 1626 | [[package]] |
1633 | 1627 | name = "pem" |
1634 | version = "1.1.1" | |
1628 | version = "3.0.2" | |
1635 | 1629 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1636 | checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" | |
1630 | checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" | |
1637 | 1631 | dependencies = [ |
1638 | "base64 0.13.1", | |
1632 | "base64", | |
1633 | "serde", | |
1639 | 1634 | ] |
1640 | 1635 | |
1641 | 1636 | [[package]] |
@@ -1815,7 +1810,7 @@ version = "0.11.22" | ||
1815 | 1810 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1816 | 1811 | checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" |
1817 | 1812 | dependencies = [ |
1818 | "base64 0.21.5", | |
1813 | "base64", | |
1819 | 1814 | "bytes", |
1820 | 1815 | "encoding_rs", |
1821 | 1816 | "futures-core", |
@@ -1855,17 +1850,16 @@ checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" | ||
1855 | 1850 | |
1856 | 1851 | [[package]] |
1857 | 1852 | name = "ring" |
1858 | version = "0.16.20" | |
1853 | version = "0.17.5" | |
1859 | 1854 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1860 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" | |
1855 | checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" | |
1861 | 1856 | dependencies = [ |
1862 | 1857 | "cc", |
1858 | "getrandom", | |
1863 | 1859 | "libc", |
1864 | "once_cell", | |
1865 | "spin 0.5.2", | |
1860 | "spin 0.9.8", | |
1866 | 1861 | "untrusted", |
1867 | "web-sys", | |
1868 | "winapi", | |
1862 | "windows-sys", | |
1869 | 1863 | ] |
1870 | 1864 | |
1871 | 1865 | [[package]] |
@@ -1991,22 +1985,22 @@ dependencies = [ | ||
1991 | 1985 | |
1992 | 1986 | [[package]] |
1993 | 1987 | name = "serde" |
1994 | version = "1.0.190" | |
1988 | version = "1.0.192" | |
1995 | 1989 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1996 | checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" | |
1990 | checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" | |
1997 | 1991 | dependencies = [ |
1998 | 1992 | "serde_derive", |
1999 | 1993 | ] |
2000 | 1994 | |
2001 | 1995 | [[package]] |
2002 | 1996 | name = "serde_derive" |
2003 | version = "1.0.190" | |
1997 | version = "1.0.192" | |
2004 | 1998 | source = "registry+https://github.com/rust-lang/crates.io-index" |
2005 | checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" | |
1999 | checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" | |
2006 | 2000 | dependencies = [ |
2007 | 2001 | "proc-macro2", |
2008 | 2002 | "quote", |
2009 | "syn 2.0.38", | |
2003 | "syn 2.0.39", | |
2010 | 2004 | ] |
2011 | 2005 | |
2012 | 2006 | [[package]] |
@@ -2290,7 +2284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2290 | 2284 | checksum = "864b869fdf56263f4c95c45483191ea0af340f9f3e3e7b4d57a61c7c87a970db" |
2291 | 2285 | dependencies = [ |
2292 | 2286 | "atoi", |
2293 | "base64 0.21.5", | |
2287 | "base64", | |
2294 | 2288 | "bitflags 2.4.1", |
2295 | 2289 | "byteorder", |
2296 | 2290 | "bytes", |
@@ -2333,7 +2327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2333 | 2327 | checksum = "eb7ae0e6a97fb3ba33b23ac2671a5ce6e3cabe003f451abd5a56e7951d975624" |
2334 | 2328 | dependencies = [ |
2335 | 2329 | "atoi", |
2336 | "base64 0.21.5", | |
2330 | "base64", | |
2337 | 2331 | "bitflags 2.4.1", |
2338 | 2332 | "byteorder", |
2339 | 2333 | "chrono", |
@@ -2419,9 +2413,9 @@ dependencies = [ | ||
2419 | 2413 | |
2420 | 2414 | [[package]] |
2421 | 2415 | name = "syn" |
2422 | version = "2.0.38" | |
2416 | version = "2.0.39" | |
2423 | 2417 | source = "registry+https://github.com/rust-lang/crates.io-index" |
2424 | checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" | |
2418 | checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" | |
2425 | 2419 | dependencies = [ |
2426 | 2420 | "proc-macro2", |
2427 | 2421 | "quote", |
@@ -2485,7 +2479,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" | ||
2485 | 2479 | dependencies = [ |
2486 | 2480 | "proc-macro2", |
2487 | 2481 | "quote", |
2488 | "syn 2.0.38", | |
2482 | "syn 2.0.39", | |
2489 | 2483 | ] |
2490 | 2484 | |
2491 | 2485 | [[package]] |
@@ -2569,7 +2563,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" | ||
2569 | 2563 | dependencies = [ |
2570 | 2564 | "proc-macro2", |
2571 | 2565 | "quote", |
2572 | "syn 2.0.38", | |
2566 | "syn 2.0.39", | |
2573 | 2567 | ] |
2574 | 2568 | |
2575 | 2569 | [[package]] |
@@ -2623,9 +2617,9 @@ dependencies = [ | ||
2623 | 2617 | |
2624 | 2618 | [[package]] |
2625 | 2619 | name = "toml" |
2626 | version = "0.7.8" | |
2620 | version = "0.8.8" | |
2627 | 2621 | source = "registry+https://github.com/rust-lang/crates.io-index" |
2628 | checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" | |
2622 | checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" | |
2629 | 2623 | dependencies = [ |
2630 | 2624 | "serde", |
2631 | 2625 | "serde_spanned", |
@@ -2644,9 +2638,9 @@ dependencies = [ | ||
2644 | 2638 | |
2645 | 2639 | [[package]] |
2646 | 2640 | name = "toml_edit" |
2647 | version = "0.19.15" | |
2641 | version = "0.21.0" | |
2648 | 2642 | source = "registry+https://github.com/rust-lang/crates.io-index" |
2649 | checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" | |
2643 | checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" | |
2650 | 2644 | dependencies = [ |
2651 | 2645 | "indexmap 2.1.0", |
2652 | 2646 | "serde", |
@@ -2681,7 +2675,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" | ||
2681 | 2675 | dependencies = [ |
2682 | 2676 | "proc-macro2", |
2683 | 2677 | "quote", |
2684 | "syn 2.0.38", | |
2678 | "syn 2.0.39", | |
2685 | 2679 | ] |
2686 | 2680 | |
2687 | 2681 | [[package]] |
@@ -2810,9 +2804,9 @@ dependencies = [ | ||
2810 | 2804 | |
2811 | 2805 | [[package]] |
2812 | 2806 | name = "untrusted" |
2813 | version = "0.7.1" | |
2807 | version = "0.9.0" | |
2814 | 2808 | source = "registry+https://github.com/rust-lang/crates.io-index" |
2815 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" | |
2809 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" | |
2816 | 2810 | |
2817 | 2811 | [[package]] |
2818 | 2812 | name = "url" |
@@ -2905,7 +2899,7 @@ dependencies = [ | ||
2905 | 2899 | "once_cell", |
2906 | 2900 | "proc-macro2", |
2907 | 2901 | "quote", |
2908 | "syn 2.0.38", | |
2902 | "syn 2.0.39", | |
2909 | 2903 | "wasm-bindgen-shared", |
2910 | 2904 | ] |
2911 | 2905 | |
@@ -2939,7 +2933,7 @@ checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" | ||
2939 | 2933 | dependencies = [ |
2940 | 2934 | "proc-macro2", |
2941 | 2935 | "quote", |
2942 | "syn 2.0.38", | |
2936 | "syn 2.0.39", | |
2943 | 2937 | "wasm-bindgen-backend", |
2944 | 2938 | "wasm-bindgen-shared", |
2945 | 2939 | ] |
@@ -3108,7 +3102,7 @@ checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" | ||
3108 | 3102 | dependencies = [ |
3109 | 3103 | "proc-macro2", |
3110 | 3104 | "quote", |
3111 | "syn 2.0.38", | |
3105 | "syn 2.0.39", | |
3112 | 3106 | ] |
3113 | 3107 | |
3114 | 3108 | [[package]] |
giterated-daemon/Cargo.toml
@@ -21,7 +21,7 @@ serde = { version = "1.0", features = [ "derive" ]} | ||
21 | 21 | serde_json = "1.0" |
22 | 22 | tracing-subscriber = "0.3" |
23 | 23 | base64 = "0.21" |
24 | jsonwebtoken = { version = "8.3", features = ["use_pem"]} | |
24 | jsonwebtoken = { version = "9.1", features = ["use_pem"]} | |
25 | 25 | log = "0.4" |
26 | 26 | rand = "0.8" |
27 | 27 | rsa = {version = "0.9", features = ["sha2"]} |
@@ -36,13 +36,13 @@ deadpool = "0.9" | ||
36 | 36 | bincode = "1.3" |
37 | 37 | tokio-util = {version = "0.7", features = ["rt"]} |
38 | 38 | |
39 | toml = { version = "0.7" } | |
39 | toml = { version = "0.8" } | |
40 | 40 | |
41 | 41 | chrono = { version = "0.4", features = [ "serde" ] } |
42 | 42 | async-trait = "0.1" |
43 | 43 | |
44 | 44 | # Git backend |
45 | git2 = "0.17" | |
45 | git2 = "0.18" | |
46 | 46 | thiserror = "1" |
47 | 47 | anyhow = "1" |
48 | 48 | sqlx = { version = "0.7", features = [ "runtime-tokio", "tls-native-tls", "postgres", "macros", "migrate", "chrono" ] } |
giterated-models/Cargo.toml
@@ -20,7 +20,7 @@ tracing = "0.1" | ||
20 | 20 | serde = { version = "1.0", features = [ "derive" ]} |
21 | 21 | serde_json = "1.0" |
22 | 22 | base64 = "0.21" |
23 | jsonwebtoken = { version = "8.3", features = ["use_pem"]} | |
23 | jsonwebtoken = { version = "9.1", features = ["use_pem"]} | |
24 | 24 | rand = "0.8" |
25 | 25 | rsa = {version = "0.9", features = ["sha2"]} |
26 | 26 | semver = {version = "1.0", features = ["serde"]} |
@@ -28,9 +28,9 @@ bincode = "1.3" | ||
28 | 28 | secrecy = { version = "0.8", features = ["serde"] } |
29 | 29 | thiserror = "1" |
30 | 30 | anyhow = "1" |
31 | toml = { version = "0.7" } | |
31 | toml = { version = "0.8" } | |
32 | 32 | # Git backend |
33 | git2 = "0.17" | |
33 | git2 = "0.18" | |
34 | 34 | chrono = { version = "0.4", features = [ "serde" ] } |
35 | 35 | async-trait = "0.1" |
36 | 36 | url = {version = "2.4", features = ["serde"]} |
giterated-plugins/giterated-backend/Cargo.toml
@@ -14,7 +14,7 @@ thiserror = "1" | ||
14 | 14 | sqlx = { version = "0.7", features = [ "runtime-tokio", "tls-native-tls", "postgres", "macros", "migrate", "chrono" ] } |
15 | 15 | tokio = { version = "1.32", features = [ "full" ] } |
16 | 16 | giterated-plugin-sys = { path = "../giterated-plugin-sys" } |
17 | toml = { version = "0.7" } | |
17 | toml = { version = "0.8" } | |
18 | 18 | tracing = "0.1" |
19 | 19 | tracing-subscriber = "0.3" |
20 | 20 | serde_json = "1.0" |
giterated-plugins/giterated-backend/src/handlers.rs
@@ -5,7 +5,7 @@ use giterated_models::{ | ||
5 | 5 | repository::{Repository, RepositoryInfoRequest, RepositorySummary, RepositoryView}, |
6 | 6 | user::{User, UserRepositoriesRequest}, |
7 | 7 | }; |
8 | use giterated_plugin::new_stack::{OperationState, Runtime, State}; | |
8 | use giterated_plugin::new_stack::{runtime_handler::RuntimeHandle, OperationState, Runtime, State}; | |
9 | 9 | |
10 | 10 | use crate::DatabaseBackend; |
11 | 11 | |
@@ -21,7 +21,7 @@ pub async fn repository_info( | ||
21 | 21 | state: DatabaseBackend, |
22 | 22 | object: Repository, |
23 | 23 | request: RepositoryInfoRequest, |
24 | runtime: Arc<Runtime>, | |
24 | runtime: RuntimeHandle, | |
25 | 25 | State(operation_state): State<OperationState>, |
26 | 26 | ) -> Result<RepositoryView, OperationError<RepositoryError>> { |
27 | 27 | todo!() |
giterated-plugins/giterated-issues/Cargo.toml
@@ -19,7 +19,7 @@ thiserror = "1" | ||
19 | 19 | sqlx = { version = "0.7", features = [ "runtime-tokio", "tls-native-tls", "postgres", "macros", "migrate", "chrono" ] } |
20 | 20 | tokio = { version = "1.32", features = [ "full" ] } |
21 | 21 | giterated-plugin-sys = { path = "../giterated-plugin-sys" } |
22 | toml = { version = "0.7" } | |
22 | toml = { version = "0.8" } | |
23 | 23 | tracing = "0.1" |
24 | 24 | tracing-subscriber = "0.3" |
25 | 25 | serde_json = "1.0" |
giterated-plugins/giterated-plugin/src/callback/mod.rs
@@ -7,7 +7,7 @@ pub use value::*; | ||
7 | 7 | mod setting; |
8 | 8 | pub use setting::*; |
9 | 9 | |
10 | use crate::new_stack::{PluginState, Runtime}; | |
10 | use crate::new_stack::{runtime_handler::RuntimeHandle, PluginState, Runtime}; | |
11 | 11 | |
12 | 12 | /// A container for a callback pointer, used to provide an internal callback function or |
13 | 13 | /// state to a plugin when performing a callback. |
@@ -23,6 +23,6 @@ impl CallbackPtr { | ||
23 | 23 | |
24 | 24 | #[repr(C)] |
25 | 25 | pub struct RuntimeState { |
26 | pub runtime: Arc<Runtime>, | |
26 | pub runtime: RuntimeHandle, | |
27 | 27 | pub operation_state: PluginState, |
28 | 28 | } |
giterated-plugins/giterated-plugin/src/callback/operation.rs
@@ -1,7 +1,7 @@ | ||
1 | 1 | use giterated_models::error::OperationError; |
2 | 2 | |
3 | 3 | use crate::{ |
4 | new_stack::{PluginState, Runtime, State}, | |
4 | new_stack::{runtime_handler::RuntimeHandle, PluginState, Runtime, State}, | |
5 | 5 | AnyObject, AnyOperation, |
6 | 6 | }; |
7 | 7 | |
@@ -139,7 +139,7 @@ pub trait FromOperationState<S, O, D>: Sized { | ||
139 | 139 | ) -> Result<Self, OperationError<anyhow::Error>>; |
140 | 140 | } |
141 | 141 | |
142 | impl<S, O, D> FromOperationState<S, O, D> for Arc<Runtime> { | |
142 | impl<S, O, D> FromOperationState<S, O, D> for RuntimeHandle { | |
143 | 143 | fn from_operation_state( |
144 | 144 | state: &S, |
145 | 145 | runtime_state: &RuntimeState, |
giterated-plugins/giterated-plugin/src/new_stack/mod.rs
@@ -2,7 +2,8 @@ pub mod operation_walker; | ||
2 | 2 | pub mod runtime_handler; |
3 | 3 | |
4 | 4 | use std::{ |
5 | any::type_name, collections::HashMap, fmt::Debug, mem::transmute, ptr::null_mut, sync::Arc, | |
5 | any::type_name, collections::HashMap, fmt::Debug, marker::PhantomData, mem::transmute, | |
6 | ptr::null_mut, sync::Arc, | |
6 | 7 | }; |
7 | 8 | |
8 | 9 | use giterated_models::{ |
@@ -177,13 +178,21 @@ impl PluginState { | ||
177 | 178 | } |
178 | 179 | } |
179 | 180 | |
180 | #[derive(Default)] | |
181 | pub struct Runtime { | |
181 | pub struct Runtime<S: Clone> { | |
182 | 182 | plugins: Vec<(PluginMeta, PluginHandle)>, |
183 | 183 | handlers: RuntimeHandlers, |
184 | _marker: PhantomData<S>, | |
184 | 185 | } |
185 | 186 | |
186 | impl Runtime { | |
187 | impl<S: Clone> Runtime<S> { | |
188 | pub fn new() -> Self { | |
189 | Self { | |
190 | plugins: vec![], | |
191 | handlers: RuntimeHandlers::default(), | |
192 | _marker: PhantomData, | |
193 | } | |
194 | } | |
195 | ||
187 | 196 | pub fn insert_plugin(&mut self, mut plugin: PluginHandle) { |
188 | 197 | let _guard = debug_span!("inserting plugin", meta = debug(&plugin.meta)).entered(); |
189 | 198 |
giterated-plugins/giterated-protocol/Cargo.toml
@@ -16,7 +16,7 @@ giterated-models = { path = "../../giterated-models" } | ||
16 | 16 | serde = { version = "1.0", features = [ "derive" ]} |
17 | 17 | anyhow = "1" |
18 | 18 | giterated-plugin-sys = { path = "../giterated-plugin-sys" } |
19 | toml = { version = "0.7" } | |
19 | toml = { version = "0.8" } | |
20 | 20 | tracing = "0.1" |
21 | 21 | tracing-subscriber = "0.3" |
22 | 22 | serde_json = "1.0" |