Skip to content

Commit 7d8e538

Browse files
unicode-rs: initial integration. (#5413)
* unicode-rs: initial integration. * added an additional project to unicode-rs. * refined unicode-rs integration. * Updated the build script.
1 parent f035490 commit 7d8e538

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

projects/unicode-rs/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
################################################################################
16+
FROM gcr.io/oss-fuzz-base/base-builder
17+
18+
RUN git clone --depth 1 https://github.com/unicode-rs/unicode-normalization
19+
RUN git clone --depth 1 https://github.com/unicode-rs/unicode-segmentation
20+
21+
WORKDIR $SRC
22+
23+
COPY build.sh $SRC/

projects/unicode-rs/build.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash -eu
2+
# Copyright 2021 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
################################################################################
17+
18+
if [ $SANITIZER != "coverage" ]
19+
then
20+
cd $SRC/unicode-normalization
21+
cargo fuzz build -O
22+
cp fuzz/target/x86_64-unknown-linux-gnu/release/unicode-normalization $OUT/unicode-normalization-normalization
23+
cp fuzz/target/x86_64-unknown-linux-gnu/release/streaming $OUT/unicode-normalization-streaming
24+
fi
25+
26+
cd $SRC/unicode-segmentation/
27+
cargo fuzz build -O
28+
cp ./fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_target_1 $OUT/unicode-segmentation-fuzzer
29+

projects/unicode-rs/project.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
homepage: "http://unicode-rs.github.io/"
2+
main_repo: "https://github.com/unicode-rs"
3+
primary_contact: "[email protected]"
4+
sanitizers:
5+
- address
6+
fuzzing_engines:
7+
- libfuzzer
8+
language: rust
9+
auto_ccs:
10+

0 commit comments

Comments
 (0)