Cargo.toml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [workspace]
  2. members = ["**/src/.."]
  3. #edition = "2018" #unused key, in workspace! unused manifest key: workspace.edition
  4. exclude = ["helper_scripts", ".git", "**/.git", "target", "**/target" ]
  5. #^ https://doc.rust-lang.org/glob/glob/struct.Pattern.html
  6. #license = "MIT/Apache-2.0 OR CC0 OR UNLICENSE" #unused manifest key: workspace.license
  7. #Careful, these profile sections only have effect in here! so,
  8. #warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
  9. #package: ${HOME}/build/2nonpkgs/rust.stuff/rustlearnage/recompile_self/Cargo.toml
  10. #doc: https://doc.crates.io/manifest.html#the-profile-sections
  11. #https://doc.rust-lang.org/cargo/reference/manifest.html
  12. # The development profile, used for `cargo build`.
  13. [profile.dev]
  14. debug = true # (u32 or bool) Include debug information (debug symbols).
  15. # Equivalent to `-C debuginfo=2` compiler flag.
  16. #debug-assertions = false
  17. debug-assertions = true # default
  18. # controls whether debug assertions are enabled
  19. # (e.g. debug_assert!() and arithmetic overflow checks)
  20. incremental = true # whether or not incremental compilation is enabled
  21. overflow-checks = true # use overflow checks for integer arithmetic.
  22. # Passes the `-C overflow-checks=...` flag to the compiler.
  23. panic = 'unwind' # panic strategy (`-C panic=...`), can also be 'abort'
  24. codegen-units = 16 # if > 1 enables parallel code generation which improves
  25. # compile times, but prevents some optimizations.
  26. # Passes `-C codegen-units`.
  27. opt-level = 0 # controls the `--opt-level` the compiler builds with.
  28. # 0-1 is good for debugging. 2 is well-optimized. Max is 3.
  29. # 's' attempts to reduce size, 'z' reduces size even more.
  30. lto=false #due to incremental being true (see below)
  31. # The release profile, used for `cargo build --release`.
  32. [profile.release]
  33. debug = false
  34. opt-level = 3
  35. debug-assertions = true
  36. #debug-assertions = false #default
  37. #purposefully flipped debug-assertions for testing purposes! now back to normal(true for both)
  38. lto = true # Link Time Optimization usually reduces size of binaries
  39. # and static libraries. Increases compilation time.
  40. # If true, passes `-C lto` flag to the compiler, and if a
  41. # string is specified like 'thin' then `-C lto=thin` will
  42. # be passed.
  43. # error: can't perform LTO when compiling incrementally
  44. rpath = false # controls whether compiler should set loader paths.
  45. # If true, passes `-C rpath` flag to the compiler.
  46. codegen-units = 1
  47. panic = 'unwind'
  48. incremental = false # false due to lto=true otherwise: error: can't perform LTO when compiling incrementally
  49. overflow-checks = true #hmm... false seems unwise here!
  50. # The testing profile, used for `cargo test`.
  51. [profile.test]
  52. opt-level = 0
  53. debug = 2
  54. rpath = false
  55. lto = false #error: can't perform LTO when compiling incrementally
  56. debug-assertions = true
  57. codegen-units = 16
  58. panic = 'unwind'
  59. incremental = true #
  60. overflow-checks = true
  61. # The benchmarking profile, used for `cargo bench` and `cargo test --release`.
  62. [profile.bench]
  63. opt-level = 3
  64. debug = false
  65. rpath = false
  66. lto = true #error: can't perform LTO when compiling incrementally
  67. debug-assertions = false
  68. codegen-units = 16
  69. panic = 'unwind'
  70. incremental = false # false due to lto=true
  71. overflow-checks = false
  72. ##doesn't work here(in workspace's Cargo.toml):
  73. #[package]
  74. ## ...
  75. #publish = false
  76. #edition = '2018'