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

Rust - shrink prelude #1653

Merged
merged 6 commits into from
Mar 21, 2025
Merged

Rust - shrink prelude #1653

merged 6 commits into from
Mar 21, 2025

Conversation

jeremylt
Copy link
Member

@jeremylt jeremylt commented Aug 30, 2024

Ok, dropped a lot of the contents of the prelude, mirroring changes in petsc-rs.

Also made some clippy fixes.

fixes #1599

@jeremylt jeremylt self-assigned this Aug 30, 2024
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch 2 times, most recently from 1c09551 to a415e90 Compare September 23, 2024 14:38
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch 3 times, most recently from f0f09b4 to 4e047dc Compare October 11, 2024 16:12
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch 2 times, most recently from e05f3da to 2f2912b Compare October 24, 2024 23:59
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch 2 times, most recently from 876339d to a3bf36a Compare November 11, 2024 16:32
@jeremylt jeremylt mentioned this pull request Dec 2, 2024
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch from a3bf36a to 31a665d Compare December 2, 2024 23:28
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch from 31a665d to f5fe798 Compare January 10, 2025 17:00
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch from f5fe798 to e937c0d Compare February 12, 2025 23:51
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch 2 times, most recently from 398850e to 5dcae8f Compare February 28, 2025 23:49
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch from 5dcae8f to 83dd418 Compare March 12, 2025 22:04
@jeremylt jeremylt added this to the v0.13 milestone Mar 19, 2025
@jeremylt
Copy link
Member Author

Note: 0b72886 is the commit with the meaningful changes

@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch from 83dd418 to 226525c Compare March 21, 2025 15:19
@jeremylt jeremylt force-pushed the jeremy/rust-prelude branch from 226525c to e60d507 Compare March 21, 2025 16:06
@jeremylt
Copy link
Member Author

Only one clippy issue remaining, and its not one under our control:

$ cargo clippy
warning: first doc comment paragraph is too long
  --> /home/jeremy/Dev/libCEED/target/debug/build/libceed-sys-fbdae9980ac1442f/out/bindings.rs:78:1
   |
78 | / #[doc = " Implementation takes ownership of the pointer and will free using CeedFree...
79 | | #[doc = " The user should not assume that the pointer remains valid after ownership ...
80 | | #[doc = " Note that arrays allocated using C++ operator new or other allocators cann...
81 | | #[doc = " CeedFree() is capable of freeing any memory that can be freed using free()."]
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
   = note: `#[warn(clippy::too_long_first_doc_paragraph)]` on by default
help: add an empty line
   |
78 ~ #[doc = " Implementation takes ownership of the pointer and will free using CeedFree() when done using it."]
79 + ///
   |

warning: `libceed-sys` (lib) generated 1 warning (run `cargo clippy --fix --lib -p libceed-sys` to apply 1 suggestion)
    Checking libceed v0.12.0 (/home/jeremy/Dev/libCEED/rust/libceed)
    Checking mesh v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/mesh)
    Checking ex1-volume v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex1-volume)
    Checking ex4-vector-surface v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex4-vector-surface)
    Checking ex3-vector-volume v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex3-vector-volume)
    Checking ex2-surface v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex2-surface)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.55s

@jedbrown
Copy link
Member

We can either turn off that lint or insert an empty line after the subject/summary sentence?

@jeremylt
Copy link
Member Author

jeremylt commented Mar 21, 2025

Ah, found where to stick the annotation for the generated bindings. Clippy now runs clean

$ cargo clippy
    Checking utf8parse v0.2.2
    Checking colorchoice v1.0.2
    Checking anstyle v1.0.8
    Checking anstyle-query v1.1.1
    Checking is_terminal_polyfill v1.70.1
    Checking strsim v0.11.1
    Checking clap_lex v0.7.2
   Compiling libceed-sys v0.12.0 (/home/jeremy/Dev/libCEED/rust/libceed-sys)
    Checking anstyle-parse v0.2.5
    Checking anstream v0.6.15
    Checking clap_builder v4.5.15
    Checking clap v4.5.16
    Checking libceed v0.12.0 (/home/jeremy/Dev/libCEED/rust/libceed)
    Checking mesh v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/mesh)
    Checking ex4-vector-surface v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex4-vector-surface)
    Checking ex1-volume v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex1-volume)
    Checking ex2-surface v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex2-surface)
    Checking ex3-vector-volume v0.11.0 (/home/jeremy/Dev/libCEED/examples/rust/ex3-vector-volume)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.99s

@jeremylt jeremylt merged commit f97c94c into main Mar 21, 2025
28 checks passed
@jeremylt jeremylt deleted the jeremy/rust-prelude branch March 21, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust Crate Drop Prelude
2 participants