|
|
Subscribe / Log in / New account

A deeper look into the GCC Rust front-end

A deeper look into the GCC Rust front-end

Posted Oct 11, 2022 12:46 UTC (Tue) by beagnach (guest, #32987)
Parent article: A deeper look into the GCC Rust front-end

> libproc... implements procedural macros; it forces the compiler to act as a server, sending tokens to a separate libproc executable. That means implementing a remote procedure call server in the compiler front-end

But... Why?


to post comments

A deeper look into the GCC Rust front-end

Posted Oct 11, 2022 13:12 UTC (Tue) by pbonzini (subscriber, #60935) [Link] (2 responses)

Because procedural macros are implemented as Rust code and their implementation does not depend on the front-end's implementation of the token stream.

Note however that the link to libproc is incorrect. I am not sure if the authors meant proc_macro (https://doc.rust-lang.org/proc_macro/index.html) or something else.

libproc

Posted Oct 11, 2022 14:11 UTC (Tue) by corbet (editor, #1) [Link] (1 responses)

Hmm yes that link is clearly wrong, I should have noticed that. I'm not sure what should be linked, so I've just taken the wrong one out. Apologies for the confusion.

proc_macro

Posted Oct 12, 2022 16:47 UTC (Wed) by mjw (subscriber, #16740) [Link]

This was indeed about proc_macro "A support library for macro authors when defining new macros" https://doc.rust-lang.org/stable/proc_macro/


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds