Use modern config for maturin. (#16394)

This allows maturin >= 0.15 to build the properly named
shared library object.

For now the old configuration is also kept to allow for
older maturin installs to be used.
This commit is contained in:
Patrick Cloke 2023-09-28 07:01:16 -04:00 committed by GitHub
parent 11c6cc1115
commit c690fd16c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

1
changelog.d/16394.misc Normal file
View File

@ -0,0 +1 @@
Update maturin configuration.

View File

@ -92,6 +92,7 @@ skip_gitignore = true
[tool.maturin]
manifest-path = "rust/Cargo.toml"
module-name = "synapse.synapse_rust"
[tool.poetry]
name = "matrix-synapse"

View File

@ -15,6 +15,8 @@ name = "synapse"
# tests/benchmarks.
crate-type = ["lib", "cdylib"]
# This is deprecated, see tool.maturin in pyproject.toml.
# It is left here for compatibilty with maturin < 0.15.
[package.metadata.maturin]
# This is where we tell maturin where to place the built library.
name = "synapse.synapse_rust"