jdrouet/mrml

View on GitHub
packages/mrml-core/Cargo.toml

Summary

Maintainability
Test Coverage
[package]
name = "mrml"
description = "Rust implementation of MJML renderer"
keywords = ["email", "mjml"]
version = "4.0.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
readme = "readme.md"

include = ["src/*", "Cargo.toml"]

[badges]
codecov = { repository = "jdrouet/mrml", branch = "main" }
travis-ci = { repository = "jdrouet/mrml", branch = "main" }

[features]
default = ["json", "parse", "print", "render"]
json = ["dep:serde", "dep:serde_json", "indexmap/serde"]
parse = ["dep:htmlparser", "dep:thiserror"]
print = ["dep:enum_dispatch"]
render = ["dep:enum-as-inner", "dep:thiserror"]
async = ["dep:async-trait"]
local-loader = []
http-loader = ["http-loader-ureq"]
http-loader-base = ["parse", "dep:url"]
http-loader-blocking-reqwest = [
    "dep:reqwest",
    "http-loader-base",
    "reqwest/blocking",
]
http-loader-async-reqwest = ["dep:reqwest", "async", "http-loader-base"]
http-loader-ureq = ["dep:ureq", "http-loader-base"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
async-trait = { version = "0.1", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
htmlparser = { workspace = true, optional = true }
indexmap = { version = "2.6", default-features = false }
rustc-hash = { version = "2.0", default-features = false }
thiserror = { version = "1.0", optional = true }

# http-loader feature related
reqwest = { version = "0.12", default-features = false, features = [
    "rustls-tls",
], optional = true }
ureq = { version = "2.10", optional = true }
url = { version = "2.5", optional = true }

# macros
itertools = { version = "0.13" }
enum_dispatch = { version = "0.3", optional = true }
enum-as-inner = { version = "0.6", optional = true }

[dev-dependencies]
concat-idents = "1.1"
criterion = "0.5"
html-compare = { version = "0.1", path = "./lib/html-compare" }
similar-asserts = { workspace = true }
mockito = "1.5"
tokio = { version = "1.0", features = ["full"] }
tokio-test = { version = "0.4" }

[[bench]]
name = "basic"
path = "benches/basic.rs"
harness = false

[[bench]]
name = "template"
path = "benches/template.rs"
harness = false