# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.60"
name = "ctor"
version = "1.0.2"
authors = ["Matt Mastracci <matthew@mastracci.com>"]
build = false
exclude = ["tests"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Global, no_std-compatible constructors for all platforms that run before main (like C/C++ __attribute__((constructor)))"
readme = "README.md"
categories = [
    "development-tools::build-utils",
    "no-std",
    "no-std::no-alloc",
    "embedded",
    "development-tools::procedural-macro-helpers",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/mmastrac/linktime"

[features]
default = [
    "std",
    "proc_macro",
    "priority",
]
priority = ["dep:link-section"]
proc_macro = ["dep:linktime-proc-macro"]
std = []

[lib]
name = "ctor"
path = "src/lib.rs"

[[example]]
name = "ctor-advanced"
path = "examples/ctor-advanced.rs"

[[example]]
name = "ctor-basic"
path = "examples/ctor-basic.rs"

[[example]]
name = "ctor-dynamic"
path = "examples/ctor-dynamic.rs"

[[example]]
name = "ctor-example"
path = "examples/ctor-example.rs"

[[example]]
name = "ctor-statics"
path = "examples/ctor-statics.rs"

[dependencies.link-section]
version = "0.15.0"
optional = true
default-features = false

[dependencies.linktime-proc-macro]
version = "0.1.0"
features = ["ctor"]
optional = true

[dev-dependencies.libc-print]
version = "0.3"

[dev-dependencies.macrotest]
version = "1"

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.trybuild]
version = "1"

[dev-dependencies.walkdir]
version = "2"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(linktime_no_fail_on_missing_unsafe)",
    "cfg(linktime_used_linker)",
]
