Initial Integration of rust-lexical (#8469)

Rust-lexical is a High-performance numeric conversion routine library
for Rust. It has over 25 million downloads from crates.io. With 100,000
downloads every week.
Lexical-core is also a part of the repository which is widely used as a
dependency for many projects due to its small build time and build size.

Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
This commit is contained in:
code-terror 2022-09-13 15:43:24 -07:00 committed by GitHub
parent 397b1c0a65
commit c03c175c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# Copyright 2022 Google LLC
#
# Licensed 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.
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder-rust as builder
## Install build dependencies.
RUN apt-get update
RUN git clone --depth 1 https://github.com/Alexhuszagh/rust-lexical
COPY build.sh $SRC/

View File

@ -0,0 +1,45 @@
# Copyright 2022 Google LLC
#
# Licensed 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.
#
################################################################################
cd $SRC/rust-lexical/fuzz
cargo fuzz build -O
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-i8 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-i16 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-i32 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-i64 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-i128 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-isize $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-u8 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-u16 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-u32 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-u64 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-u128 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-integer-usize $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-float-f32 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/parse-float-f64 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-float-f32 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-float-f64 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-i8 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-i16 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-i32 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-i64 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-i128 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-isize $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-u8 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-u16 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-u32 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-u64 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-u128 $OUT/
cp $SRC/rust-lexical/fuzz/target/x86_64-unknown-linux-gnu/release/write-integer-usize $OUT/

View File

@ -0,0 +1,10 @@
homepage: "https://github.com/Alexhuszagh/rust-lexical"
language: rust
primary_contact: "ahuszagh@gmail.com"
auto_ccs:
- "self@myrrlyn.dev"
sanitizers:
- address
fuzzing_engines:
- libfuzzer
main_repo: 'https://github.com/Alexhuszagh/rust-lexical'