Can't create a package for a library

example to generate problem :

I have a library with following structure
├── Cargo.toml
└── src

inside I use crate to generate some rust code to be used

            .compile(&["proto/test.proto"], &["proto/"])?;

    //and inside I uses the generated code for example
    pub mod my_mod{

        include!(concat!(env!("OUT_DIR"), concat!("/", "test", ".rs")));

    //defined inside test.proto that used to generate 
    impl Color{

so when I run cargo build all things go well
but when I run cargo package I have compilation error that Color not found so how to force cargo to use build script inside

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.