E0463: Can't find crate

I run recently into a strange issue as I have two crates: A is a lib & B is a bin crate. Crate B depends on crate A. I have both crates on disc and in dependencies of crate B I refer to crate A like this:
cratea = {path = "../cratea" }

This compiled ok until I added a section in crate A for lib as I wanted to link it into C++ application:

path = "src/lib.rs"
crate-type = ["staticlib", "cdylib"]
name = "cratea" 

This gives me an error: error[E0463]: can't find crate for `mcu`

If I remove the section lib it works again.

1 Like