Skip to content

Commit c9eb4dc

Browse files
committed
chore: vendor TinyBus as a submodule
1 parent 57cddb7 commit c9eb4dc

8 files changed

Lines changed: 49 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
# This job executes repository code (cargo build/test); don't persist
2727
# the token in git config.
2828
persist-credentials: false
29+
submodules: true
2930

3031
- uses: dtolnay/rust-toolchain@stable
3132
with:
@@ -55,6 +56,7 @@ jobs:
5556
- uses: actions/checkout@v7
5657
with:
5758
persist-credentials: false
59+
submodules: true
5860

5961
- uses: dtolnay/rust-toolchain@stable
6062

@@ -72,6 +74,7 @@ jobs:
7274
- uses: actions/checkout@v7
7375
with:
7476
persist-credentials: false
77+
submodules: true
7578

7679
- name: Read rust-version from Cargo.toml
7780
id: msrv
@@ -101,6 +104,7 @@ jobs:
101104
- uses: actions/checkout@v7
102105
with:
103106
persist-credentials: false
107+
submodules: true
104108

105109
- name: Check advisories, licenses, bans, and sources
106110
uses: EmbarkStudios/cargo-deny-action@v2

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- uses: actions/checkout@v7
3030
with:
3131
fetch-depth: 0
32+
submodules: true
3233

3334
- uses: dtolnay/rust-toolchain@stable
3435
with:

‎.gitmodules‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "vendor/tinybus"]
2+
path = vendor/tinybus
3+
url = https://github.com/tinyhumansai/tinybus
4+
branch = main

‎AGENTS.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Do this once, in a single commit, before writing feature code:
2121
- [ ] Confirm `license` and `LICENSE` match the project's intended license.
2222
- [ ] Update the security contact in `SECURITY.md`.
2323
- [ ] Replace `ROADMAP.md` with the real plan, or delete it.
24+
- [ ] Decide whether the project uses TinyBus. Keep `vendor/tinybus` pinned and
25+
wire the required crate/features, or remove the submodule deliberately.
2426
- [ ] Rewrite the "Project Structure" section below to describe this crate.
2527

2628
## Project Structure
@@ -37,6 +39,7 @@ src/
3739
└── test.rs # module-local unit tests
3840
tests/ # integration tests against the public API only
3941
examples/ # runnable, compiled-in-CI usage examples
42+
vendor/tinybus/ # pinned TinyBus source; optional until wired by a project
4043
docs/
4144
├── specs/ # behavior and architecture specifications
4245
├── plans/ # test-first implementation plans
@@ -134,6 +137,21 @@ add one:
134137
Keep `Cargo.lock` committed; this crate ships a lockfile so CI and releases are
135138
reproducible.
136139

140+
### Vendored dependencies
141+
142+
TinyBus is registered as the `vendor/tinybus` git submodule and pinned by its
143+
gitlink. Initialize it after cloning with:
144+
145+
```sh
146+
git submodule update --init --recursive
147+
```
148+
149+
Do not edit vendored code from the parent repository. Make TinyBus changes in
150+
its own repository, push them there, then update this repository's gitlink in a
151+
separate commit. If the generated project consumes TinyBus, use the exact crate
152+
path and minimal features it needs; the template does not force that dependency
153+
on every generated crate.
154+
137155
## Testing
138156

139157
- Module-local unit tests live in `src/<feature>/test.rs` and may touch private

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ this document is the short path through them.
77
## Development Setup
88

99
Install a stable Rust toolchain with Rust 2024 support (see `rust-version` in
10-
`Cargo.toml` for the minimum supported version), then run the four checks CI
11-
runs:
10+
`Cargo.toml` for the minimum supported version), initialize the vendored
11+
submodules, then run the four checks CI runs:
1212

1313
```sh
14+
git submodule update --init --recursive
1415
cargo fmt --all -- --check
1516
cargo clippy --all-targets --all-features -- -D warnings
1617
cargo build --all-targets --all-features

‎Cargo.toml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ readme = "README.md"
1111
keywords = ["template"]
1212
categories = ["development-tools"]
1313
# Keep the published package to what a consumer actually needs.
14-
exclude = [".github/", "docs/", "worktrees/", ".env.example", "deny.toml"]
14+
exclude = [
15+
".github/",
16+
".gitmodules",
17+
"docs/",
18+
"vendor/",
19+
"worktrees/",
20+
".env.example",
21+
"deny.toml",
22+
]
1523

1624
[dependencies]
1725
# Derive macros for the crate-wide error type in `src/error/mod.rs`. Every

‎README.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ template-specific value.
3131
| Release | Manual `workflow_dispatch` bump that validates, versions, tags, and publishes to crates.io |
3232
| Community | Issue and pull request templates, Dependabot, contributing, security, support, and code of conduct docs |
3333
| Agents | [`AGENTS.md`](AGENTS.md) as the single source of truth, symlinked as `CLAUDE.md`, plus a `.claude/settings.json` allowlist for the standard commands |
34+
| Vendor | TinyBus pinned as the `vendor/tinybus` submodule, initialized by CI and release workflows |
3435

3536
## Layout
3637

@@ -47,6 +48,8 @@ tests/
4748
└── public_api.rs # integration tests against the public API only
4849
examples/
4950
└── basic.rs # compiled and linted in CI
51+
vendor/
52+
└── tinybus/ # pinned TinyBus git submodule
5053
docs/
5154
├── README.md # documentation index and conventions
5255
├── specs/ # behavior and architecture specifications
@@ -61,6 +64,12 @@ Feature areas use directory modules: implementation and exports live in
6164

6265
## Development
6366

67+
Clone with submodules, or initialize them before building:
68+
69+
```sh
70+
git submodule update --init --recursive
71+
```
72+
6473
```sh
6574
cargo fmt --all -- --check
6675
cargo clippy --all-targets --all-features -- -D warnings

‎vendor/tinybus‎

Submodule tinybus added at ddc63e3

0 commit comments

Comments
 (0)