Skip to content

Commit a64a39f

Browse files
Boilerplate, CI (#16)
* core(support files): .gitattributes .gitignore .vscode/settings.json * chore(cargo): align Cargo.toml with Synesis Rust manifest conventions Bring the manifest in line with the shared Synesis Cargo.toml form: banded Package/Targets/Features/Dependencies layout, lexicographic package keys, canonical exclude, general/crate-specific feature boilerplate, Policy A dependency specs where applicable, docs.rs comment/form when metadata is present, and library/tool description endings. Conventions are documented in freelibs rust-standards (CARGO_TOML). * chore(rust): declare versions example in Cargo.toml manifests Add an explicit [[example]] for examples/versions/main.rs across the fifteen Synesis Rust crates so the shared versions smoke target is configured consistently with other declared examples. * EXAMPLES.md * docs(rust): add NEWS.md Details column from release history Add a third **Details** column to every Rust-project **NEWS.md**, with a short phrase per row taken from git tags and **CHANGES.md** highlights (scaffold notes where no tags exist); keep libCLImate/sistools as header-only tables until first releases. * docs(rust): normalise TODO.md TOC, Packaging, and item forms Align all Rust-project **TODO.md** files to one spine: TOC plus Functional, Performance, and Packaging sections; use `* \<none>` and canonical `~~~…~~~ - ✅;` completed items; retain shwild’s historical and deferred sections ahead of the shared rails. * chore(rust): adopt gold rustfmt.toml and scripts/fmt across crates Copy the Synesis gold rustfmt.toml and scripts/fmt (nightly-2026-09-10 via RUSTFMT + RUSTUP_TOOLCHAIN) into all 15 Rust projects; remove rust-toolchain.toml; align CI and related pin docs/scripts to the same dated nightly. * chore(rust): align CI and editor fmt to nightly-2026-09-10 Point CI rustfmt (and related pin docs/scripts) at nightly-2026-09-10 and set rust-analyzer.rustfmt.overrideCommand to the same pin with --unstable-features so format-on-save matches scripts/fmt; include any gold-config source reformat fallout. * docs(readme): add MSRV section to all Rust crate READMEs Add a dedicated Minimum Supported Rust Version (MSRV) section to the README.md of all 15 Rust projects in freelibs, clarifying MSRV scope: - MSRV guarantee applies to library code, [dependencies], and [build-dependencies]; - [dev-dependencies] (e.g. benchmarking frameworks like criterion) are never fetched or compiled by downstream library consumers and do not invalidate the MSRV claim; - Standardise declared MSRV values (1.79 for shwild.Rust and 1.74 for all other 14 crates); - Expand stub READMEs for libCLImate.Rust and sistools.Rust into full standard Synesis README structures with TOC, badges, and project info. * date * chore(rust): add canonical project checker templates Add the derive, documentation-width, and test-naming checker exemplars to the shared Rust template and propagate executable byte-identical copies to every Rust project; * TODO * 0.0.4
1 parent 35cd72a commit a64a39f

19 files changed

Lines changed: 301 additions & 93 deletions

File tree

‎.gitattributes‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# .gitattributes — Rust (GitHub-hosted)
2+
#
3+
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=rust),
4+
# gitattributes/gitattributes Rust.gitattributes + Common.gitattributes,
5+
# github-linguist overrides.
6+
7+
# Default: detect text, normalize to LF in the repository
8+
* text=auto
9+
10+
# --- Source ---
11+
*.rs text eol=lf diff=rust
12+
*.toml text
13+
Cargo.lock text
14+
Cargo.toml text
15+
rust-toolchain text
16+
rust-toolchain.toml text
17+
18+
# --- Scripts ---
19+
*.bash text eol=lf
20+
*.bat text eol=crlf
21+
*.cmd text eol=crlf
22+
*.ps1 text eol=crlf
23+
*.sh text eol=lf
24+
*.zsh text eol=lf
25+
26+
# --- Docs / meta ---
27+
*.adoc text
28+
*.markdown text diff=markdown
29+
*.md text diff=markdown
30+
*.txt text
31+
AUTHORS text
32+
CHANGELOG text
33+
CHANGES text
34+
CONTRIBUTING text
35+
COPYING text
36+
LICENSE text
37+
NEWS text
38+
README text
39+
TODO text
40+
.gitattributes text
41+
.gitignore text
42+
43+
# --- Serialisation ---
44+
*.json text
45+
*.xml text
46+
*.yaml text
47+
*.yml text
48+
49+
# --- Binary ---
50+
*.a binary
51+
*.dll binary
52+
*.dylib binary
53+
*.exe binary
54+
*.rlib binary
55+
*.so binary
56+
57+
# --- Archives / images (common) ---
58+
*.gif binary
59+
*.gz binary
60+
*.ico binary
61+
*.jpeg binary
62+
*.jpg binary
63+
*.png binary
64+
*.tar binary
65+
*.zip binary
66+
67+
# --- GitHub Linguist ---
68+
**/target/** linguist-generated

‎.github/workflows/ci.yml‎

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ jobs:
4848
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked
4949

5050
- name: Install pinned nightly rustfmt
51-
run: rustup toolchain install nightly-2026-08-08 --profile minimal --component rustfmt
51+
run: rustup toolchain install nightly-2026-09-10 --profile minimal --component rustfmt
5252

5353
- name: rustfmt
54+
env:
55+
RUSTFMT_TOOLCHAIN: nightly-2026-09-10
56+
RUSTUP_TOOLCHAIN: nightly-2026-09-10
5457
run: ./scripts/fmt --check
5558

5659
- name: DOC_76 checker
@@ -62,12 +65,28 @@ jobs:
6265
- name: DERIVE_LAYOUT checker
6366
run: python3 scripts/check_derives.py
6467

68+
- name: cargo build (examples)
69+
run: cargo build --examples --locked
70+
6571
- name: cargo build (libver)
6672
run: cargo build --bin libver --locked
6773

6874
- name: cargo publish (dry run)
6975
run: cargo publish --dry-run --locked
7076

77+
msrv:
78+
name: MSRV (1.74)
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
83+
- uses: dtolnay/rust-toolchain@1.74.0
84+
85+
- uses: Swatinem/rust-cache@v2
86+
87+
- name: cargo check (library)
88+
run: cargo check --lib --locked
89+
7190
path-semantics:
7291
name: Path semantics (${{ matrix.os }})
7392
runs-on: ${{ matrix.os }}
@@ -85,20 +104,7 @@ jobs:
85104
- uses: Swatinem/rust-cache@v2
86105

87106
- name: cargo test (Unix path semantics)
88-
run: cargo test --lib --locked tests::unix::
107+
run: 'cargo test --lib --locked tests::unix::'
89108

90109
- name: cargo test (Windows path semantics)
91-
run: cargo test --lib --locked tests::windows::
92-
93-
msrv:
94-
name: MSRV (1.74)
95-
runs-on: ubuntu-latest
96-
steps:
97-
- uses: actions/checkout@v4
98-
99-
- uses: dtolnay/rust-toolchain@1.74.0
100-
101-
- uses: Swatinem/rust-cache@v2
102-
103-
- name: cargo check (library)
104-
run: cargo check --lib --locked
110+
run: 'cargo test --lib --locked tests::windows::'

‎.gitignore‎

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,73 @@
11

22
# directories (by name)
33

4-
/_build/
4+
/_analyses/
5+
6+
/.idea/
7+
8+
/scratch/
59
/target/
610

711

812
# directories (by pattern)
913

14+
**/__pycache__/
15+
16+
**/.mypy_cache/
17+
**/.pytest_cache/
18+
**/.ruff_cache/
19+
1020

1121
# files (by name)
1222

1323
.DS_Store
24+
.ruby-version
1425

1526

1627
# files (by pattern)
1728

1829
**/*.rs.bk # These are backup files generated by rustfmt
1930

2031
*~
32+
*.*~
33+
*.???_obj
34+
*.a
35+
*.app
36+
*.bak
37+
*.class
38+
*.diff
39+
*.dll
40+
*.dylib
41+
*.exe
42+
*.gch
43+
*.gem
44+
*.idb
45+
*.ilk
46+
*.lib
47+
*.log
48+
*.ncb
49+
*.o
50+
*.obj
51+
*.opensdf
52+
*.opt
53+
*.org
54+
*.out
55+
*.pch
56+
*.pdb
57+
*.pyc
58+
*.pyo
59+
*.res
60+
*.sbr
61+
*.scc
62+
*.sdf
63+
*.so
64+
*.suo
65+
*.sw[ponm]
2166
*.swp
67+
*.test
68+
*.tlog
2269
*.tmp
70+
*.xcuserstate
2371
*.zip
2472

73+

‎.vimrc‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
" Synesis C/C++ project .vimrc — aligned with .sis/.vscode/c_cxx/settings.json
1+
" Synesis Rust project .vimrc — aligned with .vscode/settings.json (Rust)
22

33
set nocompatible
44
filetype indent plugin on
@@ -17,12 +17,12 @@ set fixeol
1717
set list
1818
set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+
1919

20-
" editor.detectIndentation: false — global defaults (editor.tabSize: 2, insertSpaces: false)
21-
set tabstop=2
22-
set shiftwidth=2
23-
set softtabstop=2
24-
set noexpandtab
20+
" editor.detectIndentation: false — global defaults (editor.tabSize: 4, insertSpaces: true)
2521
set colorcolumn=76
22+
set expandtab
23+
set shiftwidth=4
24+
set softtabstop=4
25+
set tabstop=4
2626

2727
" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line).
2828
" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes.
@@ -40,30 +40,30 @@ autocmd ColorScheme * call s:ConfigureColorColumn()
4040
" files.trimTrailingWhitespace
4141
autocmd BufWritePre * %s/\s\+$//e
4242

43-
augroup sis_c_cxx
43+
augroup sis_rust
4444
autocmd!
4545

46+
" [bat]
47+
autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76
48+
4649
" [c] / [cpp]
4750
autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76
4851

49-
" [rust]
50-
autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76
51-
5252
" [cmake]
5353
autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4
5454

55-
" [shellscript]
56-
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76
57-
58-
" [bat]
59-
autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76
60-
6155
" [json] / [markdown] / [yaml] / [ruby]
6256
autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
6357

6458
" [python]
6559
autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76
6660

61+
" [rust]
62+
autocmd FileType rust setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76
63+
64+
" [shellscript]
65+
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76
66+
6767
" [toml]
6868
autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2
6969
augroup END

‎.vscode/settings.json‎

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
{
2-
"[c]": {
3-
"editor.insertSpaces": true,
4-
"editor.rulers": [ 60, 76 ],
5-
"editor.tabSize": 2,
6-
},
7-
"[cpp]": {
8-
"editor.insertSpaces": true,
9-
"editor.rulers": [ 60, 76 ],
10-
"editor.tabSize": 2,
11-
},
122
"[json]": {
133
"editor.insertSpaces": true,
144
"editor.tabSize": 2,
@@ -17,29 +7,58 @@
177
"editor.insertSpaces": true,
188
"editor.tabSize": 2,
199
},
10+
"[python]": {
11+
"editor.insertSpaces": true,
12+
"editor.rulers": [ 60, 76 ],
13+
"editor.tabSize": 4,
14+
},
2015
"[ruby]": {
2116
"editor.insertSpaces": true,
2217
"editor.rulers": [ 60, 76 ],
2318
"editor.tabSize": 2,
2419
},
2520
"[rust]": {
21+
"editor.defaultFormatter": "rust-lang.rust-analyzer",
22+
"editor.formatOnSave": true,
2623
"editor.insertSpaces": true,
2724
"editor.rulers": [ 60, 76 ],
2825
"editor.tabSize": 4,
2926
},
30-
"[toml]": {
27+
"[shellscript]": {
3128
"editor.insertSpaces": true,
29+
"editor.rulers": [ 60, 76 ],
30+
"editor.tabSize": 2,
31+
},
32+
"[toml]": {
33+
"editor.insertSpaces": false,
3234
"editor.tabSize": 2,
3335
},
3436
"cmake.configureOnOpen": false,
37+
"debug.allowBreakpointsEverywhere": true,
3538
"editor.detectIndentation": false,
3639
"editor.insertSpaces": false,
37-
"editor.renderWhitespace" : "all",
40+
"editor.renderWhitespace": "all",
3841
"editor.rulers": [ 76 ],
3942
"editor.tabSize": 2,
43+
"files.insertFinalNewline": true,
4044
"files.trimTrailingWhitespace": true,
4145
"git.mergeEditor": false,
46+
"rust-analyzer.cargo.buildScripts.enable": true,
47+
"rust-analyzer.cargo.features": [],
4248
"rust-analyzer.cargo.noDefaultFeatures": true,
49+
"rust-analyzer.check.allTargets": true,
50+
"rust-analyzer.check.command": "clippy",
51+
"rust-analyzer.checkOnSave": true,
4352
"rust-analyzer.completion.autoimport.enable": false,
53+
"rust-analyzer.debug.engine": "vadimcn.vscode-lldb",
54+
"rust-analyzer.debug.openDebugPane": true,
55+
"rust-analyzer.procMacro.enable": true,
56+
"rust-analyzer.rustfmt.overrideCommand": [
57+
"rustup",
58+
"run",
59+
"nightly-2026-09-10",
60+
"rustfmt",
61+
"--unstable-features",
62+
],
4463
"rust-analyzer.showUnlinkedFileNotification": false,
4564
}

‎CHANGES.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# libpath.Rust - Changes <!-- omit in toc -->
22

33

4+
## 0.0.4 - 12th September 2026
5+
6+
* refreshed pinned-nightly formatting and added explicit MSRV validation;
7+
* added example-build coverage and quoted path-semantics test selectors in CI;
8+
* added the **versions** example and excluded development-only files from packages;
9+
* canonicalised **Cargo.toml**, editor configuration, ignore rules, and repository metadata;
10+
* documented the MSRV and added the `_NEVER_TO_BE_ENABLED` placeholder feature;
11+
* refreshed the test-name checker, formatting driver, and path-library documentation;
12+
13+
414
## 0.0.3 - 31st August 2026
515

616
* Added complete package metadata, release documentation, and CI checks;

0 commit comments

Comments
 (0)