diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..b086373 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,3 @@ +# vim: ft=toml +[build] +target-dir = "out/target" diff --git a/blog/.env b/.env similarity index 56% rename from blog/.env rename to .env index ae5a3dd..9cacc63 100644 --- a/blog/.env +++ b/.env @@ -1,2 +1,2 @@ # This file is used by diesel to find the development database -DATABASE_URL=postgres://rb:rb@localhost:5433/rb +DATABASE_URL=postgres://rb:rb@localhost/rb diff --git a/Cargo.lock b/Cargo.lock index 546bfad..b42398b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "arrayref" version = "0.3.6" @@ -125,15 +116,11 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blog" -version = "0.1.0" - [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" [[package]] name = "byteorder" @@ -143,15 +130,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "cc" -version = "1.0.71" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" [[package]] name = "cfg-if" @@ -169,7 +156,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time 0.1.43", + "time 0.1.44", "winapi", ] @@ -198,9 +185,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" dependencies = [ "libc", ] @@ -260,9 +247,9 @@ dependencies = [ [[package]] name = "diesel" -version = "1.4.8" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28135ecf6b7d446b43e27e225622a038cc4e2930a1022f51cdb97ada19b8e4d" +checksum = "bba51ca66f57261fd17cadf8b73e4775cc307d0521d855de3f5de91a8f074e0e" dependencies = [ "bitflags", "byteorder", @@ -323,9 +310,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.29" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" +checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" dependencies = [ "cfg-if", ] @@ -368,9 +355,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" dependencies = [ "futures-channel", "futures-core", @@ -383,9 +370,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" dependencies = [ "futures-core", "futures-sink", @@ -393,15 +380,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" dependencies = [ "futures-core", "futures-task", @@ -410,15 +397,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" dependencies = [ "autocfg", "proc-macro-hack", @@ -429,21 +416,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" dependencies = [ "autocfg", "futures-channel", @@ -502,9 +489,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "h2" -version = "0.3.7" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd819562fcebdac5afc5c113c3ec36f902840b70fd4fc458799c8ce4607ae55" +checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726" dependencies = [ "bytes", "fnv", @@ -546,9 +533,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ "bytes", "fnv", @@ -557,9 +544,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" dependencies = [ "bytes", "http", @@ -568,9 +555,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68" [[package]] name = "httpdate" @@ -580,9 +567,9 @@ checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" [[package]] name = "hyper" -version = "0.14.14" +version = "0.14.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b91bb1f221b6ea1f1e4371216b70f40748774c2fb5971b450c07773fb92d26b" +checksum = "0b61cf2d1aebcf6e6352c97b81dc2244ca29194be1b276f5d8ad5c6330fffb11" dependencies = [ "bytes", "futures-channel", @@ -621,18 +608,18 @@ checksum = "3094308123a0e9fd59659ce45e22de9f53fc1d2ac6e1feb9fef988e4f76cad77" [[package]] name = "instant" -version = "0.1.12" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" dependencies = [ "cfg-if", ] [[package]] name = "itoa" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "jwt" @@ -657,9 +644,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.105" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "869d572136620d55835903746bcb5cdc54cb2851fd0aeec53220b4bb65ef3013" +checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765" [[package]] name = "libmimalloc-sys" @@ -678,9 +665,9 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" dependencies = [ "scopeguard", ] @@ -696,26 +683,15 @@ dependencies = [ [[package]] name = "loom" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b9df80a3804094bf49bb29881d18f6f05048db72127e84e09c26fc7c2324f5" +checksum = "2111607c723d7857e0d8299d5ce7a0bf4b844d3e44f8de136b13da513eaf8fc4" dependencies = [ "cfg-if", "generator", "scoped-tls", "serde", "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "matchers" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" -dependencies = [ - "regex-automata", ] [[package]] @@ -762,9 +738,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mio" -version = "0.7.14" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" dependencies = [ "libc", "log", @@ -868,9 +844,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.67" +version = "0.9.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69df2d8dfc6ce3aaf44b40dec6f487d5a886516cf6879c49e98e0710f310a058" +checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82" dependencies = [ "autocfg", "cc", @@ -881,9 +857,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", "lock_api", @@ -892,9 +868,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ "cfg-if", "instant", @@ -947,15 +923,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.22" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" +checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "pq-sys" @@ -980,9 +956,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.30" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" +checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" dependencies = [ "unicode-xid", ] @@ -1002,9 +978,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.10" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ "proc-macro2", ] @@ -1060,35 +1036,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "rb" -version = "0.1.0" -dependencies = [ - "base64", - "chrono", - "diesel", - "diesel_migrations", - "figment", - "hmac", - "jwt", - "mimalloc", - "openssl", - "rand", - "rocket", - "rocket_sync_db_pools", - "rust-argon2", - "serde", - "sha2", - "uuid", -] - -[[package]] -name = "rb-gw" -version = "0.1.0" -dependencies = [ - "rb", -] - [[package]] name = "redox_syscall" version = "0.2.10" @@ -1118,30 +1065,6 @@ dependencies = [ "syn", ] -[[package]] -name = "regex" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - [[package]] name = "remove_dir_all" version = "0.5.3" @@ -1287,6 +1210,28 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" +[[package]] +name = "rusty-bever" +version = "0.1.0" +dependencies = [ + "base64", + "chrono", + "diesel", + "diesel_migrations", + "figment", + "hmac", + "jwt", + "mimalloc", + "openssl", + "rand", + "rocket", + "rocket_sync_db_pools", + "rust-argon2", + "serde", + "sha2", + "uuid", +] + [[package]] name = "ryu" version = "1.0.5" @@ -1331,18 +1276,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" dependencies = [ "proc-macro2", "quote", @@ -1351,9 +1296,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.68" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" dependencies = [ "itoa", "ryu", @@ -1362,12 +1307,12 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.21" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af" +checksum = "039ba818c784248423789eec090aab9fb566c7b94d6ebbfa1814a9fd52c8afb2" dependencies = [ "dtoa", - "indexmap", + "linked-hash-map", "serde", "yaml-rust", ] @@ -1380,9 +1325,9 @@ checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" [[package]] name = "sha2" -version = "0.9.8" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ "block-buffer", "cfg-if", @@ -1391,15 +1336,6 @@ dependencies = [ "opaque-debug", ] -[[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -1411,21 +1347,21 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" [[package]] name = "smallvec" -version = "1.7.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" -version = "0.4.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" dependencies = [ "libc", "winapi", @@ -1521,9 +1457,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.80" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" +checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c" dependencies = [ "proc-macro2", "quote", @@ -1544,22 +1480,14 @@ dependencies = [ "winapi", ] -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi", "winapi", ] @@ -1603,9 +1531,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.12.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" +checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b" dependencies = [ "autocfg", "bytes", @@ -1622,9 +1550,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.5.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2dd85aeaba7b68df939bd357c6afb36c87951be9e80bf9c859f2fc3e9fca0fd" +checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" dependencies = [ "proc-macro2", "quote", @@ -1644,9 +1572,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.8" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" +checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" dependencies = [ "bytes", "futures-core", @@ -1673,79 +1601,24 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ "cfg-if", "pin-project-lite", - "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-attributes" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" dependencies = [ "lazy_static", ] -[[package]] -name = "tracing-log" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-serde" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" -dependencies = [ - "ansi_term", - "chrono", - "lazy_static", - "matchers", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", -] - [[package]] name = "try-lock" version = "0.2.3" @@ -1764,9 +1637,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.14.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" [[package]] name = "ubyte" @@ -1832,15 +1705,15 @@ dependencies = [ [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "b608ecc8f4198fe8680e2ed18eccab5f0cd4caaf3d83516fa5fb2e927fda2586" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1848,9 +1721,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "580aa3a91a63d23aac5b6b267e2d13cb4f363e31dce6c352fca4752ae12e479f" dependencies = [ "bumpalo", "lazy_static", @@ -1863,9 +1736,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "171ebf0ed9e1458810dfcb31f2e766ad6b3a89dbda42d8901f2b268277e5f09c" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1873,9 +1746,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "6c2657dd393f03aa2a659c25c6ae18a13a4048cebd220e147933ea837efc589f" dependencies = [ "proc-macro2", "quote", @@ -1886,9 +1759,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "2e0c4a743a309662d45f4ede961d7afa4ba4131a59a639f29b0069c3798bbcc2" [[package]] name = "winapi" diff --git a/Cargo.toml b/Cargo.toml index d108a8f..53cc5fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,49 @@ -[workspace] -members = [ - "common", - "gw", - "blog", -] +[package] +name = "rusty-bever" +version = "0.1.0" +authors = ["Jef Roosens "] +edition = "2018" +[[bin]] +name = "rbd" +path = "src/main.rs" + +[features] +web = [] +docs = [] +static = ["web", "docs"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +# Backend web framework +rocket = { version = "0.5.0-rc.1", features = [ "json", "uuid" ] } +# Used to provide Rocket routes with database connections +rocket_sync_db_pools = { version = "0.1.0-rc.1", default_features = false, features = [ "diesel_postgres_pool" ] } +# Used to (de)serialize JSON +serde = { version = "1.0.127", features = [ "derive" ] } +# ORM +diesel = { version = "1.4.7", features = ["postgres", "uuidv07", "chrono"] } +diesel_migrations = "1.4.0" +# To properly compile libpq statically +openssl = "0.10.36" +# For password hashing & verification +rust-argon2 = "0.8.3" +rand = "0.8.4" +uuid = { version = "0.8.2", features = ["serde"] } +# Authentification +jwt = "0.14.0" +hmac = "*" +sha2 = "*" +# Timestamps for JWT tokens +chrono = { version = "*", features = [ "serde" ] } +# Encoding of refresh tokens +base64 = "0.13.0" +# Reading in configuration files +figment = { version = "*", features = [ "yaml" ] } +mimalloc = { version = "0.1.26", default_features = false } + +[profile.release] +lto = "fat" +panic = "abort" +codegen-units = 1 diff --git a/Dockerfile b/Dockerfile index 5f2326d..72638d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ -# syntax = docker/dockerfile:1.2 # Build frontend files FROM node:16 AS fbuilder @@ -23,8 +22,7 @@ RUN apk update && \ postgresql \ postgresql-dev \ openssl-dev \ - build-base \ - curl bash + build-base WORKDIR /usr/src/app @@ -34,12 +32,7 @@ COPY src/ ./src COPY migrations/ ./migrations COPY Cargo.toml Cargo.lock ./ -RUN \ - --mount=type=cache,target=/usr/src/app/out \ - --mount=type=cache,target=/root/.cargo \ - cargo build --release && \ - mkdir bin && \ - cp out/target/release/rbd bin && \ +RUN cargo build --release && \ cargo doc --no-deps # Build dumb-init @@ -47,19 +40,17 @@ RUN curl -sSL "https://github.com/Yelp/dumb-init/archive/refs/tags/v$DI_VER.tar. tar -xzf - && \ cd "dumb-init-$DI_VER" && \ make build && \ - mv dumb-init ../bin + mv dumb-init .. FROM alpine:3.14.2 -RUN apk add --no-cache openssl libpq postgresql-dev && \ - mkdir -p /var/www/html +RUN mkdir -p /var/www/html COPY --from=fbuilder /usr/src/app/dist /var/www/html/site -# COPY --from=builder /usr/src/app/out/target/doc /var/www/html/doc -COPY --from=builder /usr/src/app/bin/* /usr/bin/ - -WORKDIR / +COPY --from=builder /usr/src/app/out/target/doc /var/www/html/doc +COPY --from=builder /usr/src/app/out/target/release/rbd /usr/bin/rbd +COPY --from=builder /usr/src/app/dumb-init /usr/bin/dumb-init ENTRYPOINT [ "dumb-init", "--" ] CMD [ "/usr/bin/rbd" ] diff --git a/Rb.yaml b/Rb.yaml index 845bc55..db78338 100644 --- a/Rb.yaml +++ b/Rb.yaml @@ -40,4 +40,4 @@ release: databases: postgres_rb: - url: "postgres://rb:rb@db:5432/rb" + url: "postgres://rb:rb@localhost:5432/rb" diff --git a/blog/Cargo.toml b/blog/Cargo.toml deleted file mode 100644 index 0292740..0000000 --- a/blog/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "blog" -version = "0.1.0" -edition = "2018" - -[lib] -name = "rb_blog" -path = "src/lib.rs" - -[[bin]] -name = "rb-blog" -path = "src/main.rs" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/blog/src/lib.rs b/blog/src/lib.rs deleted file mode 100644 index e69de29..0000000 diff --git a/blog/src/schema.rs b/blog/src/schema.rs deleted file mode 100644 index e69de29..0000000 diff --git a/common/Cargo.toml b/common/Cargo.toml deleted file mode 100644 index 920246e..0000000 --- a/common/Cargo.toml +++ /dev/null @@ -1,49 +0,0 @@ -[package] -name = "rb" -version = "0.1.0" -authors = ["Jef Roosens "] -edition = "2018" - -[lib] -name = "rb" -path = "src/lib.rs" - -# [features] -# web = [] -# docs = [] -# static = ["web", "docs"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -# Backend web framework -rocket = { version = "0.5.0-rc.1", features = [ "json", "uuid" ] } -# Used to provide Rocket routes with database connections -rocket_sync_db_pools = { version = "0.1.0-rc.1", default_features = false, features = [ "diesel_postgres_pool" ] } -# Used to (de)serialize JSON -serde = { version = "1.0.127", features = [ "derive" ] } -# ORM -diesel = { version = "1.4.7", features = ["postgres", "uuidv07", "chrono"] } -diesel_migrations = "1.4.0" -# To properly compile libpq statically -openssl = "0.10.36" -# For password hashing & verification -rust-argon2 = "0.8.3" -rand = "0.8.4" -uuid = { version = "0.8.2", features = ["serde"] } -# Authentification -jwt = "0.14.0" -hmac = "*" -sha2 = "*" -# Timestamps for JWT tokens -chrono = { version = "*", features = [ "serde" ] } -# Encoding of refresh tokens -base64 = "0.13.0" -# Reading in configuration files -figment = { version = "*", features = [ "yaml" ] } -mimalloc = { version = "0.1.26", default_features = false } - -# [profile.release] -# lto = "fat" -# panic = "abort" -# codegen-units = 1 diff --git a/common/src/lib.rs b/common/src/lib.rs deleted file mode 100644 index 0bcba72..0000000 --- a/common/src/lib.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[macro_use] -extern crate diesel; - -pub mod auth; -pub mod db; -pub mod errors; -pub mod guards; -pub(crate) mod schema; diff --git a/blog/diesel.toml b/diesel.toml similarity index 100% rename from blog/diesel.toml rename to diesel.toml diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..84f8657 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,27 @@ +version: '3' + +services: + app: + build: + context: '.' + dockerfile: 'docker/test/Dockerfile' + + image: 'rb-builder:1.54' + command: "${CMD}" + + working_dir: "/usr/src/app" + + volumes: + - '$PWD:/usr/src/app' + - 'cache:/usr/src/app/out' + + db: + image: 'postgres:13-alpine' + + environment: + - 'POSTGRES_DB=rb' + - 'POSTGRES_USER=rb' + - 'POSTGRES_PASSWORD=rb' + +volumes: + cache: diff --git a/docker-compose.yml b/docker-compose.yml index 9b6e6c2..522fe33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,26 +2,18 @@ version: '3' services: - db-gw: - image: 'postgres:14-alpine' + db: + image: 'postgres:13-alpine' restart: 'always' environment: + - 'POSTGRES_DB=rb' - 'POSTGRES_USER=rb' - 'POSTGRES_PASSWORD=rb' ports: - '5432:5432' - # volumes: - # - 'db-data:/var/lib/postgresql/data' - db-blog: - image: 'postgres:14-alpine' - restart: 'always' + volumes: + - 'db-data:/var/lib/postgresql/data' - environment: - - 'POSTGRES_USER=rb' - - 'POSTGRES_PASSWORD=rb' - ports: - - '5433:5432' - -# volumes: -# db-data: +volumes: + db-data: diff --git a/docker/Dockerfile.builder b/docker/Dockerfile.builder new file mode 100644 index 0000000..5c87d30 --- /dev/null +++ b/docker/Dockerfile.builder @@ -0,0 +1,28 @@ +# vim: ft=dockerfile +FROM rust:1.54 + +ENV PREFIX="/usr/src/out/prefix" \ + CC="musl-gcc -fPIC -pie -static" \ + LD_LIBRARY_PATH="$PREFIX" \ + PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \ + PATH="/usr/local/bin:/root/.cargo/bin:$PATH" + +WORKDIR /usr/src/app + +RUN groupadd -g 1000 builder && \ + useradd -u 1000 -g 1000 builder && \ + mkdir -p "$PREFIX" && \ + chown -R builder:builder /usr/src/app && \ + apt update && \ + apt install -y --no-install-recommends \ + musl-dev \ + musl-tools \ + libpq-dev \ + libssl-dev && \ + rustup target add x86_64-unknown-linux-musl && \ + echo "$PREFIX/lib" >> /etc/ld-musl-x86_64.path + + +USER builder + +CMD ["cargo", "test"] diff --git a/gw/.env b/gw/.env deleted file mode 100644 index 1ed17a2..0000000 --- a/gw/.env +++ /dev/null @@ -1,2 +0,0 @@ -# This file is used by diesel to find the development database -DATABASE_URL=postgres://rb:rb@localhost:5432/rb diff --git a/gw/Cargo.lock b/gw/Cargo.lock deleted file mode 100644 index 90d82b8..0000000 --- a/gw/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "rb-gw" -version = "0.1.0" diff --git a/gw/Cargo.toml b/gw/Cargo.toml deleted file mode 100644 index 99852d4..0000000 --- a/gw/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "rb-gw" -version = "0.1.0" -edition = "2018" - -[lib] -name = "rb_gw" -path = "src/lib.rs" - -[[bin]] -name = "rb-gw" -path = "src/main.rs" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] - -rb = { path = "../common" } diff --git a/gw/diesel.toml b/gw/diesel.toml deleted file mode 100644 index 92267c8..0000000 --- a/gw/diesel.toml +++ /dev/null @@ -1,5 +0,0 @@ -# For documentation on how to configure this file, -# see diesel.rs/guides/configuring-diesel-cli - -[print_schema] -file = "src/schema.rs" diff --git a/gw/src/main.rs b/gw/src/main.rs deleted file mode 100644 index a4f2e4f..0000000 --- a/gw/src/main.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() -{ - println!("Hello, world!"); -} diff --git a/gw/src/schema.rs b/gw/src/schema.rs deleted file mode 100644 index d8b585e..0000000 --- a/gw/src/schema.rs +++ /dev/null @@ -1,49 +0,0 @@ -table! { - posts (id) { - id -> Uuid, - section_id -> Uuid, - title -> Nullable, - publish_date -> Date, - content -> Text, - } -} - -table! { - refresh_tokens (token) { - token -> Bytea, - user_id -> Uuid, - expires_at -> Timestamp, - last_used_at -> Nullable, - } -} - -table! { - sections (id) { - id -> Uuid, - title -> Varchar, - shortname -> Varchar, - description -> Nullable, - is_default -> Bool, - has_titles -> Bool, - } -} - -table! { - users (id) { - id -> Uuid, - username -> Varchar, - password -> Text, - blocked -> Bool, - admin -> Bool, - } -} - -joinable!(posts -> sections (section_id)); -joinable!(refresh_tokens -> users (user_id)); - -allow_tables_to_appear_in_same_query!( - posts, - refresh_tokens, - sections, - users, -); diff --git a/blog/migrations/.gitkeep b/migrations/.gitkeep similarity index 100% rename from blog/migrations/.gitkeep rename to migrations/.gitkeep diff --git a/blog/migrations/00000000000000_diesel_initial_setup/down.sql b/migrations/00000000000000_diesel_initial_setup/down.sql similarity index 100% rename from blog/migrations/00000000000000_diesel_initial_setup/down.sql rename to migrations/00000000000000_diesel_initial_setup/down.sql diff --git a/blog/migrations/00000000000000_diesel_initial_setup/up.sql b/migrations/00000000000000_diesel_initial_setup/up.sql similarity index 100% rename from blog/migrations/00000000000000_diesel_initial_setup/up.sql rename to migrations/00000000000000_diesel_initial_setup/up.sql diff --git a/blog/migrations/2021-08-20-110251_users-and-auth/down.sql b/migrations/2021-08-20-110251_users-and-auth/down.sql similarity index 100% rename from blog/migrations/2021-08-20-110251_users-and-auth/down.sql rename to migrations/2021-08-20-110251_users-and-auth/down.sql diff --git a/blog/migrations/2021-08-20-110251_users-and-auth/up.sql b/migrations/2021-08-20-110251_users-and-auth/up.sql similarity index 100% rename from blog/migrations/2021-08-20-110251_users-and-auth/up.sql rename to migrations/2021-08-20-110251_users-and-auth/up.sql diff --git a/blog/migrations/2021-09-13-143540_sections/down.sql b/migrations/2021-09-13-143540_sections/down.sql similarity index 100% rename from blog/migrations/2021-09-13-143540_sections/down.sql rename to migrations/2021-09-13-143540_sections/down.sql diff --git a/blog/migrations/2021-09-13-143540_sections/up.sql b/migrations/2021-09-13-143540_sections/up.sql similarity index 100% rename from blog/migrations/2021-09-13-143540_sections/up.sql rename to migrations/2021-09-13-143540_sections/up.sql diff --git a/gw/admin.rs b/src/admin.rs similarity index 100% rename from gw/admin.rs rename to src/admin.rs diff --git a/common/src/auth/jwt.rs b/src/auth/jwt.rs similarity index 100% rename from common/src/auth/jwt.rs rename to src/auth/jwt.rs diff --git a/common/src/auth/mod.rs b/src/auth/mod.rs similarity index 100% rename from common/src/auth/mod.rs rename to src/auth/mod.rs diff --git a/common/src/auth/pass.rs b/src/auth/pass.rs similarity index 100% rename from common/src/auth/pass.rs rename to src/auth/pass.rs diff --git a/common/src/db/mod.rs b/src/db/mod.rs similarity index 100% rename from common/src/db/mod.rs rename to src/db/mod.rs diff --git a/common/src/db/posts.rs b/src/db/posts.rs similarity index 100% rename from common/src/db/posts.rs rename to src/db/posts.rs diff --git a/common/src/db/sections.rs b/src/db/sections.rs similarity index 100% rename from common/src/db/sections.rs rename to src/db/sections.rs diff --git a/common/src/db/tokens.rs b/src/db/tokens.rs similarity index 100% rename from common/src/db/tokens.rs rename to src/db/tokens.rs diff --git a/common/src/db/users.rs b/src/db/users.rs similarity index 100% rename from common/src/db/users.rs rename to src/db/users.rs diff --git a/common/src/errors.rs b/src/errors.rs similarity index 100% rename from common/src/errors.rs rename to src/errors.rs diff --git a/common/src/guards.rs b/src/guards.rs similarity index 100% rename from common/src/guards.rs rename to src/guards.rs diff --git a/blog/src/main.rs b/src/main.rs similarity index 100% rename from blog/src/main.rs rename to src/main.rs diff --git a/blog/src/posts.rs b/src/posts.rs similarity index 100% rename from blog/src/posts.rs rename to src/posts.rs diff --git a/common/src/schema.rs b/src/schema.rs similarity index 100% rename from common/src/schema.rs rename to src/schema.rs diff --git a/blog/src/sections.rs b/src/sections.rs similarity index 100% rename from blog/src/sections.rs rename to src/sections.rs diff --git a/common/tests/admin.py b/tests/admin.py similarity index 100% rename from common/tests/admin.py rename to tests/admin.py