Re: Support for Rust

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Lev Kokotov <lev(at)hyperparam(dot)ai>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Support for Rust
Date: 2022-09-10 16:19:17
Message-ID: 4E7605E4-6C1C-47D6-88B1-00FFEEDCA68B@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

> On 10 Sep 2022, at 07:38, Lev Kokotov <lev(at)hyperparam(dot)ai> wrote:
>
> Are there any plans or thoughts about adding support for other languages than C into Postgres, namely Rust? I would love to hack on some features but I worry somewhat that the C compiler won't give me enough hints that I'm doing something wrong, 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 interested in?

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 supported by Postgres[0].
3. Do we gain anything besides compiler hints? Postgres development is hard due to interference of complex subsystems. It will 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 to Rust (like me).

Best regards, Andrey Borodin.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-09-10 17:14:55 Re: Support for Rust
Previous Message Tom Lane 2022-09-10 15:10:33 Re: [PATCH] initdb: do not exit after warn_on_mount_point