I have a total of three crates, one of which is used to make macros, the other is the core crate, and there is a test crate
example
mybatis
mybatis-macro
#[macro_use]
use mybatis;
use mybatis::{CRUDTable, crud_table};
use mybatis::{crud::CRUD};
use mybatis::mybatis_sql::string_util::to_snake_name;
use mybatis::mybatis::Mybatis;
use mybatis::snowflake::SNOWFLAKE;
use serde::{Serialize, Deserialize};
#[crud_table]
#[derive(Debug, Serialize, Deserialize)]
pub struct Pets {
pub id: Option<String>,
pub name: Option<String>,
pub birthday: Option<mybatis::DateTimeNative>,
pub delete_flag: Option<i32>,
}
error:
failed to resolve: could not find `core` in `mybatis`
could not find `core` in `mybatis`rustcE0433
failed to resolve: could not find `core` in `mybatis`(E0433)
#[macro_use] and #[macro_export] are only used for macro_rules macros, and the existence of your mybatis-macro crate suggests that that is a proc-macro.
If it is indeed a proc-macro you can just import it as any other item.