logos VS rustfmt

Compare logos vs rustfmt and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
logos rustfmt
15 57
2,627 5,761
- 1.8%
8.3 8.9
21 days ago 5 days ago
Rust Rust
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

logos

Posts with mentions or reviews of logos. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-11.
  • Beating the fastest lexer generator in Rust
    2 projects | /r/rust | 11 Jul 2023
    This is mighty impressive! I've been trying to get some motivation for the mythical rewrite of the proc macro in Logos, and this might just do it for me :D. I'll have a proper look later today and see if any of your findings have something that can be generalized. Also really surprised to see aarch64 doing better than x86_64 since the latter is what I've been optimizing for!
  • Letlang — Roadblocks and how to overcome them - My programming language targeting Rust
    6 projects | /r/rust | 7 Jun 2023
    Rust is a very nice langage for implementing compilers, and has a nice ecosystem for it (logos, rust-peg, lalrpop, astmaker -- this one is mine --, etc...).
  • loxcraft: a compiler, language server, and online playground for the Lox programming language
    14 projects | /r/ProgrammingLanguages | 29 Apr 2023
    rust-langdev has a lot of libraries for building compilers in Rust. Perhaps you could use these to make your implementation easier, and revisit it later if you want to build things from scratch. I'd suggest logos for lexing, LALRPOP / chumsky for parsing, and rust-gc for garbage collection.
  • Logos 0.13 released
    2 projects | /r/rust | 10 Apr 2023
    Thanks! For compile times you might find the CLI version that Andrew Hickman contributed useful, it's undocumented still mostly I fear but shouldn't be hard to use, see original PR: https://github.com/maciejhirsz/logos/pull/248
  • Should I revisit my choice to use nom?
    6 projects | /r/rust | 2 Apr 2023
    For my lexer generation purposes, I tend to use https://github.com/maciejhirsz/logos, as it not only generates an easy to use lazy lexer, but the result is also exceptionally fast!
  • Position in rowan
    1 project | /r/rust | 11 Feb 2023
    Hi, I'm using rowan to create a parser and want to print more useful error messages with position in the text/file. I'm using logos (https://crates.io/crates/logos) to generate the lexer. Is there a way to get the starting and ending positions of a SyntaxToken? If not I thought of adding my own wrapper struct around the SyntaxTokens.
  • Hey Rustaceans! Got a question? Ask here (6/2023)!
    6 projects | /r/rust | 8 Feb 2023
    Is there a way for a lexer created with the logos crate (https://crates.io/crates/logos) to get the starting and ending positions for the tokens?
  • Best resources for a rust interpreter?
    5 projects | /r/rust | 22 Jan 2023
    I wouldn't recommend Logos at this point. This recent bug is quite nasty and seems easy to hit, and the maintainer is unresponsive. Last commit was half a year ago. At this point I consider Logos abandonware, though it would be great if its development continued, or if it were forked.
  • Alternatives for "blazingly fast"
    1 project | /r/rustjerk | 27 Aug 2022
    logos uses "ridiculously fast".
  • Compiler in Rust
    3 projects | /r/rust | 29 May 2022

rustfmt

Posts with mentions or reviews of rustfmt. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-28.
  • You can't do that because I hate you
    9 projects | news.ycombinator.com | 28 Dec 2023
    The author provides very surface-level criticism of two Rust tools, but they don't look into why those choices were made.

    With about five minutes of my time, I found out:

    wrap_comments was introduced in 2019 [0]. There are bugs in the implementation (it breaks Markdown tables), so the option hasn't been marked as stable. Progress on the issue has been spotty.

    --no-merge-sources is not trivial to re-implement [1]. The author has already explained why the flag no longer works -- Cargo integrated the command, but not all of the flags. This commit [2] explains why this functionality was removed in the first place.

    Rust is open source, so the author of this blog post could improve the state of the software they care about by championing these issues. The --no-merge-sources error message even encourages you to open an issue, presumably so that the authors of Cargo can gauge the importance of certain flags/features.

    You could even do something much simpler, like adding a comment to the related issues mentioning that you ran into these rough edges and that it made your life a little worse, or with a workaround that you found.

    Alternatively, you can continue to write about how much free software sucks.

    [0]: https://github.com/rust-lang/rustfmt/issues/3347

    [1]: https://github.com/rust-lang/cargo/pull/10344

    [2]: https://github.com/rust-lang/cargo/commit/3842d8e6f20067f716...

  • Let else will finally be formatted by rustfmt soon
    5 projects | /r/rust | 3 Jul 2023
    The new style still supports single line let-else, and there is a configuration parameter to make it be on one line also for longer lines.
  • Is rustfmt abandoned? Will it ever format `let ... else` syntax?
    11 projects | /r/rust | 3 Jun 2023
    It seems there is an issue about this dating all the way back from 2018 but yet it still hasn't been fixed.
  • Hey Rustaceans! Got a question? Ask here (22/2023)!
    10 projects | /r/rust | 29 May 2023
    However since 4179 recent versions should merge configuration files. Not sure what the details / specifics are but if just ignoring the file entirely is not good enough you might give it its own directory and rustfmt.toml file and see if that works.
  • Rustfmt refusing to work with certain functions.
    1 project | /r/rust | 26 Apr 2023
    Could this be be #3863 - Gives up on chains if any line is too long? It might not be, because I can't see a specific "line" that's too long to format, but there's more detail about the exact problem in the issue.
  • Rust Tips and Tricks #PartOne
    3 projects | dev.to | 8 Apr 2023
    Rustfmt is a tool that formats Rust code in compliance with style guidelines. Its name precisely reflects its purpose. To install rustfmt, you can run rustup component add rustfmt. Once installed, you can execute cargo fmt to format Rust code in your workspace. If you require further information, you can visit rustfmt’s GitHub repository.
  • What are some good practices when writing rust?
    2 projects | /r/rust | 28 Feb 2023
    code must be formatted with rustfmt.
  • HTML Limpo
    1 project | /r/brdev | 21 Feb 2023
  • Hey Rustaceans! Got a question? Ask here (5/2023)!
    19 projects | /r/rust | 30 Jan 2023
    Yes, some cases are not yet supported (https://github.com/rust-lang/rustfmt/issues/4914).
  • How do I stop RustFmt from turning this…
    2 projects | /r/rust | 17 Dec 2022
    Just FYI, the let-else suggestions will only work until rustfmt settles on a format for it. So you may be surprised when this happens and it suddenly changes.

What are some alternatives?

When comparing logos and rustfmt you can also consider the following projects:

foundation.rust-lang.org - website for Rust Foundation

Clippy - A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/

schema-registry - Confluent Schema Registry for Kafka

rust-analyzer - A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer]

book - The Rust Programming Language

rust-analyzer - A Rust compiler front-end for IDEs

lexgen - A fully-featured lexer generator, implemented as a proc macro

Rust for Visual Studio Code

sonyflake-rs - 🃏 A distributed unique ID generator inspired by Twitter's Snowflake.

vscode-rust

hush - Hush is a unix shell based on the Lua programming language

sublime-rust - The official Sublime Text 4 package for the Rust Programming Language