fix(napi-sys): missing napi9 load on Windows (#1780)
This commit is contained in:
parent
546b108a5b
commit
cec062bd4b
2 changed files with 4 additions and 2 deletions
|
@ -761,7 +761,7 @@ pub use napi8::*;
|
||||||
pub use napi9::*;
|
pub use napi9::*;
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
pub(super) unsafe fn load() -> Result<libloading::Library, libloading::Error> {
|
pub(super) unsafe fn load_all() -> Result<libloading::Library, libloading::Error> {
|
||||||
let host = match libloading::os::windows::Library::this() {
|
let host = match libloading::os::windows::Library::this() {
|
||||||
Ok(lib) => lib.into(),
|
Ok(lib) => lib.into(),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
@ -785,6 +785,8 @@ pub(super) unsafe fn load() -> Result<libloading::Library, libloading::Error> {
|
||||||
napi7::load(&host)?;
|
napi7::load(&host)?;
|
||||||
#[cfg(feature = "napi8")]
|
#[cfg(feature = "napi8")]
|
||||||
napi8::load(&host)?;
|
napi8::load(&host)?;
|
||||||
|
#[cfg(feature = "napi9")]
|
||||||
|
napi9::load(&host)?;
|
||||||
#[cfg(feature = "experimental")]
|
#[cfg(feature = "experimental")]
|
||||||
experimental::load(&host)?;
|
experimental::load(&host)?;
|
||||||
Ok(host)
|
Ok(host)
|
||||||
|
|
|
@ -90,7 +90,7 @@ pub use types::*;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
#[allow(clippy::missing_safety_doc)]
|
#[allow(clippy::missing_safety_doc)]
|
||||||
pub unsafe fn setup() -> libloading::Library {
|
pub unsafe fn setup() -> libloading::Library {
|
||||||
match load() {
|
match load_all() {
|
||||||
Err(err) => panic!("{}", err),
|
Err(err) => panic!("{}", err),
|
||||||
Ok(l) => l,
|
Ok(l) => l,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue