[rust] Add rustfmt.toml
Change-Id: If0dad0b81130a73c565c03c7e60a93b696780b0f
Reviewed-on: https://bluetooth-review.git.corp.google.com/c/bluetooth/+/1360
Reviewed-by: Ani Ramakrishnan <aniramakri@google.com>
diff --git a/rust/rustfmt.toml b/rust/rustfmt.toml
new file mode 100644
index 0000000..71b39c8
--- /dev/null
+++ b/rust/rustfmt.toml
@@ -0,0 +1,17 @@
+# rustfmt which matches most of our downstream
+
+edition = "2021"
+version = "Two"
+
+# The "Default" setting has a heuristic which splits lines too aggresively.
+# We are willing to revisit this setting in future versions of rustfmt.
+# Bugs:
+# * https://github.com/rust-lang/rustfmt/issues/3119
+# * https://github.com/rust-lang/rustfmt/issues/3120
+use_small_heuristics = "Max"
+
+newline_style = "Unix"
+
+wrap_comments = true
+
+format_generated_files = false