Re: Support for Rust - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Support for Rust
Date
Msg-id 4E7605E4-6C1C-47D6-88B1-00FFEEDCA68B@yandex-team.ru
Whole thread Raw
In response to Support for Rust  (Lev Kokotov <lev@hyperparam.ai>)
List pgsql-hackers
Hi!

> On 10 Sep 2022, at 07:38, Lev Kokotov <lev@hyperparam.ai> wrote:
>
> Are there any plans or thoughts about adding support for other languages than C into Postgres, namely Rust? I would
loveto hack on some features but I worry somewhat that the C compiler won't give me enough hints that I'm doing
somethingwrong, and the Rust compiler has been excellent at preventing bugs. 

You can write Postgres extensions in Rust. And Postgres extensions are really powerful. What kind of features are you
interestedin? 

Undoubtedly, attracting Rust folks to contribute Postgres could be a good things.
Yet some very simple questions arise.
1. Is Rust compatible with Memory Contexts and shared memory constructs of Postgres? With elog error reporting,
PG_TRY()and his friends? 
2. Does Rust support same set of platforms as Postgres? Quick glance at Build Farm can give an impression of what is
supportedby Postgres[0]. 
3. Do we gain anything besides compiler hints? Postgres development is hard due to interference of complex subsystems.
Itwill be even harder if those systems will be implemented in different languages. 

Probably, answers to all these questions are obvious to Rust pros. I just think this can be of interest to someone new
toRust (like me). 


Best regards, Andrey Borodin.

[0] https://buildfarm.postgresql.org/cgi-bin/show_members.pl


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] initdb: do not exit after warn_on_mount_point
Next
From: Nathan Bossart
Date:
Subject: Re: Support for Rust