2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-01 01:59:58 +00:00
pict-rs/releases/0.5.2.md

1.9 KiB

pict-rs 0.5.2

Overview

A quick release to improve postgres support.

Changes

Upgrade Notes

There's no significant changes from 0.5.1, so upgrading should be as simple as pulling a new version of pict-rs.

Descriptions

Support TLS in Postgres Connections

The postgres repo now supports some new options to enable connecting via TLS. If the postgres server's certificate is not generally trusted, a CA certificate can be provided to pict-rs to allow it to trust the postgres connection.

If the postgres endpoint uses TLS and has a publicly trusted certificate, the configuration can be updated to simply add use_tls = true

[repo]
type = 'postgres'
url = 'postgres://pictrs:1234@localhost:5432/pictrs'
use_tls = true

or with environment variables

PICTRS__REPO__TYPE=postgres
PICTRS__REPO__URL=postgres://pictrs:1234@localhost:5432/pictrs
PICTRS__REPO__USE_TLS=true

If the server uses a self-signed certificate, the CA's certificate can be added to pict-rs' trusted CAs.

[repo]
type = 'postgres'
url = 'postgres://pictrs:1234@localhost:5432/pictrs'
use_tls = true
certificate_file = '/path/to/ca/certificate.crt'

or with environment variables

PICTRS__REPO__TYPE=postgres
PICTRS__REPO__URL=postgres://pictrs:1234@localhost:5432/pictrs
PICTRS__REPO__USE_TLS=true
PICTRS__REPO__CERTIFICATE_FILE=/path/to/ca/certificate.crt

Compiler Version Requirements

pict-rs 0.5.2 now takes advantage of rust's native support for AFIT (Async Fn In Trait) for the store trait. This trait already was not object-safe, so using AFIT does not come with any downsides. This does mean that the minimum supported rust version for building pict-rs is now 1.75, which released in December 2023.