feat(cli): check 'cdylib' in crate-type
This commit is contained in:
parent
5f2bea0b97
commit
754462238a
1 changed files with 8 additions and 0 deletions
|
@ -106,6 +106,14 @@ export class BuildCommand extends Command {
|
|||
} else {
|
||||
throw new TypeError('No package.name field in Cargo.toml')
|
||||
}
|
||||
|
||||
if (!tomlContent.lib?.['crate-type']?.includes?.('cdylib')) {
|
||||
throw new TypeError(
|
||||
`Missing ${chalk.green('create-type = ["cdylib"]')} in ${chalk.green(
|
||||
'[lib]',
|
||||
)}`,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
debug(`Dylib name: ${chalk.greenBright(dylibName)}`)
|
||||
|
|
Loading…
Reference in a new issue