1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00
alacritty/alacritty_terminal/Cargo.toml

44 lines
1.1 KiB
TOML
Raw Normal View History

[package]
name = "alacritty_terminal"
version = "0.13.0-dev"
authors = ["Christian Duerr <contact@christianduerr.com>", "Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0"
description = "Library for writing terminal emulators"
readme = "../README.md"
homepage = "https://github.com/alacritty/alacritty"
edition = "2018"
Replace serde's derive with custom proc macro This replaces the existing `Deserialize` derive from serde with a `ConfigDeserialize` derive. The goal of this new proc macro is to allow a more error-friendly deserialization for the Alacritty configuration file without having to manage a lot of boilerplate code inside the configuration modules. The first part of the derive macro is for struct deserialization. This takes structs which have `Default` implemented and will only replace fields which can be successfully deserialized. Otherwise the `log` crate is used for printing errors. Since this deserialization takes the default value from the struct instead of the value, it removes the necessity for creating new types just to implement `Default` on them for deserialization. Additionally, the struct deserialization also checks for `Option` values and makes sure that explicitly specifying `none` as text literal is allowed for all options. The other part of the derive macro is responsible for deserializing enums. While only enums with Unit variants are supported, it will automatically implement a deserializer for these enums which accepts any form of capitalization. Since this custom derive prevents us from using serde's attributes on fields, some of the attributes have been reimplemented for `ConfigDeserialize`. These include `#[config(flatten)]`, `#[config(skip)]` and `#[config(alias = "alias)]`. The flatten attribute is currently limited to at most one per struct. Additionally the `#[config(deprecated = "optional message")]` attribute allows easily defining uniform deprecation messages for fields on structs.
2020-12-20 21:44:38 -05:00
[dependencies.alacritty_config_derive]
path = "../alacritty_config_derive"
version = "0.1.0"
[dependencies]
libc = "0.2"
bitflags = "1"
parking_lot = "0.11.0"
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.8"
2021-01-03 06:04:52 -05:00
vte = { version = "0.10.0", default-features = false }
mio = "0.6.20"
mio-extras = "2"
log = "0.4"
unicode-width = "0.1"
2021-02-24 12:52:35 -05:00
base64 = "0.13.0"
regex-automata = "0.1.9"
dirs = "3.0.1"
[target.'cfg(unix)'.dependencies]
nix = "0.19.0"
signal-hook = { version = "0.1", features = ["mio-support"] }
[target.'cfg(windows)'.dependencies]
miow = "0.3"
winapi = { version = "0.3.7", features = [
"impl-default", "basetsd", "libloaderapi", "minwindef", "ntdef", "processthreadsapi", "winbase",
"wincon", "wincontypes", "winerror", "winnt", "winuser",
]}
mio-anonymous-pipes = "0.1"
2019-04-28 14:12:36 -04:00
[dev-dependencies]
serde_json = "1.0.0"