THRIFT-5855: Add rust fuzzers
Add fuzzers for Rust support, to improve the reliability/robustness of the implementation
diff --git a/lib/rs/test/fuzz/Cargo.toml b/lib/rs/test/fuzz/Cargo.toml
new file mode 100644
index 0000000..38272b4
--- /dev/null
+++ b/lib/rs/test/fuzz/Cargo.toml
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+# //
+# http://www.apache.org/licenses/LICENSE-2.0
+# //
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[package]
+name = "thrift-fuzz"
+version = "0.0.0"
+publish = false
+edition = "2021"
+
+[package.metadata]
+cargo-fuzz = true
+
+[lib]
+path = "lib/mod.rs"
+
+[dependencies]
+libfuzzer-sys = "0.4"
+uuid = { version = "1", features = ["arbitrary"] }
+arbitrary = { version = "1", features = ["derive"] }
+ordered-float = { version = "4.6.0", features = ["arbitrary"] }
+clap = { version = "4.5", features = ["derive"] }
+rand = "0.9"
+
+[dependencies.thrift]
+path = "../../../../lib/rs"
+
+[[bin]]
+name = "corpus_generator"
+path = "bin/corpus_generator.rs"
+
+[[bin]]
+name = "parse_compact"
+path = "fuzz_targets/parse_compact.rs"
+test = false
+doc = false
+bench = false
+
+[[bin]]
+name = "parse_binary"
+path = "fuzz_targets/parse_binary.rs"
+test = false
+doc = false
+bench = false
+
+[[bin]]
+name = "roundtrip_binary"
+path = "fuzz_targets/roundtrip_binary.rs"
+test = false
+doc = false
+bench = false
+
+[[bin]]
+name = "roundtrip_compact"
+path = "fuzz_targets/roundtrip_compact.rs"
+test = false
+doc = false
+bench = false
+
+# TODO (THRIFT-5891): Enable these once we fix round-trip correctness.
+# [[bin]]
+# name = "structured_roundtrip_compact"
+# path = "fuzz_targets/structured_roundtrip_compact.rs"
+# test = false
+# doc = false
+# bench = false
+
+# [[bin]]
+# name = "structured_roundtrip_binary"
+# path = "fuzz_targets/structured_roundtrip_binary.rs"
+# test = false
+# doc = false
+# bench = false
\ No newline at end of file