Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deburring safer-ffi (maintainability improvements) #245

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
bc9f9ae
Integration branch to deburr safer-ffi [skip ci]
danielhenrymantilla Mar 19, 2025
f955af4
`.lock` file cleanup
danielhenrymantilla Mar 19, 2025
816d540
Improve "bare" top-level `cargo test` ergonomics
danielhenrymantilla Mar 20, 2025
d23f790
Add warning about `: 'static`-ness of nodejs' `SyncKind::Detached` in…
danielhenrymantilla Mar 20, 2025
73512cd
empty commit to allow branch to exist [skip ci]
danielhenrymantilla Mar 20, 2025
4d615b4
Add Lua language support. (#177)
bocharov Mar 20, 2025
d8aef6b
Remove unnecessary mentions to `::std`
danielhenrymantilla Mar 19, 2025
eeca4dd
Remove unnecessary `str_ref::try_as_str()`
danielhenrymantilla Mar 19, 2025
e78884d
Add `generated.lua` to `.gitignore`
danielhenrymantilla Mar 20, 2025
8255e07
use correct framework (#242)
kasperk81 Mar 21, 2025
4bd86f1
Merge pull request #247 from getditto/lua-support
danielhenrymantilla Mar 24, 2025
1db5043
Prepare for 1.85.0 MSRV (#246)
danielhenrymantilla Mar 24, 2025
134b93d
Clean up `::inventory`, and bump it to `0.3.20`
danielhenrymantilla Mar 24, 2025
5692b3b
Bump to 2024 edition
danielhenrymantilla Mar 24, 2025
aa52b7a
README.md nit
danielhenrymantilla Mar 24, 2025
7119001
Also adjust the js code
danielhenrymantilla Mar 24, 2025
aad8676
Remove `rustfmt::skip` top-of-file annotations
danielhenrymantilla Mar 24, 2025
b65201a
Add `rustfmt::skip` for macros
danielhenrymantilla Mar 24, 2025
0f83953
Remove deprecated `proc_macros` Cargo feature
danielhenrymantilla Mar 24, 2025
8457948
Use lib.framework/lib for Maccatalyst as well (same as for ios)
busec0 Mar 24, 2025
a33ff00
Merge pull request #250 from getditto/busec0/maccatalyst-lib-resolution-
busec0 Mar 25, 2025
8a9b159
Run `./scripts/format.sh`, and Format The World™
danielhenrymantilla Mar 25, 2025
dbe75d1
Add formatting commit to `.git-blame-ignore-revs`
danielhenrymantilla Mar 25, 2025
fc4f261
Nit: include `::stabby` in `cargo test`
danielhenrymantilla Mar 25, 2025
9bc085a
Set up DX & tooling around `cargo fmt`
danielhenrymantilla Mar 25, 2025
c393077
mv .github/workflows/{gh-pages,CI}.yml
danielhenrymantilla Mar 25, 2025
29d3b09
Add CI check for formatting
danielhenrymantilla Mar 25, 2025
fd9db3c
[REVERT ME] Purposely introduce a formatting error to test CI
danielhenrymantilla Mar 25, 2025
f5f5e6c
Revert "[REVERT ME] Purposely introduce a formatting error to test CI"
danielhenrymantilla Mar 25, 2025
434f17f
Add `cancel-previous` to CI
danielhenrymantilla Mar 25, 2025
44d6129
Nit: fix deprecated function call
danielhenrymantilla Mar 25, 2025
2e73ff0
Merge branch 'edition-2024' of github.com:getditto/safer_ffi into rus…
danielhenrymantilla Mar 25, 2025
b5c0ff4
Merge pull request #248 from getditto/edition-2024
danielhenrymantilla Mar 25, 2025
f099d6f
Revert "Add `cancel-previous` to CI"
danielhenrymantilla Mar 25, 2025
a47c967
Merge pull request #249 from getditto/rustfmt
danielhenrymantilla Mar 25, 2025
4ee7656
Update MSRV in guide (fixes #213)
danielhenrymantilla Mar 26, 2025
cd5f632
`rustfmt` some `mod`s which had been skipped due to having been macro…
danielhenrymantilla Mar 26, 2025
86b78a7
Add formatting commit to `.git-blame-ignore-revs`
danielhenrymantilla Mar 26, 2025
c71f730
Merge pull request #251 from getditto/rustfmt-missing-mods
danielhenrymantilla Mar 26, 2025
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
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -5,3 +5,9 @@ rustflags = [
rustdocflags = [
"--cfg", "docs",
]

[alias]
# fmt = [] # Please use `cargo fmt-nightly` instead.
fmt-nightly = ["r", "-q", "-p", "run-sh", "--", "./scripts/format.sh"]
# In order for `cargo fmt` to Just Work™, you can run:
# scripts/formatting/setup_cargo_fmt_override.sh
7 changes: 7 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Run this command to always ignore formatting commits in `git blame`
# ```sh
# git config blame.ignoreRevsFile '.git-blame-ignore-revs'
# ```

8a9b15953d5f56c54393e9c1f6e12c3749bc0164 # rustfmt the World
cd5f6328ddd5a7104e803b2513cc290844a660af # rustfmt missing mods
44 changes: 36 additions & 8 deletions .github/workflows/gh-pages.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-09-14
toolchain: nightly-2025-01-03 # branch-from-master date of 1.85.0
override: true
components: rust-src

@@ -46,6 +46,24 @@ jobs:
--no-default-features --features alloc
--target x86_64-unknown-linux-gnu -Zbuild-std=core,alloc

# == Check formatting == #
check-formatting:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2025-01-03 # branch-from-master date of 1.85.0
override: true
components: rustfmt

- name: Clone repo
uses: actions/checkout@v2

- run: ./scripts/format.sh --check

# == CHECK == #
check:
name: Check nightly stable and MSRV
@@ -57,7 +75,7 @@ jobs:
- macos-latest
# - windows-latest
rust:
- 1.72.1
- 1.85.0
- stable
# - nightly
steps:
@@ -89,7 +107,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.72.1
toolchain: 1.85.0
override: true

- name: Clone repo
@@ -119,7 +137,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.72.1
toolchain: 1.85.0
override: true

- name: Clone repo
@@ -150,7 +168,7 @@ jobs:
- macos-latest
- windows-latest
rust:
- 1.72.1
- 1.85.0
- stable
# - nightly
steps:
@@ -175,7 +193,15 @@ jobs:
command: test
args: --features docs

- name: FFI test (C & C#?)
- name: Install LuaJIT and LuaRocks (Ubuntu)
run: sudo apt-get install -y luajit
if: matrix.os == 'ubuntu-latest'

- name: Install LuaJIT and LuaRocks (macOS)
run: brew install luajit
if: matrix.os == 'macos-latest'

- name: FFI test (C & C# & Lua?)
run: make -C ffi_tests
if: runner.os != 'Windows'
env:
@@ -196,9 +222,11 @@ jobs:
needs:
- check-nostd
- check
- check-formatting
- check-features
- build-and-test
- releasable-to-crates-io
# the proc-macro dep, when version-bumped, will make this fail.
# - releasable-to-crates-io
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
@@ -223,7 +251,7 @@ jobs:
with:
profile: default
override: true
toolchain: 1.72.1
toolchain: 1.85.0

- name: Install `mdbook`
uses: peaceiris/actions-mdbook@v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -8,3 +8,4 @@ filename.h
generated.cffi
generated.cs
generated.h
generated.lua
21 changes: 21 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
unstable_features = true

comment_width = 100
edition = "2024"
fn_params_layout = "Vertical"
format_code_in_doc_comments = true
group_imports = "StdExternalCrate"
imports_granularity = "Item" # No more `git` conflicts around these.
match_arm_leading_pipes = "Always"
match_block_trailing_comma = true
reorder_impl_items = false
skip_macro_invocations = [
"quote", "quote_spanned",
"parse_quote", "parse_quote_spanned",
"squote", "squote_spanned",
"Quote",
"bail",
"out",
]
use_field_init_shorthand = true
wrap_comments = true
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.formatOnSave": true,
"[toml]": {
"editor.formatOnSave": false
}
}
Loading