Rust-GCC / Rust-GCC/gccrs

Investigate sharing code with GCC/C++

Open
#1,334 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.9k
Forks
231
Avg merge
19h 55m
Merged PRs (30d)
67

Description

Originally posted by @CohenArthur in https://github.com/Rust-GCC/gccrs/pull/1329#pullrequestreview-1014858287:

[...], we might even think about simply linking against the C++ const folder in the future, [...]

Originally posted by @dafaust in https://github.com/Rust-GCC/gccrs/pull/1329#pullrequestreview-1015852117:

This is an interesting idea, I'd be curious to see if/how it works in practice. I was actually wondering whether some of the ported-but-not-renamed functions in this PR will give link errors if we try to build a gcc with both the rust and c++ frontends enabled. Definitely not a blocker for this to be merged!

It might turn out that if we want to link against the C++ const folder directly we'd need to factor it out of the C++ frontend to somewhere common, like how C and C++ share some functionality in the c-family directory. I'm not very familiar with the build processes for the front ends though so maybe these are issues long since solved :P I need to read up.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the discussion in pull request #1329 and inspect the C++ const folder and the c-family directory mentioned there. Build GCC with both the Rust and C++ frontends enabled, checking whether the ported functions cause link errors. Done means documenting whether sharing is practical and identifying any common factoring required.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.