search for: rustfmt

Displaying 8 results from an estimated 8 matches for "rustfmt".

Did you mean: bus_fmt
2023 Aug 04
1
[libnbd PATCH] golang: Optionally use gofmt on generated .go files
...sable]) AS_IF([ ( diff --git a/generator/config.mli b/generator/config.mli index 5f1a46a6..22c61dad 100644 --- a/generator/config.mli +++ b/generator/config.mli @@ -17,4 +17,5 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *) +val gofmt : string val rustfmt : string diff --git a/generator/utils.mli b/generator/utils.mli index d97d43ac..9f7824b2 100644 --- a/generator/utils.mli +++ b/generator/utils.mli @@ -54,6 +54,7 @@ val (** Type of code formatter. *) type formatter = + | Gofmt | Rustfmt (** Redirect stdout to a file. Possibly formatting t...
2023 Aug 30
2
[libnbd PATCH 0/2] (Attempt to) fix Rust on BSD-based builds
I managed to get a build of the async Rust handle compiling on FreeBSD (although the cirrus CI appears to not actually run 'make check' on non-Linux machines, at least when run on my fork): https://gitlab.com/ebblake/libnbd/-/jobs/4985192286 However, I'd really like Tage's review on patch 2 to see if my Rust makes sense. Eric Blake (2): maint: Favor 4-space indent in .rs files
2023 Aug 07
1
[libnbd PATCH] golang: Optionally use gofmt on generated .go files
...; if it is not > available, the project still compiles. > > Signed-off-by: Eric Blake <eblake at redhat.com> > --- > > Followup to this earlier series: > https://listman.redhat.com/archives/libguestfs/2023-July/032133.html Now in as 9cb10b39, after rebasing to yet more rustfmt changes in the meantime. > > I still need to fold in the 'make check' verification of non-generated > .go files, plus Dan's idea of enabling CI coverage... This still remains on my todo list. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.or...
2019 Aug 13
2
Re: [PATCH 1/2] Rust bindings: Add long description
...t-lang.github.io/rustc-guide/conventions.html#line-length> Ah, It seems good. Question: There are some places where the length of the line in the generated code is over 100 characters. Of course, I can try to make the length of each line under 100 characters. However, there is a nice tool: ‘rustfmt.’ I want to use this as a ‘post-process’ of generating bindings. Is it OK?(I should have ask you when I sent the first patch) > >> + List.iter (fun x -> >> + indent indent_depth; >> + pr "/// %s\n" x; >> + ) l > > Without indent_depth,...
2019 Jun 11
3
[nbdkit PATCH 0/2] Few rust plugin fixups/nitpicks
There are few more things that could be cleaned up related to the coding style and other things, like explicitly specifying the abi style after "extern" (i.e. `extern "C" fn` instead of `extern fn`), but since those are configurable in rustfmt config, I'm not sure whether the config needs to be added or complying with the defaults should be the priority. But this was just something I stumbled upon when I saw some warnings during build, nothing more. Martin Kletzander (2): rust: Do not use deprecated integer types rust: Remove l...
2019 Aug 13
0
Re: [PATCH 1/2] Rust bindings: Add long description
...o customize all the options that the Pod::Markdown module has. > Question: > There are some places where the length of the line in the generated code > is over 100 characters. Of course, I can try to make the length of each line under 100 > characters. However, there is a nice tool: ‘rustfmt.’ I want to use this as a ‘post-process’ > of generating bindings. Is it OK?(I should have ask you when I sent the first patch) Considering we are generating most of the rust code using the generator, IMHO it is better to produce the code directly following the style conventions. I just checke...
2019 Aug 13
2
Re: [PATCH 1/2] Rust bindings: Add long description
...> the Pod::Markdown module has. > > > Question: > > There are some places where the length of the line in the generated code > > is over 100 characters. Of course, I can try to make the length of each > line under 100 > > characters. However, there is a nice tool: ‘rustfmt.’ I want to use this > as a ‘post-process’ > > of generating bindings. Is it OK?(I should have ask you when I sent the > first patch) > > Considering we are generating most of the rust code using the > generator, IMHO it is better to produce the code directly following > the...
2019 Aug 11
5
[PATCH 1/2] Rust bindings: Add long description
`cargo doc` will generate docs with long descriptions. I did not add the settings of outputting these docs to `/website`. This is because - by publishing this crate to crates.io, users can see the docs in `docs.rs` like `https://docs.rs/guestfs/<version>/guestfs/`. It is easy to hold multiple documents corresponding to each version. - the style of the documents generated by `cargo doc`