Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion c2rust-postprocess/postprocess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def build_arg_parser() -> argparse.ArgumentParser:
"--model-id",
type=str,
required=False,
default="gemini-3-pro-preview",
default="gemini-3-flash-preview",
help="ID of the LLM model to use (default: gemini-3-pro-preview)",
)

Expand Down
3 changes: 2 additions & 1 deletion c2rust-postprocess/postprocess/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def transfer_comments(
Transfer the comments from the following C function to the corresponding Rust function.
Do not add any comments that are not present in the C function.
Use Rust doc comment syntax (///) where appropriate (e.g., for function documentation).
Respond with the Rust function definition with the transferred comments; say nothing else.
Respond with the Rust function definition with the transferred comments
in a Rust Markdown code block; say nothing else.
""" # noqa: E501
prompt_text = dedent(prompt_text).strip()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
transform = "CommentTransfer"
identifier = "partition"
model = "gemini-3-pro-preview"
model = "gemini-3-flash-preview"
response = """```rust
/// Lomuto Partition Scheme:
/// Partitions the array so that elements < pivot are on the left,
Expand Down Expand Up @@ -40,7 +40,8 @@ role = "user"
content = """Transfer the comments from the following C function to the corresponding Rust function.
Do not add any comments that are not present in the C function.
Use Rust doc comment syntax (///) where appropriate (e.g., for function documentation).
Respond with the Rust function definition with the transferred comments; say nothing else.
Respond with the Rust function definition with the transferred comments
in a Rust Markdown code block; say nothing else.

C function:
```c
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
transform = "CommentTransfer"
identifier = "quickSort"
model = "gemini-3-pro-preview"
model = "gemini-3-flash-preview"
response = """```rust
#[no_mangle]
pub unsafe extern "C" fn quickSort(
Expand All @@ -24,7 +24,8 @@ role = "user"
content = """Transfer the comments from the following C function to the corresponding Rust function.
Do not add any comments that are not present in the C function.
Use Rust doc comment syntax (///) where appropriate (e.g., for function documentation).
Respond with the Rust function definition with the transferred comments; say nothing else.
Respond with the Rust function definition with the transferred comments
in a Rust Markdown code block; say nothing else.

C function:
```c
Expand Down