๐Ÿธ Generated .did file name not met expect right name

Here is how I generate did file:
step1:

// in end of lib.rs
use ic_cdk::export_candid;
export_candid!();

step2:

cargo build --target wasm32-unknown-unknown --release --package "backend"  --features "ic-cdk/wasi" 
wasmtime "./target/wasm32-unknown-unknown/release/backend.wasm"  > ./backend/backend.did  --allow-precompiled 

step3:

dfx deploy backend --network ic

after 3 steps above : i got these file in <project_root_folder>/.dfx/ic/canisters/backend/
service.did
service.did.d.ts
service.did.js
index.js

the index.js file describe:

import { Actor, HttpAgent } from "@dfinity/agent";

// Imports and re-exports candid interface
import { idlFactory } from './backend.did.js';
export { idlFactory } from './backend.did.js';
//...

Which is expect backend.did file
But i generate service.did file .
I am like an ape in Space Odyseey
Got no clue how to generate the right expected did file name .

Have you tried dfx generate?

never tried before.
now here i tried it output:

btwl@btwl-virtual-machine ~/D/i/tax_lint (master)> dfx generate
Generating type declarations for canister backend:
  src/declarations/backend/backend.did.d.ts
  src/declarations/backend/backend.did.js
  backend/backend.did
Generating type declarations for canister assets:
  src/declarations/assets/assets.did.d.ts
  src/declarations/assets/assets.did.js
  src/declarations/assets/assets.did

this is the expected name of did files.

but when i executing dfx deploy backend --network ic i still got file like these :
in <project_root_folder>/.dfx/ic/canisters/backend/
service.did
service.did.d.ts
service.did.js
index.js

which name is still not expected

The files in .dfx are dfx-internal copies and are at times not very logical. In this case someone probably simply defined that using service for all the files was a fine choice at some point in time. I recommend you donโ€™t mess with anything in .dfx as files in there get modified, overwritten, or discarded at sometimes unpredictable times

Thanks for clue !

i will try to find out
where code or config file define that .did file name
when generating files using dfx deploy output file in .dfx folder