Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 4889912

Browse files
committed
Added some documentation
1 parent e19df79 commit 4889912

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"[toml]": {
3+
"editor.formatOnSave": false
4+
// ^^ because of src/template/rust-toolchain.toml and the toml formatter not playing well with the weird template things I added
5+
}
6+
}

src/crates_README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ replace-with = 'local-registry'
88
[source.local-registry]
99
local-registry = '{?TOOLCHAIN.CRATES_DIR}' # double-check this path is correct, especially if you are creating the package on a different machine than the machine you are creating the package for
1010
```
11+
12+
(psst- if you know how to install crate files to the registry manually, make an issue or PR on [rust-pkg-gen](https://github.com/AverseABFun/rust-pkg-gen)!)

src/template/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ version = "0.1.0"
44
edition = "{?TOOLCHAIN.EDITION}"
55

66
[dependencies]
7-
{?CRATES}
7+
{?CRATES}

src/template/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env bash
2-
CI=1
3-
cd "$(dirname "$0")"
2+
# shellcheck shell=bash
3+
cd "$(dirname "$0")" || exit
44
cargo generate-lockfile --verbose
5-
"$CARGO_BIN_FILE_CARGO_LOCAL_REGISTRY" local-registry --sync Cargo.lock crates > /dev/null 2>&1
6-
# ^^^ is super jank, but it expects that the first argument is the provided subcommand of cargo.
5+
"$CARGO_BIN_FILE_CARGO_LOCAL_REGISTRY" local-registry --sync Cargo.lock crates >/dev/null 2>&1
6+
# ^^^ is super jank, but it expects that the first argument is local-registry and acts strangely otherwise
77

88
mv crates/* .
99
if [[ "$1" != "save" ]]; then
1010
rm Cargo.lock Cargo.toml rust-toolchain.toml src/main.rs .cargo/config.toml build.sh
1111
rm -d src .cargo crates
12-
fi
12+
fi

src/template/rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[toolchain]
1+
[toolchain] # to be honest, probably only targets is required(can someone confirm?), but i'm not taking chances
22
channel = "{?TOOLCHAIN.CHANNEL}"
33
components = [ {?TOOLCHAIN.COMPONENTS} ]
44
targets = [ {?TOOLCHAIN.TARGETS} ]

0 commit comments

Comments
 (0)