10 Star 30 Fork 25

openEuler / open-source-summer

 / 详情

提供基于Rust的高性能grep命令

待办的
开源之夏2023
创建于  
2023-04-24 19:58

提供基于Rust的高性能grep命令
【项目难度】进阶
【项目描述】
描述:grep是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。grep依赖pcre2作为正则表达式的匹配组件,由于rust提供了更为高性能的正则表达式组件,因此本项目希望通过rust重写grep的方式,直接调用rust提供的整体表达式组件,提供更好性能的grep组件。

C2Rust为能够将C代码转换为Rust语言的转换工具,中科大基于原生C2Rust的基础上,提供更为高效和准确的转换工具,因此本项目在开发过程中可以借助C2Rust工具进行转换,并通过二次修改的方式,完成整个项目的开发。该项目的目标如下:

  1. 该项目使用Rust语言开发,并且正则表达式库调用Rust提供的组件。
  2. 新的项目提供名称为ogrep的二进制文件,该命令的参数同原有的grep完全相同。
  3. 该项目的功能同原有的grep相同,相同的测试用例在ogrep以及grep上相同。
  4. 基于现有的benchmark测试工程或者设计新的性能测试用例,对不同的grep组件进行性能测试,并提供性能测试对比报告。

【技术要求】:

  1. 熟练掌握Rust开发语言
  2. 熟练使用正则表达式

【产出标准】

  1. 需提供可以编译通过、正常运行、测试通过的源码以及对应的指导文档。
  2. 命令行的行为同原有的grep相同。
  3. C2Rust转换之后,尽量使用安全的方法进行二次修改,并且需要提供修改过程中的关键修改过程。
  4. 注释/文档详尽。

【导师姓名/导师邮箱】
冯涛 fengtao40@huawei.com

【成果提交仓库】:
https://gitee.com/src-openeuler/grep

【相关参考资料】
C2Rust仓库:https://gitee.com/openeuler/c2rust
grep仓库:https://gitee.com/src-openeuler/grep/tree/master,
基于3.8版本rust正则表达式库:https://github.com/rust-lang/regex


project name:Provide a high-performance grep command based on Rust
【Difficulty】:Advanced
【Description】:
grep is a powerful text search tool that can use regular expressions to search for text and print the matching lines. grep depends on pcre2 as the matching component of regular expressions. Since Rust provides more high-performance regular expression components, this project aims to rewrite grep in Rust by directly calling the overall expression component provided by Rust, providing better-performing grep components.

C2Rust is a conversion tool that can convert C code to Rust language. The University of Chinese Academy of Sciences provides more efficient and accurate conversion tools based on the source-to-source C2Rust tool. Therefore, this project can use the C2Rust tool during development to convert the code and complete the entire project development through second-level modifications. The goals of this project are as follows:

  1. The project is developed using the Rust language, and the regular expression library calls the components provided by Rust.
  2. The new project provides a binary file named ogrep, which has the same parameters as the original grep command.
  3. The function of the project is the same as the original grep, and the same test cases are used for ogrep and grep.
  4. Based on existing benchmark testing projects or designing new performance testing scenarios, performance testing is conducted on different grep components, and a performance testing comparison report is provided.

【Output Requirements】:

  1. Mastering the Rust development language
  2. Proficient use of regular expressions

【Technical Requirements】:

  1. A sufficient amount of source code and guidance documents need to be provided to compile and run successfully, as well as pass testing.
  2. The command-line behavior should be the same as the original grep.
  3. After the C2Rust conversion, it is preferred to perform second-level modifications using safe methods and provide key modifications during the process.
  4. Annotations/documents should be detailed.

【Mentor/Email】:
冯涛 fengtao40@huawei.com

【Project Repository】:
https://gitee.com/src-openeuler/grep

【Notes】:
C2Rust git:https://gitee.com/openeuler/c2rust
grep git:https://gitee.com/src-openeuler/grep/tree/master,
regex in rust:https://github.com/rust-lang/regex

评论 (1)

t.feng 创建了开源之夏2023

Hi t_feng, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: sig-OSCourse, and any of the maintainers: @ZhengZhenyu , @郑晨 , @iscassiyang , @genedna

openeuler-ci-bot 添加了
 
sig/sig-OSCourse
标签
t.feng 修改了标题
t.feng 修改了描述
t.feng 修改了描述
t.feng 修改了描述
t.feng 修改了描述

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/openeuler/open-source-summer.git
git@gitee.com:openeuler/open-source-summer.git
openeuler
open-source-summer
open-source-summer

搜索帮助