I’m working from the hello-world example. I created a canisters folder, moved my Hello function. I can run that program just fine.
Then, I copied the files from icp-eth-starter/canisters/ic_eth at main · dfinity/icp-eth-starter · GitHub into my canisters/ic_eth folder. I added to my dfx.json:
“ic_eth”: {
“type”: “rust”,
“package”: “ic_eth”,
“candid”: “canisters/ic_eth/ic_eth.did”,
“gzip”: true
}
I made a top level Cargo.toml file, imitating the one on icp-eth-starter:
[profile.release]
lto = true
opt-level = “s”[workspace]
resolver = “2”
members = [“canisters/ic_eth”]
That canister has an error building.
When I build with just my hello world:
Installing canisters...
Upgrading code for canister hello_world, with canister ID bkyz2-fmaaa-aaaaa-qaaaq-cai
Module hash 6f16b6a0b4248b11d27a1106a62078654ee2baef140fb7cd99b17312a12409a8 is already installed.
Deployed canisters.
URLs:
Backend canister via Candid interface:
hello_world: http://127.0.0.1:4943/?canisterId=be2us-64aaa-aaaaa-qaabq-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai
When I have the ic_eth canister in dfx.json:
dfx deploy
Deploying all canisters.
All canisters have already been created.
Building canisters...
WARN: Skipped audit step as there is no C
argo.lock file.
Executing: cargo build --target wasm32-unknown-unknown --release -p ic_eth --locked
Updating crates.io index
error: the lock file /home/nolma/icl/examples/motoko/hello-world/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.
WARN: /home/nolma/icl/examples/motoko/hello-world/canisters/hello_world/Main.mo:1.8-1.13: warning [M0194], unused identifier Debug (delete or rename to wildcard `_` or `_Debug`)
Error: Failed while trying to deploy canisters.
Caused by: Failed to build all canisters.
Caused by: Failed while trying to build all canisters.
Caused by: The build step failed for canister 'bd3sg-teaaa-aaaaa-qaaba-cai' (ic_eth)
Caused by: Failed to build Rust canister 'ic_eth'.
Caused by: Failed to compile the rust package: ic_eth
I think by imitating the project structure, this should compile. How do I compile this?