git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [DISCUSS] Introducing Rust into the Git project

From
TGTrevor Gross <tmgross@umich.edu>
Date
Jan 11, 2024, 20:07 UTC
Message-ID
<CALNs47vfBH9u9B5B3tWRoEkJJiqne5067A4CFnZ3OaMVvz_gSg@mail.gmail.com>
In-Reply-To
<00a801da443d$b1539670$13fac350$@nexbridge.com>
On Wed, Jan 10, 2024 at 10:24 PM <rsbecker@nexbridge.com> wrote:
Show 16 quoted lines
>
> There are a number of issues for porting gcc (and Go). The list is fairly long, but the summary of what I encountered directly (on the last funded effort of 3) is:
> 1. There are C syntax constructs required to do anything useful (required for access to the OS API) on NonStop that are not in gcc. I can hand code the parser for that, but it would take time.
> 2. The Big Endian x86 architecture is weird to gcc and making that work is not easy.
> 3. There is no assembler on NonStop.
> 4. The ELF header is very different from standard.
> 5. The symbol table structure is radically different, so debugging would be (nearly) impossible or impractical. gdb was ported to account for the platform differences.
> 6. The linkage structure is similar but different from standard.
> 7. The external fixup structure is radically different.
> 8. The loader does not work the same way, so there are required sections of the ELF files on NonStop that are not generated by gcc.
>
> There are more, but I just did not get to the point if hitting them. Part of my own issue is that I have expertise in parsing and semantic passes of compilers, but my code generation skills are not where I want them to be for taking on this effort. Our last funded attempt had a code generation expert and he gave up in frustration.
>
> If I was hired on to do this, it might have a chance, but at an estimate (not mine) of 4-5 person years for a gcc port, best case, my $DAYJOB will not permit it.
>
> If gcc could be ported to NonStop, it would solve so many problems. I have heard of numerous failed efforts beyond what was officially funded by various companies, so this is considered a high-risk project.

Out of curiosity - does the Tandem compiler (assuming that is the correct name) have a backend that is usable as a library or via an IR?

If so, maybe it would be possible to write a rustc_codegen_tandem backend like the three that exist (rustc_codegen_{llvm,gcc,cranelift} at [1]. GCC and cranelift are still under development). This way you sidestep a lot of the codegen-specific problems listed above.

I am, of course, not suggesting this as a solution for git and am sure you would rather have GCC support. But I wonder how feasible this would be if Rust on NonStop is desired at some point.

[1]: https://github.com/rust-lang/rust/tree/062e7c6a951c1e4f33c0a6f6761755949cde15ec/compiler
Previous: rsbecker@nexbridge.comNext: rsbecker@nexbridge.com
Message 16 of 38 in “[DISCUSS] Introducing Rust into the Git project”
  1. Taylor BlauJan 10, 2024
  2. Dragan SimicJan 10, 2024
  3. Junio C HamanoJan 10, 2024
  4. rsbecker@nexbridge.comJan 10, 2024
  5. Taylor BlauJan 10, 2024
  6. rsbecker@nexbridge.comJan 10, 2024
  7. Elijah NewrenJan 11, 2024
  8. rsbecker@nexbridge.comJan 11, 2024
  9. Elijah NewrenJan 11, 2024
  10. rsbecker@nexbridge.comJan 11, 2024
  11. Elijah NewrenJan 11, 2024
  12. Patrick SteinhardtJan 11, 2024
  13. rsbecker@nexbridge.comJan 11, 2024
  14. brian m. carlsonJan 11, 2024
  15. rsbecker@nexbridge.comJan 11, 2024
  16. Trevor GrossJan 11, 2024
  17. rsbecker@nexbridge.comJan 11, 2024
  18. Trevor GrossJan 11, 2024
  19. Defining a platform support policy (Was: [DISCUSS] Introducing Rust into the Git project)Emily Shaffer, Jan 22, 2024
  20. rsbecker@nexbridge.comJan 23, 2024
  21. Junio C HamanoJan 23, 2024
  22. Junio C HamanoJan 23, 2024
  23. Elijah NewrenJan 24, 2024
  24. brian m. carlsonJan 10, 2024
  25. Elijah NewrenJan 11, 2024
  26. Dragan SimicJan 11, 2024
  27. Elijah NewrenJan 11, 2024
  28. Dragan SimicJan 17, 2024
  29. Elijah NewrenJan 24, 2024
  30. Dragan SimicJan 24, 2024
  31. Elijah NewrenJan 11, 2024
  32. Dragan SimicJan 11, 2024
  33. brian m. carlsonJan 11, 2024
  34. Sam JamesJan 11, 2024
  35. brian m. carlsonJan 11, 2024
  36. Sam JamesJan 12, 2024
  37. Antoni BoucherJan 12, 2024
  38. Trevor GrossJan 11, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.