aconv 0.1.1

Converts texts from the auto-detected encoding to UTF-8 or a specified encoding
Documentation
# This is a cargo-make setting file.
#
# Tasks can be excuetd by:
#  cargo make [TASK_NAME]
# e.g.
#  cargo make coverage
#
# About source-based code coverage:
#  https://github.com/mozilla/grcov#example-how-to-generate-source-based-coverage-for-a-rust-project
#  https://marco-c.github.io/2020/11/24/rust-source-based-code-coverage.html
#

[config]
default_to_workspace = false

[tasks.clean-profraw]
script_runner = "@duckscript"
script = '''
files = glob_array ./**/*.profraw
for f in ${files}
  rm ${f}
end
'''

[tasks.llvm_install]
toolchain = "nightly"
install_crate = { rustup_component_name = "llvm-tools-preview" }

# Extends the setting in the built-in settings file:
#  https://github.com/sagiegurari/cargo-make/blob/ee4e8b40319532079750d26c7d2415c0c6fbc306/src/lib/descriptor/makefiles/rust.toml#L387
[tasks.build-cov]
extend = "build"
toolchain = "nightly"
env = { RUSTFLAGS="-Zinstrument-coverage" }
dependencies = ["llvm_install", "clean-profraw"]

# Extends the setting in the built-in settings file:
#  https://github.com/sagiegurari/cargo-make/blob/ee4e8b40319532079750d26c7d2415c0c6fbc306/src/lib/descriptor/makefiles/rust.toml#L411
[tasks.test-cov]
extend = "test"
toolchain = "nightly"
env = { LLVM_PROFILE_FILE="coverage-%p-%m.profraw", RUST_LOG="debug" }
dependencies = ["build-cov"]
args = [
  "test",
  "--workspace",
  "${@}",
]

# Overwrites the tasks.coverage setting in the built-in settings file:
#  https://github.com/sagiegurari/cargo-make/blob/ee4e8b40319532079750d26c7d2415c0c6fbc306/src/lib/descriptor/makefiles/rust-coverage.toml
[tasks.coverage]
clear = true
description = "Runs source-based code coverage."
category = "Test"
script_runner = "@shell"
script = "RUSTUP_TOOLCHAIN=nightly grcov . --binary-path ./target/debug -s . -t html --branch --ignore-not-existing -o ./target/debug/coverage/"
dependencies = ["test-cov"]

[tasks.cov]
alias = "coverage"

# Extends the setting in the built-in settings file:
#  https://github.com/sagiegurari/cargo-make/blob/ee4e8b40319532079750d26c7d2415c0c6fbc306/src/lib/descriptor/makefiles/rust.toml#L411
[tasks.test-debug]
extend = "test"
args = ["test", "--", "--nocapture"]
env = { RUST_LOG="debug" }