1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-10-27 05:32:54 -04:00
alacritty/alacritty_terminal/Cargo.toml

53 lines
1.3 KiB
TOML
Raw Normal View History

[package]
name = "alacritty_terminal"
version = "0.20.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"
2021-12-26 11:47:57 -05:00
edition = "2021"
rust-version = "1.70.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.21.3"
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"
parking_lot = "0.12.0"
polling = "3.0.0"
regex-automata = "0.3.6"
serde = { version = "1", features = ["derive", "rc"] }
serde_yaml = "0.9.25"
toml = "0.8.2"
unicode-width = "0.1"
2023-09-26 12:48:19 -04:00
vte = { version = "0.12.0", default-features = false, features = ["ansi", "serde"] }
[target.'cfg(unix)'.dependencies]
rustix-openpty = "0.1.1"
2021-11-14 19:56:27 -05:00
signal-hook = "0.3.10"
[target.'cfg(windows)'.dependencies]
piper = "0.2.1"
miow = "0.6.0"
windows-sys = { version = "0.48.0", 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"