Ic-utils / ic-agent v0.33.0 will not compile

@kpeacock

I can’t work out why this won’t compile. It’s something to do with the target-family = wasm but I can’t work it out.

I’m going through and putting all the nice new ic-utils builders in our code, really like it so far.

Thanks in advance!

The match statement has no match on Some(_) if targeting wasm but without the wasm-bindgen feature enabled.

I vaguely remember this happening in a previous version too.

If you enable the wasm-bindgen feature it should work (if that’s an option for you).

1 Like
ic-agent = { version = "0.33.0", features = ["wasm-bindgen"] }
ic-utils = "0.33.0"

this just gives me the same error message. Not sure what to do here as its still failing at installing the ic-agent. I don’t actually use the agent, just the utils wrapper.

The wasm-bindgen feature should be the solution. Can you double check that it was applied properly (e.g. file saved)?

Hey @AdamS

Both @borovan and I tried that and we’re getting the same error.

This are our IC depds.

candid = “0.10.3”
ic-cdk = “0.12.1”
ic-cdk-macros = “0.8.4”
ic-stable-structures = “0.6.2”
ic-utils = “0.33.0”
ic-agent = { version = “0.33.0”, features = [“wasm-bindgen”] }

That’s just one of many combinations I’ve tried!

Just to clarify, we’re only using ic-utils not the agent. The ic-agent above was just there to try and test but nothing we’ve tried so far works.

EDIT : all sorted dont worry, we were using the wrong package. Wasn’t obvious that the new InstallCodeBuilder and CreateCanisterBuilder aren’t designed to be run in a canister.