-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Requires: #65 With this change we split the C include and the `pgzx` into 2 modules: - `pgzx_pgsys`: C includes and some custom C helpers - `pgzx`: High level Zig utilities and abstractions. The split is to prepare for code generation support. When generating Zig code on the fly the generated code is imported as a module into `pgzx`, but we also want the generated code to depend on the C includes. By splitting out the C support we can have the generated module import `pgsys` as a module dependency itself. The change follows the pattern in https://github.com/ziglang/zig/blob/master/test/standalone/dep_triangle/build.zig We still re-export `pgsys` under `pgzx.c`. Within `pgzx` we replace `const c = @import(...)` with `const pg = @import("pgzx_pgsys");`. Now Postgres API usage is always prefixed with `pg.*` instead of `c.*`, which is also more consistent on how we use the namespaces ourselves and in the example extensions.
- Loading branch information
Showing
24 changed files
with
583 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.