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

55 lines
1.4 KiB
TOML
Raw Normal View History

[package]
name = "alacritty_terminal"
2023-05-21 20:06:19 -04:00
version = "0.19.1-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"
2021-12-26 11:47:57 -05:00
edition = "2021"
2023-05-16 02:35:25 -04:00
rust-version = "1.65.0"
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.2.2-dev"
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]
path = "../alacritty_config"
version = "0.1.2-dev"
[dependencies]
base64 = "0.13.0"
2023-05-16 00:34:03 -04:00
bitflags = { version = "2.2.1", features = ["serde"] }
home = "0.5.5"
libc = "0.2"
log = "0.4"
mio = "0.6.20"
mio-extras = "2"
parking_lot = "0.12.0"
regex-automata = "0.1.9"
serde = { version = "1", features = ["derive", "rc"] }
serde_yaml = "0.8"
toml = "0.7.1"
unicode-width = "0.1"
vte = { version = "0.11.1", default-features = false, features = ["ansi", "serde"] }
[target.'cfg(unix)'.dependencies]
2023-05-16 02:35:25 -04:00
nix = { version = "0.26.2", default-features = false, features = ["term"] }
2021-11-14 19:56:27 -05:00
signal-hook = "0.3.10"
signal-hook-mio = { version = "0.2.1", features = ["support-v0_6"] }
[target.'cfg(windows)'.dependencies]
mio-anonymous-pipes = "0.2"
miow = "0.3"
windows-sys = { version = "0.48", features = [
2022-09-30 07:49:02 -04:00
"Win32_System_Console",
"Win32_Foundation",
"Win32_Security",
"Win32_System_LibraryLoader",
2022-09-30 07:49:02 -04:00
"Win32_System_Threading",
"Win32_System_WindowsProgramming",
]}
2019-04-28 14:12:36 -04:00
[dev-dependencies]
serde_json = "1.0.0"