[package]
name = "meli"
version = "0.5.1"
authors = ["Manos Pitsidianakis <el13635@mail.ntua.gr>"]
edition = "2018"

license = "GPL-3.0-or-later"
readme = "README"
description = "terminal mail client"
homepage = "https://meli.delivery"
repository = "https://git.meli.delivery/meli/meli.git"
keywords = ["mail", "mua", "maildir", "terminal", "imap"]
categories = ["command-line-utilities", "email"]

[dependencies]
xdg = "2.1.0"
crossbeam = "0.7.2"
nix = "0.17.0"
melib = { path = "melib", version = "0.5.0" }

serde = "1.0.71"
serde_derive = "1.0.71"
serde_json = "1.0"
toml = "0.5.3"
linkify = "0.4.0"
xdg-utils = "0.3.0"
notify = "4.0.1" # >:c
bincode = "1.2.0"
uuid = { version = "0.8.1", features = ["serde", "v4"] }
unicode-segmentation = "1.2.1" # >:c
libc = {version = "0.2.59", features = ["extra_traits",]}
rmp = "^0.8"
rmpv = { version = "^0.4.2", features=["with-serde",] }
rmp-serde = "^0.14.0"
smallvec = { version = "1.1.0", features = ["serde", ] }
bitflags = "1.0"
pcre2 = { version = "0.2.3", optional = true }
structopt = { version = "0.3.14", default-features = false }
svg_crate = { version = "0.8.0", optional = true, package = "svg" }
futures = "0.3.5"
async-task = "3.0.0"
num_cpus = "1.12.0"
wasm-bindgen = { version = "0.2.63", optional = true }

# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.6", optional = true }

# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
# compared to the default allocator's ~10K. It is slower than the default
# allocator, however.
#
# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
wee_alloc = { version = "0.4.5", optional = true }

[dependencies.js-sys]
version = "0.3.4"
optional=true
[dependencies.web-sys]
optional=true
version = "0.3.4"
features = [
  'Document',
  'Element',
  'HtmlElement',
  'EventTarget',
  'Node',
  'Window',
  'KeyboardEvent',
  'ErrorEvent',
  'Event',
  'Worker',
  'DedicatedWorkerGlobalScope',
  'MessageEvent',
  'CustomEvent',
  'CustomEventInit',
]

[build-dependencies]
syn = { version = "1.0.31", features = [] }
quote = "^1.0"
proc-macro2 = "1.0.18"


[workspace]
members = ["melib", "testing", ]

[features]
#default = ["sqlite3", "notmuch", "regexp", "smtp"]
default = ["wasm", "regexp"]
notmuch = ["melib/notmuch_backend", ]
jmap = ["melib/jmap_backend",]
sqlite3 = ["melib/sqlite3"]
smtp = ["melib/smtp"]
regexp = []#"pcre2"]
cli-docs = []
svgscreenshot = ["svg_crate"]
wasm = ["console_error_panic_hook", "svgscreenshot", "wasm-bindgen", "wee_alloc", "web-sys", "js-sys"]

# Print tracing logs as meli runs in stderr
# enable for debug tracing logs: build with --features=debug-tracing
debug-tracing = ["melib/debug-tracing", ]


[lib]
name = "meli"
path = "src/bin.rs"
crate-type = ["cdylib", "rlib"]

[dev-dependencies]
wasm-bindgen-test = "0.3.13"

[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
