| Crates.io | pg-extend |
| lib.rs | pg-extend |
| version | 0.2.1 |
| created_at | 2018-12-27 16:02:56.86861+00 |
| updated_at | 2018-12-28 00:57:48.633506+00 |
| description | A library for extending Postgres with Rust. |
| homepage | |
| repository | https://github.com/bluejekyll/pg-extend |
| max_upload_size | |
| id | 104062 |
| size | 15,667 |
The main things provided by this crate are some macros that help with writing Postgres extensions in Rust.
The objective (not all these are yet implemented):
PgDatum and TryFromPgDatum to Into<PgDatum>pg_magic macro for declaring libraries as Postgres extensionspg_extern attribute for wrapping Rust functions in Postgres C style definitionspalloc allocator and pfreelogFirst install Postgres. Once installed, this environment variable is required:
PG_INCLUDE_PATH=[/path/to/postgres]/include/server # e.g. /usr/local/pgsql/include/server
This environment variable is also required for the dynamic libraries to compile:
RUSTFLAGS="-C link-arg=-undefineddynamic_lookup"
This informs the linker that some of the symbols for postgres won't be available until runtime on the dynamic library load.