You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Never edit `.cpp` or `.hpp` files directly** - they are generated
40
-
- Edit `.lzz` files only, then run `npm run lzz`
41
-
- Uses `#insert` directive (literal inclusion, not C++ #include)
42
-
- Single compilation unit architecture
43
-
- Order dependency matters in .lzz files
44
-
45
-
### LZZ Migration Status
46
-
This codebase is currently migrating away from LZZ (see `lzz-migration.md`). The current branch `no-lzz-20250428` contains migration work. Be aware that the build process may change during this transition.
35
+
### C++ Architecture
36
+
- Standard C++ source files (.cpp/.hpp)
37
+
- Modular header structure in `src/objects/` and `src/util/`
38
+
- Single compilation unit architecture maintained
39
+
- Uses standard C++ #include directives
47
40
48
41
## Native Addon Structure
49
42
@@ -72,7 +65,7 @@ Tests are organized by functionality in `test/`:
72
65
73
66
## Development Workflow
74
67
75
-
1.**For C++ changes**: Edit `.lzz` files → `npm run lzz` → `npm run build-release` → `npm test`
68
+
1.**For C++ changes**: Edit `.cpp/.hpp` files → `npm run build-release` → `npm test`
76
69
2.**For JavaScript changes**: Edit files in `lib/` → `npm test`
77
70
3.**Performance testing**: Use `npm run benchmark` after changes
Copy file name to clipboardExpand all lines: docs/contribution.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ If you've never written a native addon for Node.js before, you should start by r
52
52
53
53
#### C++
54
54
55
-
The C++ code in `better-sqlite3`is written using a tool called [`lzz`](https://github.com/WiseLibs/lzz), which alleviates the programmer from needing to write header files. If you plan on changing any C++ code, you'll need to edit `*.lzz` files and then re-compile them into `*.cpp` and `*.hpp`by running `npm run lzz` (while the `lzz` executable is in your PATH). You can learn how to download and install `lzz`[here](https://github.com/WiseLibs/lzz).
55
+
The C++ code in `better-sqlite3`uses standard C++ source files (`.cpp`) and header files (`.hpp`). The codebase is organized into modular components under `src/objects/` (core classes like Database, Statement) and `src/util/` (utilities and type conversion). When making C++ changes, edit the appropriate `.cpp` and `.hpp`files directly, then build with `npm run build-release`.
0 commit comments