Rust can't find crate

后端 未结 3 1510
误落风尘
误落风尘 2021-01-01 10:52

I\'m trying to create a module in Rust and then use it from a different file. This is my file structure:

matthias@X1:~/projects/bitter-oyster$ tree
.
├── Car         


        
3条回答
  •  抹茶落季
    2021-01-01 11:05

    To add to the given answers, a library compiled as a cdylib (docs) can generate this error when you try to reference it in another project. I solved it by separating the code I wished to reuse in a regular lib project.

提交回复
热议问题