Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wjt5j-000Lc9-36 for pgsql-pkg-yum@arkaria.postgresql.org; Wed, 15 Jul 2026 06:27:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wjt5h-006AmI-1x for pgsql-pkg-yum@arkaria.postgresql.org; Wed, 15 Jul 2026 06:27:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wjpby-005pH8-2g; Wed, 15 Jul 2026 02:44:38 +0000 Received: from cross.elm.relay.mailchannels.net ([23.83.212.46]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wjpbv-00000000FFF-2d81; Wed, 15 Jul 2026 02:44:37 +0000 X-Sender-Id: hostingeremail|x-authuser|david@pgbackrest.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7D13E4E12C2; Wed, 15 Jul 2026 02:44:34 +0000 (UTC) Received: from de-fra-smtpout4.hostinger.io (100-103-92-160.trex-nlb.outbound.svc.cluster.local [100.103.92.160]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 6A70C4E1089; Wed, 15 Jul 2026 02:44:33 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|david@pgbackrest.org X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|david@pgbackrest.org X-MailChannels-Auth-Id: hostingeremail X-Eyes-Illustrious: 473aa1fb3b8a4f7b_1784083474312_2187451236 X-MC-Loop-Signature: 1784083474312:3992515731 X-MC-Ingress-Time: 1784083474312 Received: from de-fra-smtpout4.hostinger.io (de-fra-smtpout4.hostinger.io [148.222.55.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.92.160 (trex/8.0.2); Wed, 15 Jul 2026 02:44:34 +0000 Received: from [10.5.0.2] (unknown [94.140.8.242]) (Authenticated sender: david@pgbackrest.org) by smtp.hostinger.com (smtp.hostinger.com) with ESMTPSA id 4h0L9V46Qcz3xXf; Wed, 15 Jul 2026 02:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgbackrest.org; s=hostingermail-a; t=1784083471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XavZX9jJyF45on3pjQc7mhb646GZE6zcMuPuL+r1gH0=; b=MYLUVU/zyQC7HAicefVzx8lG9lbUUTnx6gq2YQyRXQe8yzOFm2fkzeqGH97fd3HqAFe23t zzKVdIxUHhA43rWrQIo62Y+W3T+JrWAtmB1EXcQ8MWd8BK68EuaWdW4qvb66Ku7B4SHM8o fCsA7Hzevcs8EHXxKY6s8W8IxjirmG6Jc41/6+UbDKKPddmMId57Rp91ipFIq+KBMapCiL 8sDVMVuUZqzF2WolZax1riYysqbXwUVkuPIml8krZvARaAOpsHxJMWerJumtmeKt8tCBf/ RNtFMgssq5qEts/33OThPDO0IkC72Hk+rTMIK+aDHOtLx3utXnFHn9jZNut00Q== Message-ID: <7e1f2552-82c3-40c6-baf1-ef65cfd0ac30@pgbackrest.org> MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: pgsql-pkg-debian@lists.postgresql.org, pgsql-pkg-yum@lists.postgresql.org From: David Steele Subject: Migration of pgBackRest internal support tools to Rust. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 15 Jul 2026 02:44:30 +0000 (UTC) X-CM-Analysis: v=2.4 cv=etGNzZpX c=1 sm=1 tr=0 ts=6a56f40f a=n3pQflgU+W+zDbWWQ6pAhw==:117 a=n3pQflgU+W+zDbWWQ6pAhw==:17 a=IkcTkHD0fZMA:10 a=y66ejBsUEid1ecVpTjUA:9 a=QEXdDO2ut3YA:10 X-CM-Envelope: MS4xfCuvc254Ww4tLupwXmdhvj3drwMHQK8B+F3Yx1edj8wTcoao3d9/h4Ah3gZ6O2kanfpRGJPXajT4q4FU1BmI6PeUr/G+TqonZ+IRMKI0Udb4YKGo9/jw NOHDxDQbtEcopOAv0PHhq7e45zDBsPiLE+Xa9Dd3H+rwyQPtBX+qbaRXtA1lCu3KlZ6+2xexQibywgn1oc3+hDcpsJOF+eAhXy/GjgGn7Vbs4jMoPp3kuDaE KsLhKdM3NPResOkpcPpGLg== X-AuthUser: david@pgbackrest.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Greetings Packagers, I'm considering migrating the pgBackRest support tools to Rust and I'd appreciate any feedback on how this would affect packaging. To be clear, the pgBackRest binary itself would stay in C, so this only affects the internal build and support tooling. We have three internal tools that support pgBackRest: - Code generation (/src/build), which is written entirely in C and is the simplest of the three. It reads various YAML files and does code generation for configuration, help, errors, and support for various PostgreSQL versions. Most of the generated code is checked in with a couple of exceptions: - src/command/help/help.auto.c.inc - this is compressed binary data for the command line help. It is not checked in because even small changes to the help tend to rewrite the entire file. - src/postgres/interface.auto.c.inc - this defines the interface to each supported version of PostgreSQL using data structures pulled from PostgreSQL and macros that define functions. It is low churn but is not that useful for review purposes so it is not checked in, but it could be. All packages currently run code generation since it is baked into the meson build. So if the generator moves to Rust, every package would need Rust at build time unless the generated files are shipped with the release. - Second is doc generation (/doc). This is about 1/3 C and the rest is still in Perl. The code builds and executes the user guide and other source XML and outputs HTML, markdown, and man pages. Most of the complexity is in the Perl code but none of it is too complicated. The Debian package uses the doc generator. - Last is the test harness (/test), which is also about 1/3 C and the rest in Perl. In addition to running tests this code manages code generation, linting, container builds, code formatting, etc. The unit and integration tests have to stay in C but the harness can be in any language. I'm not aware of any packages that run our tests, though. Rather than complete the migration from Perl to C, I would prefer to just migrate all of it to Rust. Rust is a powerful language with rich libraries that would make my life much easier and in the long run save time. I prototyped migrating the test harness C code to Rust and it looks pretty good. The easiest thing would be for the packagers to provide Rust in the build environment so code generation can run and packages can build documentation or run tests as they please, but my understanding is that Rust is problematic for some packages, and even where it is supported the selection of crates would be limited with potential version issues for older distros. My proposal is to provide the files that are currently generated at build time (html documentation, man pages, help.auto.c.inc, interface.auto.c.inc) in each release either by checking them into the repo with each release or by providing a dist tarball that adds the generated files. The former option would require no changes for packages while the latter would require pointing at a new tarball. Either way, no new dependencies are required and in fact a few could be dropped, e.g. Perl and libyaml. Would either approach cause problems for your packaging, and do you have a preference? Please let me know if you see any other issues. Thanks, -David