Skip to content

Make configuration more reliable with stronger typing #35

@riley-harper

Description

@riley-harper

We've thought about making use of Rust for this, because the way it handles this stuff with serde is cool. The more free parsing of Python may make this change hard to do in a completely backwards-compatible manner. Some TOML formatting issues that the Python parser handles might cause errors when parsed with Rust.

The general idea is to use maturin to build the Rust crate as a Python module, then call that module from existing Python to parse the hlink config file. We could use the Rust toml crate, which has support for defining the configuration as a Rust struct with derive macros. With some magic from the Rust serde crate, we can parse an enumeration like comparison types without any changes to the current configuration format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationRelated to configuration and its syntax

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions