Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .cursor/rules/rust-standards.mdc

This file was deleted.

70 changes: 66 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
# .gitattributes — Rust (GitHub-hosted)
#
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=rust),
# gitattributes/gitattributes Rust.gitattributes + Common.gitattributes,
# github-linguist overrides.

*.rs linguist-language=Rust
# Default: detect text, normalize to LF in the repository
* text=auto

*.html linguist-detectable=false
*.sh linguist-detectable=false
*.vimrc linguist-detectable=false
# --- Source ---
*.rs text eol=lf diff=rust
*.toml text
Cargo.lock text
Cargo.toml text
rust-toolchain text
rust-toolchain.toml text

# --- Scripts ---
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.sh text eol=lf
*.zsh text eol=lf

# --- Docs / meta ---
*.adoc text
*.markdown text diff=markdown
*.md text diff=markdown
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
LICENSE text
NEWS text
README text
TODO text
.gitattributes text
.gitignore text

# --- Serialisation ---
*.json text
*.xml text
*.yaml text
*.yml text

# --- Binary ---
*.a binary
*.dll binary
*.dylib binary
*.exe binary
*.rlib binary
*.so binary

# --- Archives / images (common) ---
*.gif binary
*.gz binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary
*.tar binary
*.zip binary

# --- GitHub Linguist ---
**/target/** linguist-generated
27 changes: 16 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ env:

jobs:
check:
name: Test, Clippy, Fmt, Docs, Checkers, Package
name: Stable checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-08-08
components: clippy, rustfmt
components: clippy

- uses: Swatinem/rust-cache@v2

Expand All @@ -57,16 +56,16 @@ jobs:
- name: cargo clippy
run: cargo clippy --all-targets --all-features --locked -- -D warnings

- name: cargo build (examples)
run: cargo build --examples --locked

- name: cargo build (character-play example)
run: cargo build --example character-play --features test-regex --locked

- name: cargo doc
run: cargo doc --no-deps --all-features --locked
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --locked

- name: Install pinned nightly rustfmt
run: rustup toolchain install nightly-2026-09-10 --profile minimal --component rustfmt

- name: rustfmt
env:
RUSTFMT_TOOLCHAIN: nightly-2026-09-10
RUSTUP_TOOLCHAIN: nightly-2026-09-10
run: ./scripts/fmt --check

- name: DOC_76 checker
Expand All @@ -78,6 +77,12 @@ jobs:
- name: DERIVE_LAYOUT checker
run: python3 scripts/check_derives.py

- name: cargo build (examples)
run: cargo build --examples --locked

- name: cargo build (character-play example)
run: cargo build --example character-play --features test-regex --locked

- name: cargo publish (dry run)
run: cargo publish --dry-run --locked

Expand Down
52 changes: 49 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,73 @@

# directories (by name)

/_build/
/_build-ci/
/scripts/__pycache__/
/_analyses/

/.idea/

/scratch/
/target/


# directories (by pattern)

**/__pycache__/

**/.mypy_cache/
**/.pytest_cache/
**/.ruff_cache/


# files (by name)

.DS_Store
.ruby-version


# files (by pattern)

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

*~
*.*~
*.???_obj
*.a
*.app
*.bak
*.class
*.diff
*.dll
*.dylib
*.exe
*.gch
*.gem
*.idb
*.ilk
*.lib
*.log
*.ncb
*.o
*.obj
*.opensdf
*.opt
*.org
*.out
*.pch
*.pdb
*.pyc
*.pyo
*.res
*.sbr
*.scc
*.sdf
*.so
*.suo
*.sw[ponm]
*.swp
*.test
*.tlog
*.tmp
*.xcuserstate
*.zip


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

set nocompatible
filetype indent plugin on
Expand All @@ -17,12 +17,12 @@ set fixeol
set list
set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+

" editor.detectIndentation: false — global defaults (editor.tabSize: 2, insertSpaces: false)
set tabstop=2
set shiftwidth=2
set softtabstop=2
set noexpandtab
" editor.detectIndentation: false — global defaults (editor.tabSize: 4, insertSpaces: true)
set colorcolumn=76
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4

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

augroup sis_c_cxx
augroup sis_rust
autocmd!

" [bat]
autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76

" [c] / [cpp]
autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76

" [rust]
autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76

" [cmake]
autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4

" [shellscript]
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76

" [bat]
autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76

" [json] / [markdown] / [yaml] / [ruby]
autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2

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

" [rust]
autocmd FileType rust setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76

" [shellscript]
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76

" [toml]
autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2
augroup END
Expand Down
31 changes: 24 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"[json]": {
"editor.insertSpaces": false,
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[markdown]": {
Expand All @@ -18,15 +18,23 @@
"editor.tabSize": 2,
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.rulers": [ 60, 76 ],
"editor.tabSize": 4,
},
"[shellscript]": {
"editor.insertSpaces": true,
"editor.rulers": [ 60, 76 ],
"editor.tabSize": 2,
},
"[toml]": {
"editor.insertSpaces": false,
"editor.tabSize": 2,
},
"cmake.configureOnOpen": false,
"debug.allowBreakpointsEverywhere": true,
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.renderWhitespace": "all",
Expand All @@ -35,13 +43,22 @@
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"git.mergeEditor": false,
"rust-analyzer.cargo.buildScripts.enable": true,
"rust-analyzer.cargo.features": [],
"rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.cargo.features": [
"default",
"lookup-ranges",
"null-feature",
"test-regex",
],
"rust-analyzer.check.allTargets": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.checkOnSave": true,
"rust-analyzer.completion.autoimport.enable": false,
"rust-analyzer.debug.engine": "vadimcn.vscode-lldb",
"rust-analyzer.debug.openDebugPane": true,
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.rustfmt.overrideCommand": [
"rustup",
"run",
"nightly-2026-09-10",
"rustfmt",
"--unstable-features",
],
"rust-analyzer.showUnlinkedFileNotification": false,
}
Loading
Loading