Repository: static-web-server/static-web-server (language: rust)

Issue:
help: found config with similar value: `target_family = "wasm"`
### Search for duplicate issues

- [X] I already searched, and this issue is not a duplicate.

### Issue scope

Build target (binary)

### Describe the bug

Compiling fails.

### How to reproduce it

```sh
   Compiling static-web-server v2.30.0 (/home/yonas/.cargo/git/checkouts/static-web-server-d0678737845d2249/cfd8bb1)
error: unexpected `cfg` condition name: `wasm`
  --> src/settings/cli.rs:56:13
   |
56 |         not(wasm),
   |             ^^^^ help: found config with similar value: `target_family = "wasm"`
   |
   = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_gen
eralize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `ta
rget_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
   = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(wasm)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
note: the lint level is defined here
  --> src/lib.rs:99:9
   |
99 | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(unexpected_cfgs)]` implied by `#[deny(warnings)]`

error: unexpected `cfg` condition name: `wasm`
  --> src/settings/cli.rs:65:9
   |
65 |         wasm,
   |         ^^^^ help: found config with similar value: `target_family = "wasm"`
   |
   = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(wasm)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

error: unexpected `cfg` condition name: `wasm`
  --> src/settings/cli.rs:80:13
   |
80 |         not(wasm),
   |             ^^^^ help: found config with similar value: `target_family = "wasm"`
   |
   = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(wasm)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

error: unexpected `cfg` condition name: `wasm`
  --> src/settings/cli.rs:89:9
   |
89 |         wasm,
   |         ^^^^ help: found config with similar value: `target_family = "wasm"`
   |
   = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(wasm)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

error: could not compile `static-web-server` (lib) due to 4 previous errors
error: failed to compile `static-web-server v2.30.0 (https://github.com/static-web-server/static-web-server#cfd8bb16)`, intermediate artifacts can be found at `/tmp/cargo-installvpka7z`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
```

### Expected behavior

No errors during build.

### Complementary information

_No response_

### Build target

x86_64-unknown-linux-gnu

### Environment and specs

- **static-web-server:** [cfd8bb16] 
- **OS:** [Ubuntu 23]
- **Arch:** [x86_64 (64-bit)]


### Additional context

_No response_


Discussion / hints:
Can you please share the command that you use to compile the project? Are you using nightly?
`cargo build --release`

cargo 1.80.0-nightly (0ca60e940 2024-05-08)

Fix patch:
diff --git a/src/settings/cli.rs b/src/settings/cli.rs
index be5e5975..1a3ff73f 100644
--- a/src/settings/cli.rs
+++ b/src/settings/cli.rs
@@ -53,7 +53,7 @@ pub struct General {
     pub fd: Option<usize>,
 
     #[cfg_attr(
-        not(wasm),
+        not(target_family = "wasm"),
         arg(
             long,
             short = 'n',
@@ -62,7 +62,7 @@ pub struct General {
         )
     )]
     #[cfg_attr(
-        wasm,
+        target_family = "wasm",
         arg(
             long,
             short = 'n',
@@ -77,7 +77,7 @@ pub struct General {
     pub threads_multiplier: usize,
 
     #[cfg_attr(
-        not(wasm),
+        not(target_family = "wasm"),
         arg(
             long,
             short = 'b',
@@ -86,7 +86,7 @@ pub struct General {
         )
     )]
     #[cfg_attr(
-        wasm,
+        target_family = "wasm",
         arg(
             long,
             short = 'b',


Test patch: