
Oh yes. I have built postgres server as a static library with no .data* or .bss sections, just .tdata and .tbss :)
* there are some .data.rel.ro symbols but they are for read only data anyway so they don't count
postgres logs/panics are now rust logs/panics :)
even RUST_BACKTRACE=1 Just Works :) :)
@hailey what are you doing next?
I recently tried to use Postgres as a library and unfortunately quickly discovered that there’s a lot of global state and global functions :/
@hailey aaah. I was trying to tweak the internals so that tables were not stored on disk, but I could use parts of the query engine. it was *complicated*.
but if you're just using the stock Postgres features then I guess librarizing it will be okay!
@judofyr I've got a branch off postgres 15.1 I've been working away on here: https://github.com/haileys/postgres/commits/minigres-15.1
Most of the large diffs there are automated, and otherwise I've tried to keep my changes localised to ease forward porting. There's also a bunch of code on the rust side that I'm working on in a private repo. Will see how it works out I guess!