2022-06-07 14:43:17 +00:00
|
|
|
# Pass the rustflags specified to host dependencies (build scripts, proc-macros)
|
|
|
|
# when a `--target` is passed to Cargo. Historically this was not the case, and
|
|
|
|
# because of that, cross-compilation would not set the rustflags configured
|
2023-09-01 08:43:52 +00:00
|
|
|
# below in `target.'cfg(...)'` for them, resulting in cache invalidation.
|
2022-06-07 14:43:17 +00:00
|
|
|
#
|
|
|
|
# Since this is an unstable feature (enabled at the bottom of the file), this
|
|
|
|
# setting is unfortunately ignored on stable toolchains, but it's still better
|
|
|
|
# to have it apply on nightly than using the old behavior for all toolchains.
|
|
|
|
target-applies-to-host = false
|
|
|
|
|
2022-03-02 17:43:45 +00:00
|
|
|
[alias]
|
|
|
|
xtask = "run --package xtask --"
|
2023-02-01 10:22:28 +00:00
|
|
|
uniffi-bindgen = "run --package uniffi-bindgen --"
|
2022-03-02 17:43:45 +00:00
|
|
|
|
2021-07-02 16:05:34 +00:00
|
|
|
[doc.extern-map.registries]
|
|
|
|
crates-io = "https://docs.rs/"
|
2022-03-03 12:41:23 +00:00
|
|
|
|
2023-09-01 08:43:52 +00:00
|
|
|
# Exclude tarpaulin, android and ios from extra lints since on stable, without
|
|
|
|
# the nightly-only target-applies-to-host setting at the top, cross compilation
|
|
|
|
# and otherwise changing cfg's can be very bad for caching. These should never
|
|
|
|
# be the default either and don't have much target-specific code that would
|
|
|
|
# benefit from the extra lints.
|
|
|
|
[target.'cfg(not(any(tarpaulin, target_os = "android", target_os = "ios")))']
|
2022-03-03 12:41:23 +00:00
|
|
|
rustflags = [
|
|
|
|
"-Wrust_2018_idioms",
|
|
|
|
"-Wsemicolon_in_expressions_from_macros",
|
2022-03-09 17:09:02 +00:00
|
|
|
"-Wunused_extern_crates",
|
2022-03-03 12:41:23 +00:00
|
|
|
"-Wunused_import_braces",
|
|
|
|
"-Wunused_qualifications",
|
2022-03-09 17:09:02 +00:00
|
|
|
"-Wtrivial_casts",
|
|
|
|
"-Wtrivial_numeric_casts",
|
2022-03-08 13:19:45 +00:00
|
|
|
"-Wclippy::cloned_instead_of_copied",
|
|
|
|
"-Wclippy::dbg_macro",
|
|
|
|
"-Wclippy::inefficient_to_string",
|
|
|
|
"-Wclippy::macro_use_imports",
|
|
|
|
"-Wclippy::mut_mut",
|
|
|
|
"-Wclippy::needless_borrow",
|
|
|
|
"-Wclippy::nonstandard_macro_braces",
|
2022-03-08 11:59:34 +00:00
|
|
|
"-Wclippy::str_to_string",
|
2022-03-08 13:19:45 +00:00
|
|
|
"-Wclippy::todo",
|
2022-03-03 12:41:23 +00:00
|
|
|
]
|
2022-06-07 14:43:17 +00:00
|
|
|
|
2023-08-25 11:27:08 +00:00
|
|
|
[target.'cfg(target_arch = "wasm32")']
|
|
|
|
rustflags = [
|
|
|
|
# We have some types that are !Send and/or !Sync only on wasm, it would be
|
|
|
|
# slightly more efficient, but also pretty annoying, to wrap them in Rc
|
|
|
|
# where we would use Arc on other platforms.
|
|
|
|
"-Aclippy::arc_with_non_send_sync",
|
|
|
|
]
|
|
|
|
|
2022-06-07 14:43:17 +00:00
|
|
|
# activate the target-applies-to-host feature.
|
|
|
|
# Required for `target-applies-to-host` at the top to take effect.
|
|
|
|
[unstable]
|
2022-06-13 12:10:54 +00:00
|
|
|
rustdoc-map = true
|
2022-06-07 14:43:17 +00:00
|
|
|
target-applies-to-host = true
|