diff --git a/Cargo.lock b/Cargo.lock index 3f57522489..9b412685e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,47 +4,28 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.8.11" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "anes" version = "0.1.6" @@ -53,57 +34,58 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "async-channel" @@ -112,15 +94,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] name = "async-compat" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b48b4ff0c2026db683dea961cd8ea874737f56cffca86fa84415eaddc51c00d" +checksum = "7bab94bde396a3f7b4962e396fdad640e241ed797d4d8d77fc8c237d14c58fc0" dependencies = [ "futures-core", "futures-io", @@ -131,11 +125,10 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ - "async-lock", "async-task", "concurrent-queue", "fastrand", @@ -145,11 +138,11 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel", + "async-channel 2.3.1", "async-executor", "async-io", "async-lock", @@ -160,40 +153,41 @@ dependencies = [ [[package]] name = "async-io" -version = "1.13.0" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock", - "autocfg", "cfg-if", "concurrent-queue", + "futures-io", "futures-lite", - "log", "parking", "polling", - "rustix 0.37.25", + "rustix", "slab", - "socket2", - "waker-fn", + "tracing", + "windows-sys 0.59.0", ] [[package]] name = "async-lock" -version = "2.8.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener", + "event-listener 5.3.1", + "event-listener-strategy", + "pin-project-lite", ] [[package]] name = "async-std" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-global-executor", "async-io", "async-lock", @@ -215,15 +209,15 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -232,36 +226,36 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] name = "basic-toml" -version = "0.1.4" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bfc506e7a2370ec239e1d072507b2a80c833083699d3c6fa176fbb4de8448c6" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] @@ -277,57 +271,49 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blocking" -version = "1.3.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel", - "async-lock", + "async-channel 2.3.1", "async-task", - "atomic-waker", - "fastrand", + "futures-io", "futures-lite", - "log", + "piper", ] [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytes" -version = "1.4.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -352,15 +338,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -369,19 +346,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "android-tzdata", "num-traits", ] [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -390,15 +366,15 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", "half", @@ -406,9 +382,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -416,9 +392,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -428,9 +404,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", @@ -440,21 +416,21 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -495,74 +471,57 @@ dependencies = [ "itertools", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] -name = "errno" -version = "0.3.2" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -572,14 +531,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "fastrand" -version = "1.9.0" +name = "event-listener" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ - "instant", + "concurrent-queue", + "parking", + "pin-project-lite", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.1", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + [[package]] name = "fnv" version = "1.0.7" @@ -588,24 +565,27 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "fs-err" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] [[package]] name = "futures" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -618,9 +598,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -628,15 +608,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -645,30 +625,28 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "1.13.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ "fastrand", "futures-core", "futures-io", - "memchr", "parking", "pin-project-lite", - "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -677,21 +655,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -705,22 +683,11 @@ dependencies = [ "slab", ] -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "gimli" -version = "0.28.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -730,9 +697,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ "futures-channel", "futures-core", @@ -742,9 +709,9 @@ dependencies = [ [[package]] name = "goblin" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07a4ffed2093b118a525b1d8f5204ae274faed5604537caf7135d0f18d9887" +checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" dependencies = [ "log", "plain", @@ -753,15 +720,19 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -771,15 +742,15 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "http" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -788,44 +759,40 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", ] [[package]] -name = "instant" -version = "0.1.12" +name = "indexmap" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ - "cfg-if", + "equivalent", + "hashbrown", ] [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "is-terminal" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "is-terminal" -version = "0.4.9" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix 0.38.8", - "windows-sys 0.48.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -844,9 +811,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -878,61 +845,36 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.158" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "linux-raw-sys" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" - -[[package]] -name = "lock_api" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] [[package]] name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.9.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -942,9 +884,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -958,11 +900,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -977,102 +919,57 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.32.0" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "once_map" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa7085055bbe9c8edbd982048dbcf8181794d4a81cb04a11931673e63cc18dc6" -dependencies = [ - "ahash", - "hashbrown", - "parking_lot", - "stable_deref_trait", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "parking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - -[[package]] -name = "parking_lot" -version = "0.12.3" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.5", -] +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1080,6 +977,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "plain" version = "0.2.3" @@ -1088,9 +996,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -1101,58 +1009,57 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] [[package]] name = "polling" -version = "2.8.0" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", "concurrent-queue", - "libc", - "log", + "hermit-abi", "pin-project-lite", - "windows-sys 0.48.0", + "rustix", + "tracing", + "windows-sys 0.59.0", ] [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] name = "rayon" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -1160,30 +1067,19 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" -dependencies = [ - "bitflags 2.4.0", ] [[package]] name = "regex" -version = "1.9.3" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -1193,9 +1089,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -1204,15 +1100,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rinja" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28580fecce391f3c0e65a692e5f2b5db258ba2346ee04f355ae56473ab973dc" +checksum = "3dc4940d00595430b3d7d5a01f6222b5e5b51395d1120bdb28d854bb8abb17a5" dependencies = [ "itoa", "rinja_derive", @@ -1220,15 +1116,14 @@ dependencies = [ [[package]] name = "rinja_derive" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f1ae91455a4c82892d9513fcfa1ac8faff6c523602d0041536341882714aede" +checksum = "08d9ed0146aef6e2825f1b1515f074510549efba38d71f4554eec32eb36ba18b" dependencies = [ "basic-toml", "memchr", "mime", "mime_guess", - "once_map", "proc-macro2", "quote", "rinja_parser", @@ -1239,9 +1134,9 @@ dependencies = [ [[package]] name = "rinja_parser" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea17639e1f35032e1c67539856e498c04cd65fe2a45f55ec437ec55e4be941" +checksum = "93f9a866e2e00a7a1fb27e46e9e324a6f7c0e7edc4543cae1d38f4e4a100c610" dependencies = [ "memchr", "nom", @@ -1250,9 +1145,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -1262,36 +1157,22 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustix" -version = "0.37.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4eb579851244c2c03e7c24f501c3432bed80b8f720af1d6e5b0e0f01555a035" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.8" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ - "bitflags 2.4.0", + "bitflags", "errno", "libc", - "linux-raw-sys 0.4.5", - "windows-sys 0.48.0", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -1302,12 +1183,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "scroll" version = "0.12.0" @@ -1330,27 +1205,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.186" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.186" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", @@ -1359,15 +1234,25 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + [[package]] name = "siphasher" version = "0.3.11" @@ -1383,34 +1268,12 @@ dependencies = [ "autocfg", ] -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - [[package]] name = "smawk" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -1435,47 +1298,53 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "target-triple" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" + [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", ] [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", @@ -1494,9 +1363,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -1509,9 +1378,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "pin-project-lite", @@ -1526,19 +1395,69 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + [[package]] name = "trybuild" -version = "1.0.83" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df60d81823ed9c520ee897489573da4b1d79ffbe006b8134f46de1a1aa03555" +checksum = "8dcd332a5496c026f1e14b7f3d2b7bd98e509660c04239c58b0ba38a12daded4" dependencies = [ - "basic-toml", "glob", - "once_cell", "serde", "serde_derive", "serde_json", + "target-triple", "termcolor", + "toml 0.8.19", ] [[package]] @@ -1551,30 +1470,27 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -1589,6 +1505,7 @@ dependencies = [ "clap", "trybuild", "uniffi_bindgen", + "uniffi_bindings", "uniffi_build", "uniffi_core", "uniffi_macros", @@ -1700,7 +1617,6 @@ dependencies = [ "clap", "criterion", "uniffi", - "uniffi_bindgen", ] [[package]] @@ -1730,6 +1646,7 @@ dependencies = [ "thiserror", "uniffi", "uniffi_bindgen", + "uniffi_bindings", "uniffi_testing", ] @@ -1742,6 +1659,7 @@ dependencies = [ "thiserror", "uniffi", "uniffi_bindgen", + "uniffi_bindings", "uniffi_testing", ] @@ -2034,18 +1952,35 @@ dependencies = [ "camino", "cargo_metadata", "fs-err", - "glob", "goblin", "heck", "once_cell", + "rinja", + "serde", + "toml 0.5.11", + "uniffi_meta", + "uniffi_udl", +] + +[[package]] +name = "uniffi_bindings" +version = "0.28.2" +dependencies = [ + "anyhow", + "camino", + "cargo_metadata", + "fs-err", + "glob", + "heck", + "once_cell", "paste", "rinja", "serde", "textwrap", - "toml", + "toml 0.5.11", + "uniffi_bindgen", "uniffi_meta", "uniffi_testing", - "uniffi_udl", ] [[package]] @@ -2089,7 +2024,7 @@ dependencies = [ "quote", "serde", "syn", - "toml", + "toml 0.5.11", "uniffi_build", "uniffi_meta", ] @@ -2137,9 +2072,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2148,59 +2083,42 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "value-bag" -version = "1.4.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", ] -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -2213,9 +2131,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -2225,9 +2143,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2235,9 +2153,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -2248,15 +2166,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -2270,44 +2188,13 @@ dependencies = [ "nom", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-targets 0.48.5", + "windows-sys 0.59.0", ] [[package]] @@ -2316,146 +2203,87 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" +name = "winnow" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 7dd59ecb42..a627abfc02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "uniffi_bindgen", + "uniffi_bindings", "uniffi_build", "uniffi_core", "uniffi_macros", @@ -67,7 +68,7 @@ members = [ "fixtures/type-limits", "fixtures/large-enum", "fixtures/large-error", - "fixtures/enum-types", + "fixtures/enum-types", "uniffi_bindings", ] resolver = "2" diff --git a/fixtures/benchmarks/Cargo.toml b/fixtures/benchmarks/Cargo.toml index 99ef9dc656..1380e9784b 100644 --- a/fixtures/benchmarks/Cargo.toml +++ b/fixtures/benchmarks/Cargo.toml @@ -18,8 +18,8 @@ criterion = "0.5.1" [build-dependencies] uniffi = { workspace = true, features = ["build"] } -[dev-dependencies] -uniffi_bindgen = {path = "../../uniffi_bindgen", features = ["bindgen-tests"]} +#[dev-dependencies] +#uniffi_bindings = {path = "../../uniffi_bindings", features = ["bindgen-tests"]} [[bench]] name = "benchmarks" diff --git a/fixtures/docstring-proc-macro/Cargo.toml b/fixtures/docstring-proc-macro/Cargo.toml index 2b150ab138..8463c1c67a 100644 --- a/fixtures/docstring-proc-macro/Cargo.toml +++ b/fixtures/docstring-proc-macro/Cargo.toml @@ -21,6 +21,7 @@ uniffi = { path = "../../uniffi", features = ["build"] } glob = "0.3" uniffi = { path = "../../uniffi", features = ["bindgen-tests"] } uniffi_bindgen = { path = "../../uniffi_bindgen" } +uniffi_bindings = { path = "../../uniffi_bindings" } uniffi_testing = { path = "../../uniffi_testing" } [features] diff --git a/fixtures/docstring-proc-macro/tests/test_generated_bindings.rs b/fixtures/docstring-proc-macro/tests/test_generated_bindings.rs index e06bfdc6b3..bb8d316581 100644 --- a/fixtures/docstring-proc-macro/tests/test_generated_bindings.rs +++ b/fixtures/docstring-proc-macro/tests/test_generated_bindings.rs @@ -6,7 +6,8 @@ uniffi::build_foreign_language_testcases!( #[cfg(test)] mod tests { - use uniffi_bindgen::{bindings::*, BindingGenerator}; + use uniffi_bindgen::BindingGenerator; + use uniffi_bindings::*; use uniffi_testing::UniFFITestHelper; const DOCSTRINGS: &[&str] = &[ diff --git a/fixtures/docstring/Cargo.toml b/fixtures/docstring/Cargo.toml index c6f167af38..505cb0098d 100644 --- a/fixtures/docstring/Cargo.toml +++ b/fixtures/docstring/Cargo.toml @@ -21,6 +21,7 @@ camino = "1.0.8" glob = "0.3" uniffi = { path = "../../uniffi", features = ["bindgen-tests"] } uniffi_bindgen = { path = "../../uniffi_bindgen" } +uniffi_bindings = { path = "../../uniffi_bindings" } uniffi_testing = { path = "../../uniffi_testing" } [features] diff --git a/fixtures/docstring/tests/test_generated_bindings.rs b/fixtures/docstring/tests/test_generated_bindings.rs index 51935674ac..1a15f25bbf 100644 --- a/fixtures/docstring/tests/test_generated_bindings.rs +++ b/fixtures/docstring/tests/test_generated_bindings.rs @@ -7,7 +7,8 @@ uniffi::build_foreign_language_testcases!( #[cfg(test)] mod tests { use camino::Utf8PathBuf; - use uniffi_bindgen::{bindings::*, BindingGenerator}; + use uniffi_bindgen::BindingGenerator; + use uniffi_bindings::*; use uniffi_testing::UniFFITestHelper; const DOCSTRINGS: &[&str] = &[ diff --git a/move-bindings.sh b/move-bindings.sh new file mode 100644 index 0000000000..f5de3c6591 --- /dev/null +++ b/move-bindings.sh @@ -0,0 +1,4 @@ +rm -rf uniffi_bindings/src +mv uniffi_bindgen/src/bindings uniffi_bindings/src +mv uniffi_bindings/src/mod.rs uniffi_bindings/src/lib.rs +mv uniffi_bindgen/src/backend uniffi_bindings/src/backend diff --git a/uniffi/Cargo.toml b/uniffi/Cargo.toml index 941aeef716..30d47a1cc2 100644 --- a/uniffi/Cargo.toml +++ b/uniffi/Cargo.toml @@ -15,6 +15,7 @@ readme = "../README.md" [dependencies] uniffi_bindgen = { path = "../uniffi_bindgen", version = "=0.28.2", optional = true } +uniffi_bindings = { path = "../uniffi_bindings", version = "=0.28.2", optional = true } uniffi_build = { path = "../uniffi_build", version = "=0.28.2", optional = true } uniffi_core = { path = "../uniffi_core", version = "=0.28.2" } uniffi_macros = { path = "../uniffi_macros", version = "=0.28.2" } @@ -29,21 +30,21 @@ trybuild = "1" [features] default = ["cargo-metadata"] # Printout tracing information on FFI calls. Useful for debugging issues with the bindings code. -ffi-trace = ["uniffi_core/ffi-trace", "uniffi_bindgen/ffi-trace"] +ffi-trace = ["uniffi_core/ffi-trace", "uniffi_bindings/ffi-trace"] # Support for features needed by the `build.rs` script. Enable this in your # `build-dependencies`. build = [ "dep:uniffi_build" ] # Support for `uniffi_bindgen::{generate_bindings, generate_component_scaffolding}`. # Enable this feature for your `uniffi-bindgen` binaries if you don't need the full CLI. -bindgen = ["dep:uniffi_bindgen"] -cargo-metadata = ["dep:cargo_metadata", "uniffi_bindgen?/cargo-metadata"] +bindgen = ["dep:uniffi_bindgen", "dep:uniffi_bindings"] +cargo-metadata = ["dep:cargo_metadata", "uniffi_bindgen?/cargo-metadata", "uniffi_bindings?/cargo-metadata"] # Support for `uniffi_bindgen_main()`. Enable this feature for your # `uniffi-bindgen` binaries. cli = [ "bindgen", "dep:clap", "dep:camino" ] # Support for running example/fixture tests for `uniffi-bindgen`. You probably # don't need to enable this. -bindgen-tests = [ "dep:uniffi_bindgen", "uniffi_bindgen/bindgen-tests" ] +bindgen-tests = [ "dep:uniffi_bindings", "uniffi_bindings/bindgen-tests" ] # Enable support for Tokio's futures. # This must still be opted into on a per-function basis using `#[uniffi::export(async_runtime = "tokio")]`. tokio = ["uniffi_core/tokio"] diff --git a/uniffi/src/cli/swift.rs b/uniffi/src/cli/swift.rs index a74cd9a7ef..a4e174a667 100644 --- a/uniffi/src/cli/swift.rs +++ b/uniffi/src/cli/swift.rs @@ -6,7 +6,7 @@ use anyhow::Result; use camino::Utf8PathBuf; use clap::{Args, Parser}; -use uniffi_bindgen::bindings::{generate_swift_bindings, SwiftBindingsOptions}; +use uniffi_bindings::{generate_swift_bindings, SwiftBindingsOptions}; #[derive(Debug, Parser)] #[command(version, about, long_about = None)] diff --git a/uniffi/src/cli/uniffi_bindgen.rs b/uniffi/src/cli/uniffi_bindgen.rs index e3d5cf41e9..8bf175a496 100644 --- a/uniffi/src/cli/uniffi_bindgen.rs +++ b/uniffi/src/cli/uniffi_bindgen.rs @@ -6,7 +6,7 @@ use anyhow::{bail, Context, Result}; use camino::Utf8PathBuf; use clap::{Parser, Subcommand}; use std::fmt; -use uniffi_bindgen::bindings::*; +use uniffi_bindings::*; /// Enumeration of all foreign language targets currently supported by our CLI. /// diff --git a/uniffi/src/lib.rs b/uniffi/src/lib.rs index 42b94c0438..2c74e5adbc 100644 --- a/uniffi/src/lib.rs +++ b/uniffi/src/lib.rs @@ -8,7 +8,7 @@ pub use uniffi_macros::*; #[cfg(feature = "cli")] mod cli; #[cfg(feature = "bindgen-tests")] -pub use uniffi_bindgen::bindings::{kotlin_test, python_test, ruby_test, swift_test}; +pub use uniffi_bindings::{kotlin_test, python_test, ruby_test, swift_test}; #[cfg(all(feature = "cargo-metadata", feature = "bindgen"))] pub use uniffi_bindgen::cargo_metadata::CrateConfigSupplier as CargoMetadataConfigSupplier; @@ -16,12 +16,13 @@ pub use uniffi_bindgen::cargo_metadata::CrateConfigSupplier as CargoMetadataConf pub use uniffi_bindgen::library_mode::generate_bindings as generate_bindings_library_mode; #[cfg(feature = "bindgen")] pub use uniffi_bindgen::{ - bindings::{ - KotlinBindingGenerator, PythonBindingGenerator, RubyBindingGenerator, SwiftBindingGenerator, - }, generate_bindings, generate_component_scaffolding, generate_component_scaffolding_for_crate, print_repr, }; +#[cfg(feature = "bindgen")] +pub use uniffi_bindings::{ + KotlinBindingGenerator, PythonBindingGenerator, RubyBindingGenerator, SwiftBindingGenerator, +}; #[cfg(feature = "build")] pub use uniffi_build::{generate_scaffolding, generate_scaffolding_for_crate}; #[cfg(feature = "bindgen-tests")] diff --git a/uniffi_bindgen/Cargo.toml b/uniffi_bindgen/Cargo.toml index d5d4c05c31..2bf0647b76 100644 --- a/uniffi_bindgen/Cargo.toml +++ b/uniffi_bindgen/Cargo.toml @@ -13,8 +13,6 @@ readme = "../README.md" [features] default = ["cargo-metadata"] cargo-metadata = ["dep:cargo_metadata"] -bindgen-tests = ["cargo-metadata", "dep:uniffi_testing"] -ffi-trace = ["uniffi_testing?/ffi-trace"] [dependencies] anyhow = "1" @@ -22,16 +20,10 @@ rinja = { version = "0.3", default-features = false, features = ["config"] } camino = "1.0.8" cargo_metadata = { version = "0.15", optional = true } fs-err = "2.7.0" -glob = "0.3" goblin = "0.8" heck = "0.5" once_cell = "1.12" -paste = "1.0" serde = { version = "1", features = ["derive"] } toml = "0.5" uniffi_meta = { path = "../uniffi_meta", version = "=0.28.2" } -uniffi_testing = { path = "../uniffi_testing", version = "=0.28.2", optional = true } uniffi_udl = { path = "../uniffi_udl", version = "=0.28.2" } -# Don't include the `unicode-linebreak` or `unicode-width` since that functionality isn't needed for -# docstrings. -textwrap = { version = "0.16", features=["smawk"], default-features = false } diff --git a/uniffi_bindgen/rinja.toml b/uniffi_bindgen/rinja.toml index a0aae5f41b..ede22a307c 100644 --- a/uniffi_bindgen/rinja.toml +++ b/uniffi_bindgen/rinja.toml @@ -1,21 +1,6 @@ [general] # Directories to search for templates, relative to the crate root. -dirs = [ "src/scaffolding/templates", "src/bindings/kotlin/templates", "src/bindings/python/templates", "src/bindings/swift/templates", "src/bindings/ruby/templates" ] - -[[syntax]] -name = "kt" - -[[syntax]] -name = "py" - -[[syntax]] -name = "swift" - -[[syntax]] -name = "c" +dirs = [ "src/scaffolding/templates" ] [[syntax]] name = "rs" - -[[syntax]] -name = "rb" diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/variant.rs b/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/variant.rs deleted file mode 100644 index c7673882d9..0000000000 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/variant.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -use super::{AsCodeType, CodeType, KotlinCodeOracle}; -use crate::interface::{ComponentInterface, Variant}; - -#[derive(Debug)] -pub(super) struct VariantCodeType { - pub v: Variant, -} - -impl CodeType for VariantCodeType { - fn type_label(&self, ci: &ComponentInterface) -> String { - KotlinCodeOracle.class_name(ci, self.v.name()) - } - - fn canonical_name(&self) -> String { - self.v.name().to_string() - } -} - -impl AsCodeType for Variant { - fn as_codetype(&self) -> Box { - Box::new(VariantCodeType { v: self.clone() }) - } -} - -impl AsCodeType for &Variant { - fn as_codetype(&self) -> Box { - Box::new(VariantCodeType { v: (*self).clone() }) - } -} diff --git a/uniffi_bindgen/src/lib.rs b/uniffi_bindgen/src/lib.rs index ab5317a57d..65af0780a4 100644 --- a/uniffi_bindgen/src/lib.rs +++ b/uniffi_bindgen/src/lib.rs @@ -100,8 +100,6 @@ use std::io::prelude::*; use std::io::ErrorKind; use std::process::Command; -pub mod backend; -pub mod bindings; pub mod interface; pub mod library_mode; pub mod macro_metadata; diff --git a/uniffi_bindings/Cargo.toml b/uniffi_bindings/Cargo.toml new file mode 100644 index 0000000000..fc50fed067 --- /dev/null +++ b/uniffi_bindings/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "uniffi_bindings" +description = "The builtin Kotlin/Python/Ruby/Swift bindings for UniFII" +documentation = "https://mozilla.github.io/uniffi-rs" +homepage = "https://mozilla.github.io/uniffi-rs" +repository = "https://github.com/mozilla/uniffi-rs" +version = "0.28.2" +license = "MPL-2.0" +edition = "2021" + +[features] +default=["bindgen-tests", "kotlin", "python", "ruby", "swift"] +bindgen-tests = ["cargo-metadata", "dep:uniffi_testing"] +cargo-metadata = ["dep:cargo_metadata"] +ffi-trace = ["uniffi_testing?/ffi-trace"] +kotlin = [] +python = [] +ruby = [] +swift = [] + +[dependencies] +anyhow = "1" +rinja = { version = "0.3", default-features = false, features = ["config"] } +camino = "1.0.8" +cargo_metadata = { version = "0.15", optional = true } +fs-err = "2.7.0" +glob = "0.3" +heck = "0.5" +once_cell = "1.12" +paste = "1.0" +serde = { version = "1", features = ["derive"] } +toml = "0.5" +# Don't include the `unicode-linebreak` or `unicode-width` since that functionality isn't needed for +# docstrings. +textwrap = { version = "0.16", features=["smawk"], default-features = false } +uniffi_bindgen = { path = "../uniffi_bindgen", version = "=0.28.2" } +uniffi_meta = { path = "../uniffi_meta", version = "=0.28.2" } +uniffi_testing = { path = "../uniffi_testing", version = "=0.28.2", optional = true } diff --git a/uniffi_bindings/rinja.toml b/uniffi_bindings/rinja.toml new file mode 100644 index 0000000000..ffa6cdb250 --- /dev/null +++ b/uniffi_bindings/rinja.toml @@ -0,0 +1,18 @@ +[general] +# Directories to search for templates, relative to the crate root. +dirs = [ "src/kotlin/templates", "src/python/templates", "src/swift/templates", "src/ruby/templates" ] + +[[syntax]] +name = "c" + +[[syntax]] +name = "kt" + +[[syntax]] +name = "py" + +[[syntax]] +name = "swift" + +[[syntax]] +name = "rb" diff --git a/uniffi_bindgen/src/bindings/README.md b/uniffi_bindings/src/README.md similarity index 100% rename from uniffi_bindgen/src/bindings/README.md rename to uniffi_bindings/src/README.md diff --git a/uniffi_bindgen/src/backend/config.rs b/uniffi_bindings/src/backend/config.rs similarity index 100% rename from uniffi_bindgen/src/backend/config.rs rename to uniffi_bindings/src/backend/config.rs diff --git a/uniffi_bindgen/src/backend/filters.rs b/uniffi_bindings/src/backend/filters.rs similarity index 87% rename from uniffi_bindgen/src/backend/filters.rs rename to uniffi_bindings/src/backend/filters.rs index 9a4cbf6293..fa6d35b90d 100644 --- a/uniffi_bindgen/src/backend/filters.rs +++ b/uniffi_bindings/src/backend/filters.rs @@ -4,8 +4,8 @@ //! Backend-agnostic rinja filters -use crate::interface::{ - AsType, CallbackInterface, ComponentInterface, Enum, FfiType, Function, Object, Record, +use uniffi_bindgen::interface::{ + AsType, CallbackInterface, ComponentInterface, Enum, FfiType, Object, Record, }; use rinja::Result; use std::fmt; @@ -49,12 +49,6 @@ pub fn get_record_definition<'a>(ci: &'a ComponentInterface, name: &str) -> Resu .ok_or_else(|| lookup_error!("record {name} not found")) } -/// Get a Function definition by name -pub fn get_function_definition<'a>(ci: &'a ComponentInterface, name: &str) -> Result<&'a Function> { - ci.get_function_definition(name) - .ok_or_else(|| lookup_error!("function {name} not found")) -} - /// Get an Object definition by name pub fn get_object_definition<'a>(ci: &'a ComponentInterface, name: &str) -> Result<&'a Object> { ci.get_object_definition(name) diff --git a/uniffi_bindgen/src/backend/mod.rs b/uniffi_bindings/src/backend/mod.rs similarity index 83% rename from uniffi_bindgen/src/backend/mod.rs rename to uniffi_bindings/src/backend/mod.rs index 26d928a2da..f8b4909176 100644 --- a/uniffi_bindgen/src/backend/mod.rs +++ b/uniffi_bindings/src/backend/mod.rs @@ -5,5 +5,5 @@ mod config; pub mod filters; -pub use crate::interface::{Literal, Type}; +pub use uniffi_bindgen::interface::{Literal, Type}; pub use config::TemplateExpression; diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/callback_interface.rs b/uniffi_bindings/src/kotlin/gen_kotlin/callback_interface.rs similarity index 95% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/callback_interface.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/callback_interface.rs index ae4bffc973..744791fc37 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/callback_interface.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/callback_interface.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use super::CodeType; -use crate::ComponentInterface; +use uniffi_bindgen::ComponentInterface; #[derive(Debug)] pub struct CallbackInterfaceCodeType { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/compounds.rs b/uniffi_bindings/src/kotlin/gen_kotlin/compounds.rs similarity index 98% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/compounds.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/compounds.rs index 8d075bbedb..473899f980 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/compounds.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/compounds.rs @@ -4,7 +4,7 @@ use super::{AsCodeType, CodeType}; use crate::backend::{Literal, Type}; -use crate::ComponentInterface; +use uniffi_bindgen::ComponentInterface; #[derive(Debug)] pub struct OptionalCodeType { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/custom.rs b/uniffi_bindings/src/kotlin/gen_kotlin/custom.rs similarity index 94% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/custom.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/custom.rs index f1b67e79ae..a3352e6537 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/custom.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/custom.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use super::CodeType; -use crate::ComponentInterface; +use uniffi_bindgen::ComponentInterface; #[derive(Debug)] pub struct CustomCodeType { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/enum_.rs b/uniffi_bindings/src/kotlin/gen_kotlin/enum_.rs similarity index 96% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/enum_.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/enum_.rs index f5300c10ee..6901ec0bdb 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/enum_.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/enum_.rs @@ -4,7 +4,7 @@ use super::CodeType; use crate::backend::Literal; -use crate::ComponentInterface; +use uniffi_bindgen::ComponentInterface; #[derive(Debug)] pub struct EnumCodeType { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/external.rs b/uniffi_bindings/src/kotlin/gen_kotlin/external.rs similarity index 94% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/external.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/external.rs index d55c78f760..8a928577aa 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/external.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/external.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use super::CodeType; -use crate::ComponentInterface; +use uniffi_bindgen::ComponentInterface; #[derive(Debug)] pub struct ExternalCodeType { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/miscellany.rs b/uniffi_bindings/src/kotlin/gen_kotlin/miscellany.rs similarity index 95% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/miscellany.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/miscellany.rs index 17331ff511..5cd26bc3bc 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/miscellany.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/miscellany.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use super::CodeType; -use crate::ComponentInterface; +use uniffi_bindgen::ComponentInterface; use paste::paste; macro_rules! impl_code_type_for_miscellany { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/mod.rs b/uniffi_bindings/src/kotlin/gen_kotlin/mod.rs similarity index 99% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/mod.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/mod.rs index bf5178a557..e87c539019 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/mod.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/mod.rs @@ -14,7 +14,7 @@ use serde::{Deserialize, Serialize}; use crate::backend::TemplateExpression; -use crate::interface::*; +use uniffi_bindgen::interface::*; mod callback_interface; mod compounds; @@ -25,7 +25,6 @@ mod miscellany; mod object; mod primitives; mod record; -mod variant; trait CodeType: Debug { /// The language specific label used to reference this type. This will be used in diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/object.rs b/uniffi_bindings/src/kotlin/gen_kotlin/object.rs similarity index 93% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/object.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/object.rs index 5a4305d14a..7a345e48d2 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/object.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/object.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use super::CodeType; -use crate::{interface::ObjectImpl, ComponentInterface}; +use uniffi_bindgen::{interface::ObjectImpl, ComponentInterface}; #[derive(Debug)] pub struct ObjectCodeType { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/primitives.rs b/uniffi_bindings/src/kotlin/gen_kotlin/primitives.rs similarity index 98% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/primitives.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/primitives.rs index 0bc5a5d99e..f3e9b42e6e 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/primitives.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/primitives.rs @@ -4,7 +4,7 @@ use super::CodeType; use crate::backend::Literal; -use crate::interface::{ComponentInterface, Radix, Type}; +use uniffi_bindgen::interface::{ComponentInterface, Radix, Type}; use paste::paste; fn render_literal(literal: &Literal, _ci: &ComponentInterface) -> String { diff --git a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/record.rs b/uniffi_bindings/src/kotlin/gen_kotlin/record.rs similarity index 93% rename from uniffi_bindgen/src/bindings/kotlin/gen_kotlin/record.rs rename to uniffi_bindings/src/kotlin/gen_kotlin/record.rs index 17781c2220..6d95b8b427 100644 --- a/uniffi_bindgen/src/bindings/kotlin/gen_kotlin/record.rs +++ b/uniffi_bindings/src/kotlin/gen_kotlin/record.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use super::CodeType; -use crate::ComponentInterface; +use uniffi_bindgen::ComponentInterface; #[derive(Debug)] pub struct RecordCodeType { diff --git a/uniffi_bindgen/src/bindings/kotlin/mod.rs b/uniffi_bindings/src/kotlin/mod.rs similarity index 97% rename from uniffi_bindgen/src/bindings/kotlin/mod.rs rename to uniffi_bindings/src/kotlin/mod.rs index 501f449da0..ae80d55074 100644 --- a/uniffi_bindgen/src/bindings/kotlin/mod.rs +++ b/uniffi_bindings/src/kotlin/mod.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use crate::{BindingGenerator, Component, GenerationSettings}; +use uniffi_bindgen::{BindingGenerator, Component, GenerationSettings}; use anyhow::Result; use camino::{Utf8Path, Utf8PathBuf}; use fs_err as fs; diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Async.kt b/uniffi_bindings/src/kotlin/templates/Async.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Async.kt rename to uniffi_bindings/src/kotlin/templates/Async.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/BooleanHelper.kt b/uniffi_bindings/src/kotlin/templates/BooleanHelper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/BooleanHelper.kt rename to uniffi_bindings/src/kotlin/templates/BooleanHelper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/ByteArrayHelper.kt b/uniffi_bindings/src/kotlin/templates/ByteArrayHelper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/ByteArrayHelper.kt rename to uniffi_bindings/src/kotlin/templates/ByteArrayHelper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/CallbackInterfaceImpl.kt b/uniffi_bindings/src/kotlin/templates/CallbackInterfaceImpl.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/CallbackInterfaceImpl.kt rename to uniffi_bindings/src/kotlin/templates/CallbackInterfaceImpl.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt b/uniffi_bindings/src/kotlin/templates/CallbackInterfaceRuntime.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt rename to uniffi_bindings/src/kotlin/templates/CallbackInterfaceRuntime.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt b/uniffi_bindings/src/kotlin/templates/CallbackInterfaceTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt rename to uniffi_bindings/src/kotlin/templates/CallbackInterfaceTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/CustomTypeTemplate.kt b/uniffi_bindings/src/kotlin/templates/CustomTypeTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/CustomTypeTemplate.kt rename to uniffi_bindings/src/kotlin/templates/CustomTypeTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/DurationHelper.kt b/uniffi_bindings/src/kotlin/templates/DurationHelper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/DurationHelper.kt rename to uniffi_bindings/src/kotlin/templates/DurationHelper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/EnumTemplate.kt b/uniffi_bindings/src/kotlin/templates/EnumTemplate.kt similarity index 88% rename from uniffi_bindgen/src/bindings/kotlin/templates/EnumTemplate.kt rename to uniffi_bindings/src/kotlin/templates/EnumTemplate.kt index 89427dd9c9..e3d182f3f6 100644 --- a/uniffi_bindgen/src/bindings/kotlin/templates/EnumTemplate.kt +++ b/uniffi_bindings/src/kotlin/templates/EnumTemplate.kt @@ -54,10 +54,11 @@ public object {{ e|ffi_converter_name }}: FfiConverterRustBuffer<{{ type_name }} sealed class {{ type_name }}{% if contains_object_references %}: Disposable {% endif %} { {% for variant in e.variants() -%} {%- call kt::docstring(variant, 4) %} + {%- let variant_name = self::KotlinCodeOracle.class_name(ci, variant.name()) %} {% if !variant.has_fields() -%} - object {{ variant|type_name(ci) }} : {{ type_name }}() + object {{ variant_name }} : {{ type_name }}() {% else -%} - data class {{ variant|type_name(ci) }}( + data class {{ variant_name }}( {%- for field in variant.fields() -%} {%- call kt::docstring(field, 8) %} val {% call kt::field_name(field, loop.index) %}: {{ field|type_name(ci) }}{% if loop.last %}{% else %}, {% endif %} @@ -73,7 +74,7 @@ sealed class {{ type_name }}{% if contains_object_references %}: Disposable {% e override fun destroy() { when(this) { {%- for variant in e.variants() %} - is {{ type_name }}.{{ variant|type_name(ci) }} -> { + is {{ type_name }}.{{ self::KotlinCodeOracle.class_name(ci, variant.name()) }} -> { {%- if variant.has_fields() %} {% call kt::destroy_fields(variant) %} {% else -%} @@ -94,7 +95,7 @@ public object {{ e|ffi_converter_name }} : FfiConverterRustBuffer<{{ type_name } override fun read(buf: ByteBuffer): {{ type_name }} { return when(buf.getInt()) { {%- for variant in e.variants() %} - {{ loop.index }} -> {{ type_name }}.{{ variant|type_name(ci) }}{% if variant.has_fields() %}( + {{ loop.index }} -> {{ type_name }}.{{ self::KotlinCodeOracle.class_name(ci, variant.name()) }}{% if variant.has_fields() %}( {% for field in variant.fields() -%} {{ field|read_fn }}(buf), {% endfor -%} @@ -106,7 +107,7 @@ public object {{ e|ffi_converter_name }} : FfiConverterRustBuffer<{{ type_name } override fun allocationSize(value: {{ type_name }}) = when(value) { {%- for variant in e.variants() %} - is {{ type_name }}.{{ variant|type_name(ci) }} -> { + is {{ type_name }}.{{ self::KotlinCodeOracle.class_name(ci, variant.name()) }} -> { // Add the size for the Int that specifies the variant plus the size needed for all fields ( 4UL @@ -121,7 +122,7 @@ public object {{ e|ffi_converter_name }} : FfiConverterRustBuffer<{{ type_name } override fun write(value: {{ type_name }}, buf: ByteBuffer) { when(value) { {%- for variant in e.variants() %} - is {{ type_name }}.{{ variant|type_name(ci) }} -> { + is {{ type_name }}.{{ self::KotlinCodeOracle.class_name(ci, variant.name()) }} -> { buf.putInt({{ loop.index }}) {%- for field in variant.fields() %} {{ field|write_fn }}(value.{%- call kt::field_name(field, loop.index) -%}, buf) diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/ErrorTemplate.kt b/uniffi_bindings/src/kotlin/templates/ErrorTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/ErrorTemplate.kt rename to uniffi_bindings/src/kotlin/templates/ErrorTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/ExternalTypeTemplate.kt b/uniffi_bindings/src/kotlin/templates/ExternalTypeTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/ExternalTypeTemplate.kt rename to uniffi_bindings/src/kotlin/templates/ExternalTypeTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/FfiConverterTemplate.kt b/uniffi_bindings/src/kotlin/templates/FfiConverterTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/FfiConverterTemplate.kt rename to uniffi_bindings/src/kotlin/templates/FfiConverterTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Float32Helper.kt b/uniffi_bindings/src/kotlin/templates/Float32Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Float32Helper.kt rename to uniffi_bindings/src/kotlin/templates/Float32Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Float64Helper.kt b/uniffi_bindings/src/kotlin/templates/Float64Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Float64Helper.kt rename to uniffi_bindings/src/kotlin/templates/Float64Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/HandleMap.kt b/uniffi_bindings/src/kotlin/templates/HandleMap.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/HandleMap.kt rename to uniffi_bindings/src/kotlin/templates/HandleMap.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Helpers.kt b/uniffi_bindings/src/kotlin/templates/Helpers.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Helpers.kt rename to uniffi_bindings/src/kotlin/templates/Helpers.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Int16Helper.kt b/uniffi_bindings/src/kotlin/templates/Int16Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Int16Helper.kt rename to uniffi_bindings/src/kotlin/templates/Int16Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Int32Helper.kt b/uniffi_bindings/src/kotlin/templates/Int32Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Int32Helper.kt rename to uniffi_bindings/src/kotlin/templates/Int32Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Int64Helper.kt b/uniffi_bindings/src/kotlin/templates/Int64Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Int64Helper.kt rename to uniffi_bindings/src/kotlin/templates/Int64Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Int8Helper.kt b/uniffi_bindings/src/kotlin/templates/Int8Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Int8Helper.kt rename to uniffi_bindings/src/kotlin/templates/Int8Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Interface.kt b/uniffi_bindings/src/kotlin/templates/Interface.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Interface.kt rename to uniffi_bindings/src/kotlin/templates/Interface.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/MapTemplate.kt b/uniffi_bindings/src/kotlin/templates/MapTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/MapTemplate.kt rename to uniffi_bindings/src/kotlin/templates/MapTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt b/uniffi_bindings/src/kotlin/templates/NamespaceLibraryTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt rename to uniffi_bindings/src/kotlin/templates/NamespaceLibraryTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/ObjectCleanerHelper.kt b/uniffi_bindings/src/kotlin/templates/ObjectCleanerHelper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/ObjectCleanerHelper.kt rename to uniffi_bindings/src/kotlin/templates/ObjectCleanerHelper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/ObjectCleanerHelperAndroid.kt b/uniffi_bindings/src/kotlin/templates/ObjectCleanerHelperAndroid.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/ObjectCleanerHelperAndroid.kt rename to uniffi_bindings/src/kotlin/templates/ObjectCleanerHelperAndroid.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/ObjectCleanerHelperJvm.kt b/uniffi_bindings/src/kotlin/templates/ObjectCleanerHelperJvm.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/ObjectCleanerHelperJvm.kt rename to uniffi_bindings/src/kotlin/templates/ObjectCleanerHelperJvm.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/ObjectTemplate.kt b/uniffi_bindings/src/kotlin/templates/ObjectTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/ObjectTemplate.kt rename to uniffi_bindings/src/kotlin/templates/ObjectTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/OptionalTemplate.kt b/uniffi_bindings/src/kotlin/templates/OptionalTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/OptionalTemplate.kt rename to uniffi_bindings/src/kotlin/templates/OptionalTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/README.md b/uniffi_bindings/src/kotlin/templates/README.md similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/README.md rename to uniffi_bindings/src/kotlin/templates/README.md diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/RecordTemplate.kt b/uniffi_bindings/src/kotlin/templates/RecordTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/RecordTemplate.kt rename to uniffi_bindings/src/kotlin/templates/RecordTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/RustBufferTemplate.kt b/uniffi_bindings/src/kotlin/templates/RustBufferTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/RustBufferTemplate.kt rename to uniffi_bindings/src/kotlin/templates/RustBufferTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/SequenceTemplate.kt b/uniffi_bindings/src/kotlin/templates/SequenceTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/SequenceTemplate.kt rename to uniffi_bindings/src/kotlin/templates/SequenceTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/StringHelper.kt b/uniffi_bindings/src/kotlin/templates/StringHelper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/StringHelper.kt rename to uniffi_bindings/src/kotlin/templates/StringHelper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/TimestampHelper.kt b/uniffi_bindings/src/kotlin/templates/TimestampHelper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/TimestampHelper.kt rename to uniffi_bindings/src/kotlin/templates/TimestampHelper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt b/uniffi_bindings/src/kotlin/templates/TopLevelFunctionTemplate.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt rename to uniffi_bindings/src/kotlin/templates/TopLevelFunctionTemplate.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/Types.kt b/uniffi_bindings/src/kotlin/templates/Types.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/Types.kt rename to uniffi_bindings/src/kotlin/templates/Types.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/UInt16Helper.kt b/uniffi_bindings/src/kotlin/templates/UInt16Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/UInt16Helper.kt rename to uniffi_bindings/src/kotlin/templates/UInt16Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/UInt32Helper.kt b/uniffi_bindings/src/kotlin/templates/UInt32Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/UInt32Helper.kt rename to uniffi_bindings/src/kotlin/templates/UInt32Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/UInt64Helper.kt b/uniffi_bindings/src/kotlin/templates/UInt64Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/UInt64Helper.kt rename to uniffi_bindings/src/kotlin/templates/UInt64Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/UInt8Helper.kt b/uniffi_bindings/src/kotlin/templates/UInt8Helper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/UInt8Helper.kt rename to uniffi_bindings/src/kotlin/templates/UInt8Helper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/macros.kt b/uniffi_bindings/src/kotlin/templates/macros.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/macros.kt rename to uniffi_bindings/src/kotlin/templates/macros.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/templates/wrapper.kt b/uniffi_bindings/src/kotlin/templates/wrapper.kt similarity index 100% rename from uniffi_bindgen/src/bindings/kotlin/templates/wrapper.kt rename to uniffi_bindings/src/kotlin/templates/wrapper.kt diff --git a/uniffi_bindgen/src/bindings/kotlin/test.rs b/uniffi_bindings/src/kotlin/test.rs similarity index 96% rename from uniffi_bindgen/src/bindings/kotlin/test.rs rename to uniffi_bindings/src/kotlin/test.rs index 5c7f0c9943..c9646f3f5a 100644 --- a/uniffi_bindgen/src/bindings/kotlin/test.rs +++ b/uniffi_bindings/src/kotlin/test.rs @@ -2,9 +2,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use crate::bindings::RunScriptOptions; -use crate::cargo_metadata::CrateConfigSupplier; -use crate::library_mode::generate_bindings; +use crate::RunScriptOptions; +use uniffi_bindgen::cargo_metadata::CrateConfigSupplier; +use uniffi_bindgen::library_mode::generate_bindings; use anyhow::{bail, Context, Result}; use camino::{Utf8Path, Utf8PathBuf}; use std::env; diff --git a/uniffi_bindgen/src/bindings/mod.rs b/uniffi_bindings/src/lib.rs similarity index 62% rename from uniffi_bindgen/src/bindings/mod.rs rename to uniffi_bindings/src/lib.rs index f76dea50b6..a6c2b43d6c 100644 --- a/uniffi_bindgen/src/bindings/mod.rs +++ b/uniffi_bindings/src/lib.rs @@ -7,20 +7,39 @@ //! This module contains all the code for generating foreign language bindings, //! along with some helpers for executing foreign language scripts or tests. +#[cfg(feature = "kotlin")] mod kotlin; +#[cfg(feature = "kotlin")] pub use kotlin::KotlinBindingGenerator; + +#[cfg(feature = "python")] mod python; +#[cfg(feature = "python")] pub use python::PythonBindingGenerator; + +#[cfg(feature = "ruby")] mod ruby; +#[cfg(feature = "ruby")] pub use ruby::RubyBindingGenerator; + +#[cfg(feature = "swift")] mod swift; +#[cfg(feature = "swift")] pub use swift::{generate_swift_bindings, SwiftBindingGenerator, SwiftBindingsOptions}; -#[cfg(feature = "bindgen-tests")] -pub use self::{ - kotlin::test as kotlin_test, python::test as python_test, ruby::test as ruby_test, - swift::test as swift_test, -}; +mod backend; + +#[cfg(all(feature = "bindgen-tests", feature = "kotlin"))] +pub use self::kotlin::test as kotlin_test; + +#[cfg(all(feature = "bindgen-tests", feature = "python"))] +pub use self::python::test as python_test; + +#[cfg(all(feature = "bindgen-tests", feature = "ruby"))] +pub use self::ruby::test as ruby_test; + +#[cfg(all(feature = "bindgen-tests", feature = "swift"))] +pub use self::swift::test as swift_test; #[cfg(feature = "bindgen-tests")] /// Mode for the `run_script` function defined for each language diff --git a/uniffi_bindgen/src/bindings/python/gen_python/callback_interface.rs b/uniffi_bindings/src/python/gen_python/callback_interface.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/callback_interface.rs rename to uniffi_bindings/src/python/gen_python/callback_interface.rs diff --git a/uniffi_bindgen/src/bindings/python/gen_python/compounds.rs b/uniffi_bindings/src/python/gen_python/compounds.rs similarity index 98% rename from uniffi_bindgen/src/bindings/python/gen_python/compounds.rs rename to uniffi_bindings/src/python/gen_python/compounds.rs index 16adeca9a5..2448496265 100644 --- a/uniffi_bindgen/src/bindings/python/gen_python/compounds.rs +++ b/uniffi_bindings/src/python/gen_python/compounds.rs @@ -5,7 +5,7 @@ use super::CodeType; use crate::{ backend::{Literal, Type}, - bindings::python::gen_python::AsCodeType, + python::gen_python::AsCodeType, }; #[derive(Debug)] diff --git a/uniffi_bindgen/src/bindings/python/gen_python/custom.rs b/uniffi_bindings/src/python/gen_python/custom.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/custom.rs rename to uniffi_bindings/src/python/gen_python/custom.rs diff --git a/uniffi_bindgen/src/bindings/python/gen_python/enum_.rs b/uniffi_bindings/src/python/gen_python/enum_.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/enum_.rs rename to uniffi_bindings/src/python/gen_python/enum_.rs diff --git a/uniffi_bindgen/src/bindings/python/gen_python/error.rs b/uniffi_bindings/src/python/gen_python/error.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/error.rs rename to uniffi_bindings/src/python/gen_python/error.rs diff --git a/uniffi_bindgen/src/bindings/python/gen_python/external.rs b/uniffi_bindings/src/python/gen_python/external.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/external.rs rename to uniffi_bindings/src/python/gen_python/external.rs diff --git a/uniffi_bindgen/src/bindings/python/gen_python/miscellany.rs b/uniffi_bindings/src/python/gen_python/miscellany.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/miscellany.rs rename to uniffi_bindings/src/python/gen_python/miscellany.rs diff --git a/uniffi_bindgen/src/bindings/python/gen_python/mod.rs b/uniffi_bindings/src/python/gen_python/mod.rs similarity index 99% rename from uniffi_bindgen/src/bindings/python/gen_python/mod.rs rename to uniffi_bindings/src/python/gen_python/mod.rs index c083ecf046..81650a82df 100644 --- a/uniffi_bindgen/src/bindings/python/gen_python/mod.rs +++ b/uniffi_bindings/src/python/gen_python/mod.rs @@ -15,8 +15,8 @@ use std::fmt::Debug; use crate::backend::TemplateExpression; -use crate::interface::*; -use crate::VisitMut; +use uniffi_bindgen::interface::*; +use uniffi_bindgen::VisitMut; mod callback_interface; mod compounds; diff --git a/uniffi_bindgen/src/bindings/python/gen_python/object.rs b/uniffi_bindings/src/python/gen_python/object.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/object.rs rename to uniffi_bindings/src/python/gen_python/object.rs diff --git a/uniffi_bindgen/src/bindings/python/gen_python/primitives.rs b/uniffi_bindings/src/python/gen_python/primitives.rs similarity index 98% rename from uniffi_bindgen/src/bindings/python/gen_python/primitives.rs rename to uniffi_bindings/src/python/gen_python/primitives.rs index 4b3edecad4..3cf913b31e 100644 --- a/uniffi_bindgen/src/bindings/python/gen_python/primitives.rs +++ b/uniffi_bindings/src/python/gen_python/primitives.rs @@ -4,7 +4,7 @@ use super::CodeType; use crate::backend::Literal; -use crate::interface::Radix; +use uniffi_bindgen::interface::Radix; use paste::paste; fn render_literal(literal: &Literal) -> String { diff --git a/uniffi_bindgen/src/bindings/python/gen_python/record.rs b/uniffi_bindings/src/python/gen_python/record.rs similarity index 100% rename from uniffi_bindgen/src/bindings/python/gen_python/record.rs rename to uniffi_bindings/src/python/gen_python/record.rs diff --git a/uniffi_bindgen/src/bindings/python/mod.rs b/uniffi_bindings/src/python/mod.rs similarity index 96% rename from uniffi_bindgen/src/bindings/python/mod.rs rename to uniffi_bindings/src/python/mod.rs index ca598baf56..a5c23f15c0 100644 --- a/uniffi_bindgen/src/bindings/python/mod.rs +++ b/uniffi_bindings/src/python/mod.rs @@ -10,7 +10,7 @@ use fs_err as fs; mod gen_python; #[cfg(feature = "bindgen-tests")] pub mod test; -use crate::{BindingGenerator, Component, GenerationSettings}; +use uniffi_bindgen::{BindingGenerator, Component, GenerationSettings}; use gen_python::{generate_python_bindings, Config}; diff --git a/uniffi_bindgen/src/bindings/python/templates/Async.py b/uniffi_bindings/src/python/templates/Async.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Async.py rename to uniffi_bindings/src/python/templates/Async.py diff --git a/uniffi_bindgen/src/bindings/python/templates/BooleanHelper.py b/uniffi_bindings/src/python/templates/BooleanHelper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/BooleanHelper.py rename to uniffi_bindings/src/python/templates/BooleanHelper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/BytesHelper.py b/uniffi_bindings/src/python/templates/BytesHelper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/BytesHelper.py rename to uniffi_bindings/src/python/templates/BytesHelper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceImpl.py b/uniffi_bindings/src/python/templates/CallbackInterfaceImpl.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceImpl.py rename to uniffi_bindings/src/python/templates/CallbackInterfaceImpl.py diff --git a/uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceRuntime.py b/uniffi_bindings/src/python/templates/CallbackInterfaceRuntime.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceRuntime.py rename to uniffi_bindings/src/python/templates/CallbackInterfaceRuntime.py diff --git a/uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceTemplate.py b/uniffi_bindings/src/python/templates/CallbackInterfaceTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceTemplate.py rename to uniffi_bindings/src/python/templates/CallbackInterfaceTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/CustomType.py b/uniffi_bindings/src/python/templates/CustomType.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/CustomType.py rename to uniffi_bindings/src/python/templates/CustomType.py diff --git a/uniffi_bindgen/src/bindings/python/templates/DurationHelper.py b/uniffi_bindings/src/python/templates/DurationHelper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/DurationHelper.py rename to uniffi_bindings/src/python/templates/DurationHelper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/EnumTemplate.py b/uniffi_bindings/src/python/templates/EnumTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/EnumTemplate.py rename to uniffi_bindings/src/python/templates/EnumTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/ErrorTemplate.py b/uniffi_bindings/src/python/templates/ErrorTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/ErrorTemplate.py rename to uniffi_bindings/src/python/templates/ErrorTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/ExternalTemplate.py b/uniffi_bindings/src/python/templates/ExternalTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/ExternalTemplate.py rename to uniffi_bindings/src/python/templates/ExternalTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Float32Helper.py b/uniffi_bindings/src/python/templates/Float32Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Float32Helper.py rename to uniffi_bindings/src/python/templates/Float32Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Float64Helper.py b/uniffi_bindings/src/python/templates/Float64Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Float64Helper.py rename to uniffi_bindings/src/python/templates/Float64Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/HandleMap.py b/uniffi_bindings/src/python/templates/HandleMap.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/HandleMap.py rename to uniffi_bindings/src/python/templates/HandleMap.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Helpers.py b/uniffi_bindings/src/python/templates/Helpers.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Helpers.py rename to uniffi_bindings/src/python/templates/Helpers.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Int16Helper.py b/uniffi_bindings/src/python/templates/Int16Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Int16Helper.py rename to uniffi_bindings/src/python/templates/Int16Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Int32Helper.py b/uniffi_bindings/src/python/templates/Int32Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Int32Helper.py rename to uniffi_bindings/src/python/templates/Int32Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Int64Helper.py b/uniffi_bindings/src/python/templates/Int64Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Int64Helper.py rename to uniffi_bindings/src/python/templates/Int64Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Int8Helper.py b/uniffi_bindings/src/python/templates/Int8Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Int8Helper.py rename to uniffi_bindings/src/python/templates/Int8Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/MapTemplate.py b/uniffi_bindings/src/python/templates/MapTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/MapTemplate.py rename to uniffi_bindings/src/python/templates/MapTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/NamespaceLibraryTemplate.py b/uniffi_bindings/src/python/templates/NamespaceLibraryTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/NamespaceLibraryTemplate.py rename to uniffi_bindings/src/python/templates/NamespaceLibraryTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/ObjectTemplate.py b/uniffi_bindings/src/python/templates/ObjectTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/ObjectTemplate.py rename to uniffi_bindings/src/python/templates/ObjectTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/OptionalTemplate.py b/uniffi_bindings/src/python/templates/OptionalTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/OptionalTemplate.py rename to uniffi_bindings/src/python/templates/OptionalTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Protocol.py b/uniffi_bindings/src/python/templates/Protocol.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Protocol.py rename to uniffi_bindings/src/python/templates/Protocol.py diff --git a/uniffi_bindgen/src/bindings/python/templates/README.md b/uniffi_bindings/src/python/templates/README.md similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/README.md rename to uniffi_bindings/src/python/templates/README.md diff --git a/uniffi_bindgen/src/bindings/python/templates/RecordTemplate.py b/uniffi_bindings/src/python/templates/RecordTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/RecordTemplate.py rename to uniffi_bindings/src/python/templates/RecordTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/RustBufferHelper.py b/uniffi_bindings/src/python/templates/RustBufferHelper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/RustBufferHelper.py rename to uniffi_bindings/src/python/templates/RustBufferHelper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/RustBufferTemplate.py b/uniffi_bindings/src/python/templates/RustBufferTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/RustBufferTemplate.py rename to uniffi_bindings/src/python/templates/RustBufferTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/SequenceTemplate.py b/uniffi_bindings/src/python/templates/SequenceTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/SequenceTemplate.py rename to uniffi_bindings/src/python/templates/SequenceTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/StringHelper.py b/uniffi_bindings/src/python/templates/StringHelper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/StringHelper.py rename to uniffi_bindings/src/python/templates/StringHelper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/TimestampHelper.py b/uniffi_bindings/src/python/templates/TimestampHelper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/TimestampHelper.py rename to uniffi_bindings/src/python/templates/TimestampHelper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/TopLevelFunctionTemplate.py b/uniffi_bindings/src/python/templates/TopLevelFunctionTemplate.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/TopLevelFunctionTemplate.py rename to uniffi_bindings/src/python/templates/TopLevelFunctionTemplate.py diff --git a/uniffi_bindgen/src/bindings/python/templates/Types.py b/uniffi_bindings/src/python/templates/Types.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/Types.py rename to uniffi_bindings/src/python/templates/Types.py diff --git a/uniffi_bindgen/src/bindings/python/templates/UInt16Helper.py b/uniffi_bindings/src/python/templates/UInt16Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/UInt16Helper.py rename to uniffi_bindings/src/python/templates/UInt16Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/UInt32Helper.py b/uniffi_bindings/src/python/templates/UInt32Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/UInt32Helper.py rename to uniffi_bindings/src/python/templates/UInt32Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/UInt64Helper.py b/uniffi_bindings/src/python/templates/UInt64Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/UInt64Helper.py rename to uniffi_bindings/src/python/templates/UInt64Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/UInt8Helper.py b/uniffi_bindings/src/python/templates/UInt8Helper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/UInt8Helper.py rename to uniffi_bindings/src/python/templates/UInt8Helper.py diff --git a/uniffi_bindgen/src/bindings/python/templates/macros.py b/uniffi_bindings/src/python/templates/macros.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/macros.py rename to uniffi_bindings/src/python/templates/macros.py diff --git a/uniffi_bindgen/src/bindings/python/templates/wrapper.py b/uniffi_bindings/src/python/templates/wrapper.py similarity index 100% rename from uniffi_bindgen/src/bindings/python/templates/wrapper.py rename to uniffi_bindings/src/python/templates/wrapper.py diff --git a/uniffi_bindgen/src/bindings/python/test.rs b/uniffi_bindings/src/python/test.rs similarity index 93% rename from uniffi_bindgen/src/bindings/python/test.rs rename to uniffi_bindings/src/python/test.rs index 39dbc9c136..a851de8158 100644 --- a/uniffi_bindgen/src/bindings/python/test.rs +++ b/uniffi_bindings/src/python/test.rs @@ -2,9 +2,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use crate::bindings::RunScriptOptions; -use crate::cargo_metadata::CrateConfigSupplier; -use crate::library_mode::generate_bindings; +use crate::RunScriptOptions; +use uniffi_bindgen::cargo_metadata::CrateConfigSupplier; +use uniffi_bindgen::library_mode::generate_bindings; use anyhow::{Context, Result}; use camino::Utf8Path; use std::env; diff --git a/uniffi_bindgen/src/bindings/ruby/gen_ruby/mod.rs b/uniffi_bindings/src/ruby/gen_ruby/mod.rs similarity index 99% rename from uniffi_bindgen/src/bindings/ruby/gen_ruby/mod.rs rename to uniffi_bindings/src/ruby/gen_ruby/mod.rs index 7fceb3ac1b..a106216661 100644 --- a/uniffi_bindgen/src/bindings/ruby/gen_ruby/mod.rs +++ b/uniffi_bindings/src/ruby/gen_ruby/mod.rs @@ -9,7 +9,7 @@ use heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase}; use serde::{Deserialize, Serialize}; use std::borrow::Borrow; -use crate::interface::*; +use uniffi_bindgen::interface::*; const RESERVED_WORDS: &[&str] = &[ "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else", diff --git a/uniffi_bindgen/src/bindings/ruby/gen_ruby/tests.rs b/uniffi_bindings/src/ruby/gen_ruby/tests.rs similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/gen_ruby/tests.rs rename to uniffi_bindings/src/ruby/gen_ruby/tests.rs diff --git a/uniffi_bindgen/src/bindings/ruby/mod.rs b/uniffi_bindings/src/ruby/mod.rs similarity index 96% rename from uniffi_bindgen/src/bindings/ruby/mod.rs rename to uniffi_bindings/src/ruby/mod.rs index 122a436067..d3e2dc9526 100644 --- a/uniffi_bindgen/src/bindings/ruby/mod.rs +++ b/uniffi_bindings/src/ruby/mod.rs @@ -4,7 +4,7 @@ use std::process::Command; -use crate::{BindingGenerator, Component, ComponentInterface, GenerationSettings}; +use uniffi_bindgen::{BindingGenerator, Component, ComponentInterface, GenerationSettings}; use anyhow::{Context, Result}; use fs_err as fs; diff --git a/uniffi_bindgen/src/bindings/ruby/templates/EnumTemplate.rb b/uniffi_bindings/src/ruby/templates/EnumTemplate.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/EnumTemplate.rb rename to uniffi_bindings/src/ruby/templates/EnumTemplate.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/ErrorTemplate.rb b/uniffi_bindings/src/ruby/templates/ErrorTemplate.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/ErrorTemplate.rb rename to uniffi_bindings/src/ruby/templates/ErrorTemplate.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/Helpers.rb b/uniffi_bindings/src/ruby/templates/Helpers.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/Helpers.rb rename to uniffi_bindings/src/ruby/templates/Helpers.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/NamespaceLibraryTemplate.rb b/uniffi_bindings/src/ruby/templates/NamespaceLibraryTemplate.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/NamespaceLibraryTemplate.rb rename to uniffi_bindings/src/ruby/templates/NamespaceLibraryTemplate.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/ObjectTemplate.rb b/uniffi_bindings/src/ruby/templates/ObjectTemplate.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/ObjectTemplate.rb rename to uniffi_bindings/src/ruby/templates/ObjectTemplate.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/RecordTemplate.rb b/uniffi_bindings/src/ruby/templates/RecordTemplate.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/RecordTemplate.rb rename to uniffi_bindings/src/ruby/templates/RecordTemplate.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/RustBufferBuilder.rb b/uniffi_bindings/src/ruby/templates/RustBufferBuilder.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/RustBufferBuilder.rb rename to uniffi_bindings/src/ruby/templates/RustBufferBuilder.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/RustBufferStream.rb b/uniffi_bindings/src/ruby/templates/RustBufferStream.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/RustBufferStream.rb rename to uniffi_bindings/src/ruby/templates/RustBufferStream.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/RustBufferTemplate.rb b/uniffi_bindings/src/ruby/templates/RustBufferTemplate.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/RustBufferTemplate.rb rename to uniffi_bindings/src/ruby/templates/RustBufferTemplate.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/TopLevelFunctionTemplate.rb b/uniffi_bindings/src/ruby/templates/TopLevelFunctionTemplate.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/TopLevelFunctionTemplate.rb rename to uniffi_bindings/src/ruby/templates/TopLevelFunctionTemplate.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/macros.rb b/uniffi_bindings/src/ruby/templates/macros.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/macros.rb rename to uniffi_bindings/src/ruby/templates/macros.rb diff --git a/uniffi_bindgen/src/bindings/ruby/templates/wrapper.rb b/uniffi_bindings/src/ruby/templates/wrapper.rb similarity index 100% rename from uniffi_bindgen/src/bindings/ruby/templates/wrapper.rb rename to uniffi_bindings/src/ruby/templates/wrapper.rb diff --git a/uniffi_bindgen/src/bindings/ruby/test.rs b/uniffi_bindings/src/ruby/test.rs similarity index 94% rename from uniffi_bindgen/src/bindings/ruby/test.rs rename to uniffi_bindings/src/ruby/test.rs index 47a3b68401..e29e60fd21 100644 --- a/uniffi_bindgen/src/bindings/ruby/test.rs +++ b/uniffi_bindings/src/ruby/test.rs @@ -2,8 +2,8 @@ License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use crate::cargo_metadata::CrateConfigSupplier; -use crate::library_mode::generate_bindings; +use uniffi_bindgen::cargo_metadata::CrateConfigSupplier; +use uniffi_bindgen::library_mode::generate_bindings; use anyhow::{bail, Context, Result}; use camino::Utf8Path; use std::env; diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/callback_interface.rs b/uniffi_bindings/src/swift/gen_swift/callback_interface.rs similarity index 100% rename from uniffi_bindgen/src/bindings/swift/gen_swift/callback_interface.rs rename to uniffi_bindings/src/swift/gen_swift/callback_interface.rs diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/compounds.rs b/uniffi_bindings/src/swift/gen_swift/compounds.rs similarity index 100% rename from uniffi_bindgen/src/bindings/swift/gen_swift/compounds.rs rename to uniffi_bindings/src/swift/gen_swift/compounds.rs diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/custom.rs b/uniffi_bindings/src/swift/gen_swift/custom.rs similarity index 100% rename from uniffi_bindgen/src/bindings/swift/gen_swift/custom.rs rename to uniffi_bindings/src/swift/gen_swift/custom.rs diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/enum_.rs b/uniffi_bindings/src/swift/gen_swift/enum_.rs similarity index 100% rename from uniffi_bindgen/src/bindings/swift/gen_swift/enum_.rs rename to uniffi_bindings/src/swift/gen_swift/enum_.rs diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/external.rs b/uniffi_bindings/src/swift/gen_swift/external.rs similarity index 100% rename from uniffi_bindgen/src/bindings/swift/gen_swift/external.rs rename to uniffi_bindings/src/swift/gen_swift/external.rs diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/miscellany.rs b/uniffi_bindings/src/swift/gen_swift/miscellany.rs similarity index 100% rename from uniffi_bindgen/src/bindings/swift/gen_swift/miscellany.rs rename to uniffi_bindings/src/swift/gen_swift/miscellany.rs diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/mod.rs b/uniffi_bindings/src/swift/gen_swift/mod.rs similarity index 99% rename from uniffi_bindgen/src/bindings/swift/gen_swift/mod.rs rename to uniffi_bindings/src/swift/gen_swift/mod.rs index 5afaa0598d..e3da321bb0 100644 --- a/uniffi_bindgen/src/bindings/swift/gen_swift/mod.rs +++ b/uniffi_bindings/src/swift/gen_swift/mod.rs @@ -17,7 +17,7 @@ use serde::{Deserialize, Serialize}; use super::Bindings; use crate::backend::TemplateExpression; -use crate::interface::*; +use uniffi_bindgen::interface::*; mod callback_interface; mod compounds; diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/object.rs b/uniffi_bindings/src/swift/gen_swift/object.rs similarity index 95% rename from uniffi_bindgen/src/bindings/swift/gen_swift/object.rs rename to uniffi_bindings/src/swift/gen_swift/object.rs index d4497a7b19..76dd1f9ccb 100644 --- a/uniffi_bindgen/src/bindings/swift/gen_swift/object.rs +++ b/uniffi_bindings/src/swift/gen_swift/object.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use super::CodeType; -use crate::interface::ObjectImpl; +use uniffi_bindgen::interface::ObjectImpl; #[derive(Debug)] pub struct ObjectCodeType { diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/primitives.rs b/uniffi_bindings/src/swift/gen_swift/primitives.rs similarity index 98% rename from uniffi_bindgen/src/bindings/swift/gen_swift/primitives.rs rename to uniffi_bindings/src/swift/gen_swift/primitives.rs index e0c670520e..dc4b91aba3 100644 --- a/uniffi_bindgen/src/bindings/swift/gen_swift/primitives.rs +++ b/uniffi_bindings/src/swift/gen_swift/primitives.rs @@ -4,7 +4,7 @@ use super::CodeType; use crate::backend::Literal; -use crate::interface::{Radix, Type}; +use uniffi_bindgen::interface::{Radix, Type}; use paste::paste; fn render_literal(literal: &Literal) -> String { diff --git a/uniffi_bindgen/src/bindings/swift/gen_swift/record.rs b/uniffi_bindings/src/swift/gen_swift/record.rs similarity index 100% rename from uniffi_bindgen/src/bindings/swift/gen_swift/record.rs rename to uniffi_bindings/src/swift/gen_swift/record.rs diff --git a/uniffi_bindgen/src/bindings/swift/mod.rs b/uniffi_bindings/src/swift/mod.rs similarity index 92% rename from uniffi_bindgen/src/bindings/swift/mod.rs rename to uniffi_bindings/src/swift/mod.rs index 9f69ea68d9..688bef531a 100644 --- a/uniffi_bindgen/src/bindings/swift/mod.rs +++ b/uniffi_bindings/src/swift/mod.rs @@ -4,7 +4,7 @@ //! # Swift bindings backend for UniFFI //! -//! This module generates Swift bindings from a [`crate::ComponentInterface`] definition, +//! This module generates Swift bindings from a [`uniffi_bindgen::ComponentInterface`] definition, //! using Swift's builtin support for loading C header files. //! //! Conceptually, the generated bindings are split into two Swift modules, one for the low-level @@ -17,7 +17,7 @@ //! * A Swift source file `example.swift` that imports the `exampleFFI` module and wraps it //! to provide the higher-level Swift API. //! -//! Most of the concepts in a [`crate::ComponentInterface`] have an obvious counterpart in Swift, +//! Most of the concepts in a [`uniffi_bindgen::ComponentInterface`] have an obvious counterpart in Swift, //! with the details documented in inline comments where appropriate. //! //! To handle lifting/lowering/serializing types across the FFI boundary, the Swift code @@ -29,7 +29,7 @@ //! * How to read from and write into a byte buffer. //! -use crate::{BindingGenerator, Component, GenerationSettings}; +use uniffi_bindgen::{BindingGenerator, Component, GenerationSettings}; use anyhow::{Context, Result}; use camino::Utf8PathBuf; use fs_err as fs; @@ -41,7 +41,7 @@ use gen_swift::{generate_bindings, generate_header, generate_modulemap, generate #[cfg(feature = "bindgen-tests")] pub mod test; -/// The Swift bindings generated from a [`crate::ComponentInterface`]. +/// The Swift bindings generated from a [`uniffi_bindgen::ComponentInterface`]. /// struct Bindings { /// The contents of the generated `.swift` file, as a string. @@ -132,7 +132,7 @@ impl BindingGenerator for SwiftBindingGenerator { pub fn generate_swift_bindings(options: SwiftBindingsOptions) -> Result<()> { #[cfg(feature = "cargo-metadata")] let config_supplier = { - use crate::cargo_metadata::CrateConfigSupplier; + use uniffi_bindgen::cargo_metadata::CrateConfigSupplier; let mut cmd = cargo_metadata::MetadataCommand::new(); if options.metadata_no_deps { cmd.no_deps(); @@ -141,12 +141,12 @@ pub fn generate_swift_bindings(options: SwiftBindingsOptions) -> Result<()> { CrateConfigSupplier::from(metadata) }; #[cfg(not(feature = "cargo-metadata"))] - let config_supplier = crate::EmptyCrateConfigSupplier; + let config_supplier = uniffi_bindgen::EmptyCrateConfigSupplier; fs::create_dir_all(&options.out_dir)?; let mut components = - crate::library_mode::find_components(&options.library_path, &config_supplier)? + uniffi_bindgen::library_mode::find_components(&options.library_path, &config_supplier)? // map the TOML configs into a our Config struct .into_iter() .map(|Component { ci, config }| { diff --git a/uniffi_bindgen/src/bindings/swift/templates/Async.swift b/uniffi_bindings/src/swift/templates/Async.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Async.swift rename to uniffi_bindings/src/swift/templates/Async.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/BooleanHelper.swift b/uniffi_bindings/src/swift/templates/BooleanHelper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/BooleanHelper.swift rename to uniffi_bindings/src/swift/templates/BooleanHelper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/BridgingHeaderTemplate.h b/uniffi_bindings/src/swift/templates/BridgingHeaderTemplate.h similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/BridgingHeaderTemplate.h rename to uniffi_bindings/src/swift/templates/BridgingHeaderTemplate.h diff --git a/uniffi_bindgen/src/bindings/swift/templates/CallbackInterfaceImpl.swift b/uniffi_bindings/src/swift/templates/CallbackInterfaceImpl.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/CallbackInterfaceImpl.swift rename to uniffi_bindings/src/swift/templates/CallbackInterfaceImpl.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/CallbackInterfaceRuntime.swift b/uniffi_bindings/src/swift/templates/CallbackInterfaceRuntime.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/CallbackInterfaceRuntime.swift rename to uniffi_bindings/src/swift/templates/CallbackInterfaceRuntime.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/CallbackInterfaceTemplate.swift b/uniffi_bindings/src/swift/templates/CallbackInterfaceTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/CallbackInterfaceTemplate.swift rename to uniffi_bindings/src/swift/templates/CallbackInterfaceTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/CustomType.swift b/uniffi_bindings/src/swift/templates/CustomType.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/CustomType.swift rename to uniffi_bindings/src/swift/templates/CustomType.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/DataHelper.swift b/uniffi_bindings/src/swift/templates/DataHelper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/DataHelper.swift rename to uniffi_bindings/src/swift/templates/DataHelper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/DurationHelper.swift b/uniffi_bindings/src/swift/templates/DurationHelper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/DurationHelper.swift rename to uniffi_bindings/src/swift/templates/DurationHelper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/EnumTemplate.swift b/uniffi_bindings/src/swift/templates/EnumTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/EnumTemplate.swift rename to uniffi_bindings/src/swift/templates/EnumTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/ErrorTemplate.swift b/uniffi_bindings/src/swift/templates/ErrorTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/ErrorTemplate.swift rename to uniffi_bindings/src/swift/templates/ErrorTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Float32Helper.swift b/uniffi_bindings/src/swift/templates/Float32Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Float32Helper.swift rename to uniffi_bindings/src/swift/templates/Float32Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Float64Helper.swift b/uniffi_bindings/src/swift/templates/Float64Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Float64Helper.swift rename to uniffi_bindings/src/swift/templates/Float64Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/HandleMap.swift b/uniffi_bindings/src/swift/templates/HandleMap.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/HandleMap.swift rename to uniffi_bindings/src/swift/templates/HandleMap.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Helpers.swift b/uniffi_bindings/src/swift/templates/Helpers.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Helpers.swift rename to uniffi_bindings/src/swift/templates/Helpers.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Int16Helper.swift b/uniffi_bindings/src/swift/templates/Int16Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Int16Helper.swift rename to uniffi_bindings/src/swift/templates/Int16Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Int32Helper.swift b/uniffi_bindings/src/swift/templates/Int32Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Int32Helper.swift rename to uniffi_bindings/src/swift/templates/Int32Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Int64Helper.swift b/uniffi_bindings/src/swift/templates/Int64Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Int64Helper.swift rename to uniffi_bindings/src/swift/templates/Int64Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Int8Helper.swift b/uniffi_bindings/src/swift/templates/Int8Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Int8Helper.swift rename to uniffi_bindings/src/swift/templates/Int8Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/MapTemplate.swift b/uniffi_bindings/src/swift/templates/MapTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/MapTemplate.swift rename to uniffi_bindings/src/swift/templates/MapTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/ModuleMapTemplate.modulemap b/uniffi_bindings/src/swift/templates/ModuleMapTemplate.modulemap similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/ModuleMapTemplate.modulemap rename to uniffi_bindings/src/swift/templates/ModuleMapTemplate.modulemap diff --git a/uniffi_bindgen/src/bindings/swift/templates/ObjectTemplate.swift b/uniffi_bindings/src/swift/templates/ObjectTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/ObjectTemplate.swift rename to uniffi_bindings/src/swift/templates/ObjectTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/OptionalTemplate.swift b/uniffi_bindings/src/swift/templates/OptionalTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/OptionalTemplate.swift rename to uniffi_bindings/src/swift/templates/OptionalTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Protocol.swift b/uniffi_bindings/src/swift/templates/Protocol.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Protocol.swift rename to uniffi_bindings/src/swift/templates/Protocol.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/RecordTemplate.swift b/uniffi_bindings/src/swift/templates/RecordTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/RecordTemplate.swift rename to uniffi_bindings/src/swift/templates/RecordTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/RustBufferTemplate.swift b/uniffi_bindings/src/swift/templates/RustBufferTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/RustBufferTemplate.swift rename to uniffi_bindings/src/swift/templates/RustBufferTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/SequenceTemplate.swift b/uniffi_bindings/src/swift/templates/SequenceTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/SequenceTemplate.swift rename to uniffi_bindings/src/swift/templates/SequenceTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/StringHelper.swift b/uniffi_bindings/src/swift/templates/StringHelper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/StringHelper.swift rename to uniffi_bindings/src/swift/templates/StringHelper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/TimestampHelper.swift b/uniffi_bindings/src/swift/templates/TimestampHelper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/TimestampHelper.swift rename to uniffi_bindings/src/swift/templates/TimestampHelper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/TopLevelFunctionTemplate.swift b/uniffi_bindings/src/swift/templates/TopLevelFunctionTemplate.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/TopLevelFunctionTemplate.swift rename to uniffi_bindings/src/swift/templates/TopLevelFunctionTemplate.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/Types.swift b/uniffi_bindings/src/swift/templates/Types.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/Types.swift rename to uniffi_bindings/src/swift/templates/Types.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/UInt16Helper.swift b/uniffi_bindings/src/swift/templates/UInt16Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/UInt16Helper.swift rename to uniffi_bindings/src/swift/templates/UInt16Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/UInt32Helper.swift b/uniffi_bindings/src/swift/templates/UInt32Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/UInt32Helper.swift rename to uniffi_bindings/src/swift/templates/UInt32Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/UInt64Helper.swift b/uniffi_bindings/src/swift/templates/UInt64Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/UInt64Helper.swift rename to uniffi_bindings/src/swift/templates/UInt64Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/UInt8Helper.swift b/uniffi_bindings/src/swift/templates/UInt8Helper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/UInt8Helper.swift rename to uniffi_bindings/src/swift/templates/UInt8Helper.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/macros.swift b/uniffi_bindings/src/swift/templates/macros.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/macros.swift rename to uniffi_bindings/src/swift/templates/macros.swift diff --git a/uniffi_bindgen/src/bindings/swift/templates/wrapper.swift b/uniffi_bindings/src/swift/templates/wrapper.swift similarity index 100% rename from uniffi_bindgen/src/bindings/swift/templates/wrapper.swift rename to uniffi_bindings/src/swift/templates/wrapper.swift diff --git a/uniffi_bindgen/src/bindings/swift/test.rs b/uniffi_bindings/src/swift/test.rs similarity index 98% rename from uniffi_bindgen/src/bindings/swift/test.rs rename to uniffi_bindings/src/swift/test.rs index 9a2a5a7de9..b988252508 100644 --- a/uniffi_bindgen/src/bindings/swift/test.rs +++ b/uniffi_bindings/src/swift/test.rs @@ -2,9 +2,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use crate::bindings::RunScriptOptions; -use crate::cargo_metadata::CrateConfigSupplier; -use crate::library_mode::generate_bindings; +use crate::RunScriptOptions; +use uniffi_bindgen::cargo_metadata::CrateConfigSupplier; +use uniffi_bindgen::library_mode::generate_bindings; use anyhow::{bail, Context, Result}; use camino::{Utf8Path, Utf8PathBuf};