Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/destroyerrrocket/rustycpp
A C++ Compiler (on the works)
https://github.com/destroyerrrocket/rustycpp
compiler cpp rust
Last synced: about 21 hours ago
JSON representation
A C++ Compiler (on the works)
- Host: GitHub
- URL: https://github.com/destroyerrrocket/rustycpp
- Owner: Destroyerrrocket
- License: gpl-3.0
- Created: 2022-06-17T21:33:16.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-25T00:14:36.000Z (over 1 year ago)
- Last Synced: 2025-01-09T03:11:26.379Z (1 day ago)
- Topics: compiler, cpp, rust
- Language: Rust
- Homepage:
- Size: 2.82 MB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING
Awesome Lists containing this project
README
# C++20 preprocessor of C++ written in Rust
### Description
Module dependency tree generation is done!This is a very simple and most certainly wrong preprocessor for C++. This was not done with any major intents, it was simply to test Rust and its capabilities (I find learning by doing a lot more useful than just following tutorials).
As a rust novice, I do not claim this to be of any quality.
So far, the most rellevant missing things are:
- the #line directive is not supported (and probably won't for some time, I do not intend to support generated code for now :) )
- QOL Features of preprocessors, like any pragma directive (none mandated by standard, but #pragma once is expected from any sensible implementation), or the `__FUNCTION__` macro (which requires the step 7 parser to be implemented in order to know such information)
- Most test macros are kinda useless right now. `__has_cpp_attribute` is literally just hardcoded to 0I'd say that the first 4 steps of the compilation process of C++ are done-ish! Time for lexing.
If you want more logs on what's going on, you can use the environment varaible `RUST_LOG`, like so: `RUST_LOG=debug`