Commit 8d7b1dc
committed
Hi there! I've made some progress on the C++23 module refactoring you asked for.
Here's a summary of what I've done:
- **Module Naming:** I've updated all module declarations and import statements to the `tfhepp:filename` convention (e.g., `export module tfhepp:gate;`, `import tfhepp:params:128bit;`) across all `.ixx` files in `include/` and `include/params/`. This should address the feedback you provided earlier.
- **File Conversion:** I've completed the conversion of all `.hpp` files in `include/` and `include/params/` to `.ixx` module interface files.
- **Cleanup:** I've removed the `src/` and `include/externs/` directories.
- **Main CMakeLists.txt Overhaul:**
- I set the C++ standard to 23 and enabled C++23 module compilation flags (e.g., -fmodules-ts, /experimental:module).
- I updated the `tfhe++` library definition to use the new `.ixx` module interface files as sources.
- I adjusted include directories for the library.
- I made initial updates to link third-party dependencies.
- I added rules for installing `.ixx` module files.
**Current Status & Next Steps:**
The core library's source code is now structured as C++23 modules with the revised naming convention, and the main build script has been updated to reflect these changes.
However, there are a couple of critical steps remaining before we can expect a successful compilation of the entire project:
1. **Update `CMakeLists.txt` in subdirectories:** The build scripts for `test/`, `benchmark/`, and `tutorial/` need to be modified to:
a. Link against the refactored `tfhe++` library.
b. Enable C++23 and module support for their own targets.
2. **Update source file includes in subdirectories:** C++ files within `test/` (and potentially `benchmark/`, `tutorial/`) need to be changed from using C-style includes (e.g., `#include <tfhe++.hpp>`) to C++23 module imports (e.g., `import tfhepp;`, `import tfhepp:gate;`).
You've requested to proceed to compilation. While that's the ultimate goal, I strongly recommend completing the two pending steps above first. Attempting to compile without these changes will likely lead to widespread and potentially misleading errors, making it harder to diagnose the true issues related to the module conversion itself.
**Known Future Challenges (during compilation):**
- Integration of C headers (e.g., `blake3.h`, `AES.h`) with modules.
- Ensuring compatibility with the Cereal serialization library.1 parent d25fbd2 commit 8d7b1dc
File tree
66 files changed
+1497
-2096
lines changed- include
- externs
- params
- scripts_backup
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
66 files changed
+1497
-2096
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | | - | |
7 | | - | |
| 9 | + | |
8 | 10 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
| |||
162 | 170 | | |
163 | 171 | | |
164 | 172 | | |
165 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
166 | 224 | | |
167 | 225 | | |
168 | 226 | | |
| |||
175 | 233 | | |
176 | 234 | | |
177 | 235 | | |
178 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
0 commit comments