1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-12-02 14:15:13 -05:00
alacritty/alacritty_terminal/Cargo.toml

48 lines
1.2 KiB
TOML
Raw Normal View History

[package]
name = "alacritty_terminal"
2021-02-19 18:59:48 -05:00
version = "0.13.0"
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"
2020-06-06 18:07:22 -04:00
base64 = "0.12.0"
regex-automata = "0.1.9"
dirs = "2.0.2"
[target.'cfg(unix)'.dependencies]
nix = "0.18.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
[features]
2020-11-06 12:33:02 -05:00
default = []
bench = []
[dev-dependencies]
serde_json = "1.0.0"