diff --git a/.github/workflows/publish-bolt-crates.yml b/.github/workflows/publish-bolt-crates.yml index 37d95df..f872839 100644 --- a/.github/workflows/publish-bolt-crates.yml +++ b/.github/workflows/publish-bolt-crates.yml @@ -158,12 +158,12 @@ jobs: run: | # Fails if versions are not aligned cargo install git-cliff@2.6.1 --locked - ./version-align.sh --check + ./scripts/version-align.sh --check - name: run build run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - cargo install --path cli --force --locked + cargo install --path crates/bolt-cli --force --locked bolt build - name: Generate lib @@ -175,7 +175,7 @@ jobs: - name: run tests run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - cargo install --path cli --force --locked + cargo install --path crates/bolt-cli --force --locked bolt test - name: cargo publish @@ -201,12 +201,12 @@ jobs: cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/delegate/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-helpers/attribute/system-template/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-helpers/attribute/world-apply/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=programs/bolt-system/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=programs/bolt-component/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG - cargo publish $DRY_RUN_FLAG --manifest-path=programs/world/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=crates/programs/bolt-system/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=crates/programs/bolt-component/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG + cargo publish $DRY_RUN_FLAG --manifest-path=crates/programs/world/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/Cargo.toml --token $CRATES_TOKEN $NO_VERIFY_FLAG if [ "${DRY_RUN}" != "true" ]; then - cargo publish --manifest-path=cli/Cargo.toml --token $CRATES_TOKEN + cargo publish --manifest-path=crates/bolt-cli/Cargo.toml --token $CRATES_TOKEN fi env: CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} diff --git a/.github/workflows/publish-bolt-sdk.yml b/.github/workflows/publish-bolt-sdk.yml index 07c269d..0d66d3b 100644 --- a/.github/workflows/publish-bolt-sdk.yml +++ b/.github/workflows/publish-bolt-sdk.yml @@ -158,12 +158,12 @@ jobs: run: | # Fails if versions are not aligned cargo install git-cliff@2.6.1 --locked - ./version-align.sh --check + ./scripts/version-align.sh --check - name: run build run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - cargo install --path cli --force --locked + cargo install --path crates/bolt-cli --force --locked bolt build - name: Generate lib @@ -175,7 +175,7 @@ jobs: - name: run tests run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - cargo install --path cli --force --locked + cargo install --path crates/bolt-cli --force --locked bolt test - name: npm publish diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 3a56ae1..76ba7ec 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -97,20 +97,20 @@ jobs: with: use-cross: true command: build - args: --manifest-path=cli/Cargo.toml --release --locked --target ${{ matrix.build.TARGET }} + args: --manifest-path=crates/bolt-cli/Cargo.toml --release --locked --target ${{ matrix.build.TARGET }} - name: Build (windows) if: matrix.build.OS == 'windows-latest' uses: actions-rs/cargo@v1 with: command: build - args: --manifest-path=cli/Cargo.toml --no-default-features --release --locked --target ${{ matrix.build.TARGET }} + args: --manifest-path=crates/bolt-cli/Cargo.toml --no-default-features --release --locked --target ${{ matrix.build.TARGET }} - name: Check versions are aligned run: | # Fails if versions are not aligned cargo install git-cliff@2.6.1 --locked - ./version-align.sh --check + ./scripts/version-align.sh --check - name: Build the NPM package shell: bash @@ -136,7 +136,7 @@ jobs: # create the package directory mkdir -p "${node_pkg}/bin" # generate package.json from the template - envsubst < cli/npm-package/package.json.tmpl > "${node_pkg}/package.json" + envsubst < crates/bolt-cli/npm-package/package.json.tmpl > "${node_pkg}/package.json" cat "${node_pkg}/package.json" # copy the binary into the package # note: windows binaries has '.exe' extension diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 83cee14..8f26169 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -88,7 +88,7 @@ jobs: - name: Run Build and Tests run: | - cargo install --path cli --force --locked + cargo install --path crates/bolt-cli --force --locked yarn install bolt build cd clients/bolt-sdk diff --git a/Anchor.toml b/Anchor.toml index 06a6892..045a0c8 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -24,7 +24,16 @@ cluster = "Localnet" wallet = "./tests/fixtures/provider.json" [workspace] -members = ["programs/bolt-component", "programs/bolt-system", "programs/world", "examples/component-position", "examples/component-velocity", "examples/system-apply-velocity", "examples/system-fly", "examples/system-simple-movement"] +members = [ + "crates/programs/bolt-component", + "crates/programs/bolt-system", + "crates/programs/world", + "examples/component-position", + "examples/component-velocity", + "examples/system-apply-velocity", + "examples/system-fly", + "examples/system-simple-movement" +] [scripts] test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/bolt.ts" diff --git a/Cargo.lock b/Cargo.lock index 67e6fee..76652d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,7 +201,7 @@ dependencies = [ "bincode", "cargo_toml", "chrono", - "clap 4.5.19", + "clap 4.5.22", "dirs", "flate2", "heck 0.4.1", @@ -391,9 +391,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -406,36 +406,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -613,7 +613,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -646,9 +646,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.13" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e614738943d3f68c628ae3dbce7c3daffb196665f82f8c8ea6b65de73c79429" +checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522" dependencies = [ "brotli", "flate2", @@ -1014,7 +1014,7 @@ dependencies = [ "anchor-lang-idl", "anchor-syn", "anyhow", - "clap 4.5.19", + "clap 4.5.22", "heck 0.5.0", "serde_json", "syn 1.0.109", @@ -1369,9 +1369,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "caps" @@ -1451,7 +1451,7 @@ dependencies = [ "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", - "unicode-width", + "unicode-width 0.1.14", "vec_map", ] @@ -1473,9 +1473,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.19" +version = "4.5.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" +checksum = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b" dependencies = [ "clap_builder", "clap_derive", @@ -1483,13 +1483,13 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.19" +version = "4.5.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" +checksum = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1" dependencies = [ "anstream", "anstyle", - "clap_lex 0.7.2", + "clap_lex 0.7.3", "strsim 0.11.1", ] @@ -1516,15 +1516,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "combine" @@ -1557,7 +1557,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", + "unicode-width 0.1.14", "windows-sys 0.52.0", ] @@ -1984,9 +1984,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -2068,12 +2068,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2084,9 +2084,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "feature-probe" @@ -2114,9 +2114,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -2139,9 +2139,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -2154,9 +2154,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2164,15 +2164,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2181,15 +2181,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -2198,21 +2198,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2468,9 +2468,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -2527,6 +2527,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2535,12 +2653,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2581,24 +2710,15 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", - "unicode-width", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", + "unicode-width 0.2.0", + "web-time", ] [[package]] @@ -2717,9 +2837,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libredox" @@ -2798,6 +2918,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" @@ -2892,11 +3018,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", @@ -3192,9 +3317,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pbkdf2" @@ -3301,9 +3426,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -3815,9 +3940,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -3892,9 +4017,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -3950,9 +4075,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -4187,9 +4312,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5393,6 +5518,12 @@ dependencies = [ "spl-program-error 0.4.4", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "string_cache" version = "0.8.7" @@ -5482,6 +5613,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "system-apply-velocity" version = "0.1.11" @@ -5535,9 +5677,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -5546,9 +5688,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -5583,7 +5725,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width", + "unicode-width 0.1.14", ] [[package]] @@ -5614,9 +5756,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -5635,9 +5777,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -5671,6 +5813,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -5688,9 +5840,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -5753,9 +5905,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -5840,9 +5992,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -5852,9 +6004,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -5863,9 +6015,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] @@ -5911,18 +6063,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.17" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" @@ -5951,6 +6094,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -6006,9 +6155,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -6021,6 +6170,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -6161,6 +6322,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki-roots" version = "0.24.0" @@ -6418,6 +6589,18 @@ dependencies = [ "tuple-conv", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "x509-parser" version = "0.14.0" @@ -6456,6 +6639,30 @@ dependencies = [ "time", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", + "synstructure 0.13.1", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -6477,6 +6684,27 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", + "synstructure 0.13.1", +] + [[package]] name = "zeroize" version = "1.3.0" @@ -6497,6 +6725,28 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index b2a8d9e..8aa5c8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,14 @@ [workspace] resolver = "2" members = [ - "cli", - "programs/*", + "crates/bolt-cli", + "crates/bolt-lang", + "crates/bolt-helpers", + "crates/programs/bolt-component", + "crates/programs/bolt-system", + "crates/programs/world", + "crates/types", "examples/*", - "crates/*", ] [workspace.package] @@ -28,9 +32,9 @@ bolt-attribute-bolt-component-id = { path = "crates/bolt-lang/attribute/componen bolt-helpers-system-template = { path = "crates/bolt-helpers/attribute/system-template", version = "=0.1.11" } bolt-helpers-world-apply = { path = "crates/bolt-helpers/attribute/world-apply", version = "=0.1.11" } bolt-utils = { path = "crates/bolt-lang/utils", version = "=0.1.11" } -world = { path = "programs/world", features = ["cpi"], version = "=0.1.11"} -bolt-system = { path = "programs/bolt-system", features = ["cpi"], version = "=0.1.11"} -bolt-component = { path = "programs/bolt-component", features = ["cpi"], version = "=0.1.11"} +world = { path = "crates/programs/world", features = ["cpi"], version = "=0.1.11"} +bolt-system = { path = "crates/programs/bolt-system", features = ["cpi"], version = "=0.1.11"} +bolt-component = { path = "crates/programs/bolt-component", features = ["cpi"], version = "=0.1.11"} ## External crates anchor-lang = { version = "=0.30.1", features = ["init-if-needed"] } diff --git a/README.md b/README.md index f05c457..bcc4212 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,14 @@ With Bolt, you can create games that live forever on the blockchain. These games | Package | Description | Version | Docs | |:----------------------------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------| +| `bolt-cli` | CLI to support building and managing a Bolt workspace | [![Crates.io](https://img.shields.io/crates/v/bolt-cli?color=blue)](https://crates.io/crates/bolt-cli) | [![Docs](https://img.shields.io/badge/docs-tutorials-blue)](https://book.boltengine.gg/getting_started/installation.html) | | `bolt-lang` | Rust primitives for creating components, systems and writing programs on Solana | [![Crates.io](https://img.shields.io/crates/v/bolt-lang?color=blue)](https://crates.io/crates/bolt-lang) | [![Docs.rs](https://img.shields.io/badge/docs-tutorials-blue)](https://book.boltengine.gg/) | | `@magicblock-labs/bolt-sdk` | TypeScript client for Anchor programs | [![npm](https://img.shields.io/npm/v/@magicblock-labs/bolt-sdk.svg?color=blue)](https://www.npmjs.com/package/@magicblock-labs/bolt-sdk) | [![Docs](https://img.shields.io/badge/docs-tutorials-blue)](https://book.boltengine.gg/getting_started/world_program.html#typescript-sdk-installation) | -| `@magicblock-labs/bolt-cli` | CLI to support building and managing a Bolt workspace | [![npm](https://img.shields.io/npm/v/@magicblock-labs/bolt-cli.svg?color=blue)](https://www.npmjs.com/package/@magicblock-labs/bolt-cli) | [![Docs](https://img.shields.io/badge/docs-tutorials-blue)](https://book.boltengine.gg/getting_started/installation.html) | ## ⚡️ Installing the bolt-cli ```bash -npm install -g @magicblock-labs/bolt-cli +cargo install bolt-cli ``` ## 🔩️ Getting Started diff --git a/cli/Cargo.toml b/crates/bolt-cli/Cargo.toml similarity index 100% rename from cli/Cargo.toml rename to crates/bolt-cli/Cargo.toml diff --git a/cli/npm-package/.eslintignore b/crates/bolt-cli/npm-package/.eslintignore similarity index 100% rename from cli/npm-package/.eslintignore rename to crates/bolt-cli/npm-package/.eslintignore diff --git a/cli/npm-package/bolt.ts b/crates/bolt-cli/npm-package/bolt.ts similarity index 100% rename from cli/npm-package/bolt.ts rename to crates/bolt-cli/npm-package/bolt.ts diff --git a/cli/npm-package/package.json b/crates/bolt-cli/npm-package/package.json similarity index 100% rename from cli/npm-package/package.json rename to crates/bolt-cli/npm-package/package.json diff --git a/cli/npm-package/package.json.tmpl b/crates/bolt-cli/npm-package/package.json.tmpl similarity index 100% rename from cli/npm-package/package.json.tmpl rename to crates/bolt-cli/npm-package/package.json.tmpl diff --git a/cli/npm-package/tsconfig.json b/crates/bolt-cli/npm-package/tsconfig.json similarity index 100% rename from cli/npm-package/tsconfig.json rename to crates/bolt-cli/npm-package/tsconfig.json diff --git a/cli/src/bin/main.rs b/crates/bolt-cli/src/bin/main.rs similarity index 100% rename from cli/src/bin/main.rs rename to crates/bolt-cli/src/bin/main.rs diff --git a/cli/src/component.rs b/crates/bolt-cli/src/component.rs similarity index 100% rename from cli/src/component.rs rename to crates/bolt-cli/src/component.rs diff --git a/cli/src/instructions.rs b/crates/bolt-cli/src/instructions.rs similarity index 100% rename from cli/src/instructions.rs rename to crates/bolt-cli/src/instructions.rs diff --git a/cli/src/lib.rs b/crates/bolt-cli/src/lib.rs similarity index 100% rename from cli/src/lib.rs rename to crates/bolt-cli/src/lib.rs diff --git a/cli/src/rust_template.rs b/crates/bolt-cli/src/rust_template.rs similarity index 100% rename from cli/src/rust_template.rs rename to crates/bolt-cli/src/rust_template.rs diff --git a/cli/src/system.rs b/crates/bolt-cli/src/system.rs similarity index 100% rename from cli/src/system.rs rename to crates/bolt-cli/src/system.rs diff --git a/cli/src/templates/component/lib.rs.template b/crates/bolt-cli/src/templates/component/lib.rs.template similarity index 100% rename from cli/src/templates/component/lib.rs.template rename to crates/bolt-cli/src/templates/component/lib.rs.template diff --git a/cli/src/templates/component/mod.rs b/crates/bolt-cli/src/templates/component/mod.rs similarity index 100% rename from cli/src/templates/component/mod.rs rename to crates/bolt-cli/src/templates/component/mod.rs diff --git a/cli/src/templates/mod.rs b/crates/bolt-cli/src/templates/mod.rs similarity index 100% rename from cli/src/templates/mod.rs rename to crates/bolt-cli/src/templates/mod.rs diff --git a/cli/src/templates/program/constants.rs.template b/crates/bolt-cli/src/templates/program/constants.rs.template similarity index 100% rename from cli/src/templates/program/constants.rs.template rename to crates/bolt-cli/src/templates/program/constants.rs.template diff --git a/cli/src/templates/program/error.rs.template b/crates/bolt-cli/src/templates/program/error.rs.template similarity index 100% rename from cli/src/templates/program/error.rs.template rename to crates/bolt-cli/src/templates/program/error.rs.template diff --git a/cli/src/templates/program/instructions/initialize.rs.template b/crates/bolt-cli/src/templates/program/instructions/initialize.rs.template similarity index 100% rename from cli/src/templates/program/instructions/initialize.rs.template rename to crates/bolt-cli/src/templates/program/instructions/initialize.rs.template diff --git a/cli/src/templates/program/instructions/mod.rs.template b/crates/bolt-cli/src/templates/program/instructions/mod.rs.template similarity index 100% rename from cli/src/templates/program/instructions/mod.rs.template rename to crates/bolt-cli/src/templates/program/instructions/mod.rs.template diff --git a/cli/src/templates/program/mod.rs b/crates/bolt-cli/src/templates/program/mod.rs similarity index 100% rename from cli/src/templates/program/mod.rs rename to crates/bolt-cli/src/templates/program/mod.rs diff --git a/cli/src/templates/program/multiple.lib.rs.template b/crates/bolt-cli/src/templates/program/multiple.lib.rs.template similarity index 100% rename from cli/src/templates/program/multiple.lib.rs.template rename to crates/bolt-cli/src/templates/program/multiple.lib.rs.template diff --git a/cli/src/templates/program/single.lib.rs.template b/crates/bolt-cli/src/templates/program/single.lib.rs.template similarity index 100% rename from cli/src/templates/program/single.lib.rs.template rename to crates/bolt-cli/src/templates/program/single.lib.rs.template diff --git a/cli/src/templates/program/state/mod.rs.template b/crates/bolt-cli/src/templates/program/state/mod.rs.template similarity index 100% rename from cli/src/templates/program/state/mod.rs.template rename to crates/bolt-cli/src/templates/program/state/mod.rs.template diff --git a/cli/src/templates/system/lib.rs.template b/crates/bolt-cli/src/templates/system/lib.rs.template similarity index 100% rename from cli/src/templates/system/lib.rs.template rename to crates/bolt-cli/src/templates/system/lib.rs.template diff --git a/cli/src/templates/system/mod.rs b/crates/bolt-cli/src/templates/system/mod.rs similarity index 100% rename from cli/src/templates/system/mod.rs rename to crates/bolt-cli/src/templates/system/mod.rs diff --git a/cli/src/templates/workspace/.gitignore.template b/crates/bolt-cli/src/templates/workspace/.gitignore.template similarity index 100% rename from cli/src/templates/workspace/.gitignore.template rename to crates/bolt-cli/src/templates/workspace/.gitignore.template diff --git a/cli/src/templates/workspace/.prettierignore.template b/crates/bolt-cli/src/templates/workspace/.prettierignore.template similarity index 100% rename from cli/src/templates/workspace/.prettierignore.template rename to crates/bolt-cli/src/templates/workspace/.prettierignore.template diff --git a/cli/src/templates/workspace/Cargo.serde.toml.template b/crates/bolt-cli/src/templates/workspace/Cargo.serde.toml.template similarity index 100% rename from cli/src/templates/workspace/Cargo.serde.toml.template rename to crates/bolt-cli/src/templates/workspace/Cargo.serde.toml.template diff --git a/cli/src/templates/workspace/Cargo.toml.template b/crates/bolt-cli/src/templates/workspace/Cargo.toml.template similarity index 100% rename from cli/src/templates/workspace/Cargo.toml.template rename to crates/bolt-cli/src/templates/workspace/Cargo.toml.template diff --git a/cli/src/templates/workspace/Xargo.toml.template b/crates/bolt-cli/src/templates/workspace/Xargo.toml.template similarity index 100% rename from cli/src/templates/workspace/Xargo.toml.template rename to crates/bolt-cli/src/templates/workspace/Xargo.toml.template diff --git a/cli/src/templates/workspace/jest.js.template b/crates/bolt-cli/src/templates/workspace/jest.js.template similarity index 100% rename from cli/src/templates/workspace/jest.js.template rename to crates/bolt-cli/src/templates/workspace/jest.js.template diff --git a/cli/src/templates/workspace/jest.package.json.template b/crates/bolt-cli/src/templates/workspace/jest.package.json.template similarity index 100% rename from cli/src/templates/workspace/jest.package.json.template rename to crates/bolt-cli/src/templates/workspace/jest.package.json.template diff --git a/cli/src/templates/workspace/jest.ts.package.json.template b/crates/bolt-cli/src/templates/workspace/jest.ts.package.json.template similarity index 100% rename from cli/src/templates/workspace/jest.ts.package.json.template rename to crates/bolt-cli/src/templates/workspace/jest.ts.package.json.template diff --git a/cli/src/templates/workspace/mocha.js.template b/crates/bolt-cli/src/templates/workspace/mocha.js.template similarity index 100% rename from cli/src/templates/workspace/mocha.js.template rename to crates/bolt-cli/src/templates/workspace/mocha.js.template diff --git a/cli/src/templates/workspace/mocha.ts.template b/crates/bolt-cli/src/templates/workspace/mocha.ts.template similarity index 100% rename from cli/src/templates/workspace/mocha.ts.template rename to crates/bolt-cli/src/templates/workspace/mocha.ts.template diff --git a/cli/src/templates/workspace/mod.rs b/crates/bolt-cli/src/templates/workspace/mod.rs similarity index 100% rename from cli/src/templates/workspace/mod.rs rename to crates/bolt-cli/src/templates/workspace/mod.rs diff --git a/cli/src/templates/workspace/package.json.template b/crates/bolt-cli/src/templates/workspace/package.json.template similarity index 100% rename from cli/src/templates/workspace/package.json.template rename to crates/bolt-cli/src/templates/workspace/package.json.template diff --git a/cli/src/templates/workspace/ts.package.json.template b/crates/bolt-cli/src/templates/workspace/ts.package.json.template similarity index 100% rename from cli/src/templates/workspace/ts.package.json.template rename to crates/bolt-cli/src/templates/workspace/ts.package.json.template diff --git a/cli/src/templates/workspace/types.Cargo.toml.template b/crates/bolt-cli/src/templates/workspace/types.Cargo.toml.template similarity index 100% rename from cli/src/templates/workspace/types.Cargo.toml.template rename to crates/bolt-cli/src/templates/workspace/types.Cargo.toml.template diff --git a/cli/src/templates/workspace/workspace.toml.template b/crates/bolt-cli/src/templates/workspace/workspace.toml.template similarity index 100% rename from cli/src/templates/workspace/workspace.toml.template rename to crates/bolt-cli/src/templates/workspace/workspace.toml.template diff --git a/cli/src/workspace.rs b/crates/bolt-cli/src/workspace.rs similarity index 100% rename from cli/src/workspace.rs rename to crates/bolt-cli/src/workspace.rs diff --git a/programs/bolt-component/Cargo.toml b/crates/programs/bolt-component/Cargo.toml similarity index 100% rename from programs/bolt-component/Cargo.toml rename to crates/programs/bolt-component/Cargo.toml diff --git a/programs/bolt-component/Xargo.toml b/crates/programs/bolt-component/Xargo.toml similarity index 100% rename from programs/bolt-component/Xargo.toml rename to crates/programs/bolt-component/Xargo.toml diff --git a/programs/bolt-component/src/lib.rs b/crates/programs/bolt-component/src/lib.rs similarity index 100% rename from programs/bolt-component/src/lib.rs rename to crates/programs/bolt-component/src/lib.rs diff --git a/programs/bolt-system/Cargo.toml b/crates/programs/bolt-system/Cargo.toml similarity index 100% rename from programs/bolt-system/Cargo.toml rename to crates/programs/bolt-system/Cargo.toml diff --git a/programs/bolt-system/Xargo.toml b/crates/programs/bolt-system/Xargo.toml similarity index 100% rename from programs/bolt-system/Xargo.toml rename to crates/programs/bolt-system/Xargo.toml diff --git a/programs/bolt-system/src/lib.rs b/crates/programs/bolt-system/src/lib.rs similarity index 100% rename from programs/bolt-system/src/lib.rs rename to crates/programs/bolt-system/src/lib.rs diff --git a/programs/world/Cargo.toml b/crates/programs/world/Cargo.toml similarity index 100% rename from programs/world/Cargo.toml rename to crates/programs/world/Cargo.toml diff --git a/programs/world/Xargo.toml b/crates/programs/world/Xargo.toml similarity index 100% rename from programs/world/Xargo.toml rename to crates/programs/world/Xargo.toml diff --git a/programs/world/src/error.rs b/crates/programs/world/src/error.rs similarity index 100% rename from programs/world/src/error.rs rename to crates/programs/world/src/error.rs diff --git a/programs/world/src/lib.rs b/crates/programs/world/src/lib.rs similarity index 100% rename from programs/world/src/lib.rs rename to crates/programs/world/src/lib.rs diff --git a/CHANGELOG.md b/docs/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to docs/CHANGELOG.md diff --git a/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to docs/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 88% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md index ee06430..c251cfc 100644 --- a/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -4,7 +4,7 @@ Thank you for considering contributing to [Bolt](https://github.com/magicblock-l When contributing, please first discuss the change you wish to make via [issue](https://github.com/magicblock-labs/bolt/issues), or any other method with the owners of this repository before making a change. -Note that we have a [Code of Conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. +Note that we have a [Code of Conduct](./CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. ## Setup @@ -35,7 +35,7 @@ cargo test ## Create a Pull Request -1. Ensure that you updated the documentation and filled the [Pull Request template](./.github/PULL_REQUEST_TEMPLATE.md) according to the changes you made. +1. Ensure that you updated the documentation and filled the [Pull Request template](/.github/pull_request_template.md) according to the changes you made. 2. Wait for approval from the project owner/maintainer. Discuss the possible changes and update your Pull Request if necessary. @@ -50,4 +50,4 @@ cargo test # License -By contributing, you agree that your contributions will be licensed under [The MIT License](./LICENSE-MIT) or [Apache License 2.0](./LICENSE-APACHE). \ No newline at end of file +By contributing, you agree that your contributions will be licensed under [The MIT License](/LICENSE) or [Apache License 2.0](/LICENSE-APACHE). \ No newline at end of file diff --git a/RELEASE_PROCESS.md b/docs/RELEASE_PROCESS.md similarity index 93% rename from RELEASE_PROCESS.md rename to docs/RELEASE_PROCESS.md index e0be878..ba13589 100644 --- a/RELEASE_PROCESS.md +++ b/docs/RELEASE_PROCESS.md @@ -7,7 +7,7 @@ Increment the version number in the `Cargo.toml` file according to the release type (major, minor, or patch). 3. **Align Versions** - Run the `./version-align.sh` script. This will: + Run the `./scripts/version-align.sh` script. This will: - Update the version of all internal crates and npm packages. - Generate the updated crates. diff --git a/version-align.sh b/scripts/version-align.sh similarity index 97% rename from version-align.sh rename to scripts/version-align.sh index 8de2bbe..985a451 100755 --- a/version-align.sh +++ b/scripts/version-align.sh @@ -35,7 +35,7 @@ jq --arg version "$version" '(.version = $version) | (.optionalDependencies[] = cargo update --workspace # Generate CHANGELOG.md -git-cliff -c cliff.toml -o CHANGELOG.md -t $version +git-cliff -c cliff.toml -o docs/CHANGELOG.md -t $version # Check if the any changes have been made to the specified files, if running with --check if [[ "$1" == "--check" ]]; then