Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a321524
feat(rust-parser): scaffold uast4rust cli and minimal output model
KinomotoMio Feb 26, 2026
7c0f0e8
test(rust-parser): add smoke tests with synthetic fixtures
KinomotoMio Feb 26, 2026
57ebf9b
docs(rust-parser): add uast4rust usage README
KinomotoMio Feb 26, 2026
d42f103
fix(rust-parser): include flag name in missing-value arg errors
KinomotoMio Feb 26, 2026
bc17bb8
refactor(rust-parser): replace stringly errors with typed RunError
KinomotoMio Feb 26, 2026
90ebe0a
perf(rust-parser): avoid full file read when checking readability
KinomotoMio Feb 26, 2026
34143e3
refactor(rust-parser): simplify main flow and use code 0 for help
KinomotoMio Feb 26, 2026
f0956bb
refactor(rust-parser): switch cli arg parsing to clap with legacy fla…
KinomotoMio Feb 26, 2026
90900af
Revert "refactor(rust-parser): switch cli arg parsing to clap with le…
KinomotoMio Feb 27, 2026
8eccdf0
fix(rust-parser): prevent source overwrite when output path equals input
KinomotoMio Feb 27, 2026
51282bc
fix(rust-parser): reject known flags as option values
KinomotoMio Feb 27, 2026
365bc5c
feat(rust-parser): discover Cargo manifests and build project metadat…
KinomotoMio Feb 27, 2026
1d13600
test(rust-parser): add project discovery golden and stability checks
KinomotoMio Feb 27, 2026
d01405b
fix(rust-parser): skip hidden dirs and parse quoted manifest names sa…
KinomotoMio Feb 27, 2026
07bc1af
refactor(rust-parser): parse Cargo.toml package name via toml crate
KinomotoMio Feb 27, 2026
8879b61
refactor(rust-parser): make manifest path assumption explicit with ex…
KinomotoMio Feb 27, 2026
851df41
refactor(rust-parser): simplify package name extraction chain
KinomotoMio Feb 27, 2026
2adf42d
feat(rust-parser): lower core single-file rust syntax into uast
KinomotoMio Feb 27, 2026
4f42be8
test(rust-parser): add core syntax single-file golden coverage
KinomotoMio Feb 27, 2026
844895c
fix(rust-parser): avoid placeholder fallback for core syntax lowering
KinomotoMio Feb 27, 2026
87fed63
fix(rust-parser): return Option for lowered function args
KinomotoMio Feb 27, 2026
de30fc3
fix(rust-parser): filter out unsupported function parameters
KinomotoMio Feb 27, 2026
3c64718
refactor(rust-parser): assert named struct field identifiers
KinomotoMio Feb 27, 2026
11d3fb9
feat(rust-parser): lower common control-flow constructs
KinomotoMio Feb 27, 2026
cc92922
test(rust-parser): add control-flow golden coverage
KinomotoMio Feb 27, 2026
58b7120
Fix rust range/match lowering and add regressions
KinomotoMio Feb 27, 2026
9fb9f20
Fix guarded match lowering to if/else chain
KinomotoMio Feb 27, 2026
003b781
Add PR checks workflow for Rust parser
KinomotoMio Feb 27, 2026
a737903
Add golden regression fixtures for Rust parser
KinomotoMio Feb 27, 2026
81da544
Document Rust parser usage and scope
KinomotoMio Feb 27, 2026
8ee93e8
Merge pull request #5 from KinomotoMio/feat/rust-parser-s5
KinomotoMio Feb 27, 2026
97187e5
Ensure guarded match if-branches use scoped statements
KinomotoMio Feb 27, 2026
11f711d
Remove dead empty-check in match case lowering
KinomotoMio Feb 27, 2026
603f9fb
Refresh regression golden for scoped guarded-match output
KinomotoMio Feb 27, 2026
6895d82
Merge pull request #4 from KinomotoMio/feat/rust-parser-s4
KinomotoMio Feb 27, 2026
948172a
Skip wildcard names in tuple destructuring locals
KinomotoMio Feb 27, 2026
98552ee
Merge pull request #2 from KinomotoMio/feat/rust-parser-s3
KinomotoMio Feb 27, 2026
2e07791
Skip wildcard single-pattern locals in lowering
KinomotoMio Feb 27, 2026
e019400
Lower tuple destructuring locals from non-literal RHS
KinomotoMio Feb 27, 2026
1af8b65
Format Rust parser updates with rustfmt
KinomotoMio Feb 27, 2026
1d9eb41
Merge pull request #1 from KinomotoMio/feat/rust-parser-s2
KinomotoMio Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PR Checks

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'parser-Rust/**'
- '.github/workflows/pr-check.yml'

jobs:
rust-parser:
name: Rust Parser Checks
runs-on: ubuntu-latest
defaults:
run:
working-directory: parser-Rust
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: parser-Rust

- name: Check formatting
run: cargo fmt -- --check

- name: Run tests
run: cargo test --all-targets
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ YASA-UAST is an intermediate representation structure for multi-language program
## parser-Python
- Python language parser for UAST, parsing Python code into UAST.

## parser-Rust
- Rust language parser for UAST, parsing Rust code into UAST.

## Join Us
Welcome to submit issues if you encounter any problems!

Expand All @@ -58,4 +61,4 @@ YASA - Making code analysis more precise, easier, and smarter.
## Contact Us
[Official Website](https://cybersec.antgroup.com/)

<img src="folder-img/contactus.png" style="width:20%;" />
<img src="folder-img/contactus.png" style="width:20%;" />
3 changes: 3 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ UAST(Unified Abstract Syntax Tree)是一种面向多语言程序分析的中
## parser-Python
- UAST Python 语言的解析器,将 Python 语言代码解析为 UAST

## parser-Rust
- UAST Rust 语言解析器,将 Rust 语言代码解析为 UAST

# 加入我们
遇到问题欢迎提交issue!

Expand Down
Loading