Skip to content

Reduce libc usage in c2rust-transpile#1222

Merged
kkysen merged 3 commits into
immunant:masterfrom
nnethercote:libc-transpile
May 7, 2025
Merged

Reduce libc usage in c2rust-transpile#1222
kkysen merged 3 commits into
immunant:masterfrom
nnethercote:libc-transpile

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

Mostly in the output, but also in its own code.

The really nice thing about this is that a transpiled trivial program,
such as "hello world", no longer has a dependency on the `libc` crate.
@nnethercote
Copy link
Copy Markdown
Contributor Author

Best reviewed one commit at a time.

c2rust-refactor also has some libc uses in its output that could be replaced with std::ffi, but it seems to be deprecated so I don't know if that's a desirable change.

@kkysen
Copy link
Copy Markdown
Contributor

kkysen commented May 6, 2025

c2rust-refactor also has some libc uses in its output that could be replaced with std::ffi, but it seems to be deprecated so I don't know if that's a desirable change.

Yeah that's not used anywhere so best to just leave it alone.

@nnethercote
Copy link
Copy Markdown
Contributor Author

Is there any point to keeping c2rust-refactor around? Feels like an attractive nuisance...

@kkysen kkysen merged commit 75bff7f into immunant:master May 7, 2025
8 of 9 checks passed
@nnethercote nnethercote deleted the libc-transpile branch May 7, 2025 22:19
kkysen added a commit that referenced this pull request May 8, 2025
By using `std::ffi` types. A follow-up to #1221 and #1222.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants