build(deps): bump the napi-ohos-related group with 4 updates (#38555)

Bumps the napi-ohos-related group with 4 updates:
[napi-derive-ohos](https://github.com/ohos-rs/ohos-rs),
[napi-ohos](https://github.com/ohos-rs/ohos-rs),
[napi-derive-backend-ohos](https://github.com/ohos-rs/ohos-rs) and
[napi-sys-ohos](https://github.com/ohos-rs/ohos-rs).

Updates `napi-derive-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-derive-backend-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-sys-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ohos-rs/ohos-rs/releases">napi-sys-ohos's
releases</a>.</em></p>
<blockquote>
<h2>ohrs@1.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: allow build and artifact skip libs logic by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/119">ohos-rs/ohos-rs#119</a></li>
<li>fix: remove ArkRuntime Send and Sync implenment by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/120">ohos-rs/ohos-rs#120</a></li>
<li>feat 0306 by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/121">ohos-rs/ohos-rs#121</a></li>
<li>feat: add export default for template by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/128">ohos-rs/ohos-rs#128</a></li>
<li>fix: should ignore some path and convert path to absolute path by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/129">ohos-rs/ohos-rs#129</a></li>
<li>Merge code by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/133">ohos-rs/ohos-rs#133</a></li>
<li>feat: add vscode setting by default by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/134">ohos-rs/ohos-rs#134</a></li>
<li>feat(cli): support dtsCache flag by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/135">ohos-rs/ohos-rs#135</a></li>
<li>feat: Sync napi-rs by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/139">ohos-rs/ohos-rs#139</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
dependabot[bot] 2025-08-13 14:52:00 +02:00 committed by GitHub
parent d0d952d1fa
commit 18f0d92e99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 65 additions and 34 deletions

68
Cargo.lock generated
View file

@ -1361,7 +1361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"windows-sys 0.48.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -1537,9 +1537,9 @@ dependencies = [
[[package]] [[package]]
name = "convert_case" name = "convert_case"
version = "0.7.1" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f"
dependencies = [ dependencies = [
"unicode-segmentation", "unicode-segmentation",
] ]
@ -1775,14 +1775,20 @@ dependencies = [
[[package]] [[package]]
name = "ctor" name = "ctor"
version = "0.2.9" version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" checksum = "ec09e802f5081de6157da9a75701d6c713d8dc3ba52571fd4bd25f412644e8a6"
dependencies = [ dependencies = [
"quote", "ctor-proc-macro",
"syn", "dtor",
] ]
[[package]]
name = "ctor-proc-macro"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2931af7e13dc045d8e9d26afccc6fa115d64e115c9c84b1166288b46f6782c2"
[[package]] [[package]]
name = "ctr" name = "ctr"
version = "0.9.2" version = "0.9.2"
@ -2125,6 +2131,21 @@ dependencies = [
"dtoa", "dtoa",
] ]
[[package]]
name = "dtor"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97cbdf2ad6846025e8e25df05171abfb30e3ababa12ee0a0e44b9bbe570633a8"
dependencies = [
"dtor-proc-macro",
]
[[package]]
name = "dtor-proc-macro"
version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7454e41ff9012c00d53cf7f475c5e3afa3b91b7c90568495495e8d9bf47a1055"
[[package]] [[package]]
name = "dunce" name = "dunce"
version = "1.0.5" version = "1.0.5"
@ -4852,7 +4873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-targets 0.48.5", "windows-targets 0.52.6",
] ]
[[package]] [[package]]
@ -5305,13 +5326,18 @@ dependencies = [
] ]
[[package]] [[package]]
name = "napi-derive-backend-ohos" name = "napi-build-ohos"
version = "1.0.4" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd974d6316c670078fa15276c6134e5b45142b393db350b24682ae613733cdac" checksum = "959f833e4ea8bec8f92b23b705b5558d42d8e63672c77b9b281b7228c5df6e88"
[[package]]
name = "napi-derive-backend-ohos"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b27250baa967a15214e57384dd6228c59afbccb15ab8f97207c9758917544bf5"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"semver", "semver",
@ -5320,11 +5346,12 @@ dependencies = [
[[package]] [[package]]
name = "napi-derive-ohos" name = "napi-derive-ohos"
version = "1.0.4" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3a8b89bbc39f81c472e76813dcd837f311aae7850a24a01d0bf5858221b1fd2" checksum = "c844efa85d53b5adc3b326520f3a108c3a737b7534ee10d406f81884e7e71b3c"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"ctor",
"napi-derive-backend-ohos", "napi-derive-backend-ohos",
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -5333,20 +5360,23 @@ dependencies = [
[[package]] [[package]]
name = "napi-ohos" name = "napi-ohos"
version = "1.0.4" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32036ede4ef064610304337831e9d49dac23e7edc4e9efd076c8259eab6d19a9" checksum = "44cd7f1a2b5b17e763d8fcc33f3a9f426c0303a1fcb9b89d7c553308c3a1db97"
dependencies = [ dependencies = [
"bitflags 2.9.1", "bitflags 2.9.1",
"ctor", "ctor",
"napi-build-ohos",
"napi-sys-ohos", "napi-sys-ohos",
"nohash-hasher",
"rustc-hash 2.1.1",
] ]
[[package]] [[package]]
name = "napi-sys-ohos" name = "napi-sys-ohos"
version = "1.0.4" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e18642400316f886a6f153b2fbc48f5652d0e117803057005f89f0e48217d64" checksum = "ff0b7e156bf62a778295ba4f130cde6c2fe07936ebf9448fab6ca0f7c7040682"
dependencies = [ dependencies = [
"libloading", "libloading",
] ]
@ -9940,7 +9970,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]

View file

@ -93,8 +93,8 @@ euclid = { workspace = true }
hilog = "0.2.2" hilog = "0.2.2"
# force inprocess until we add multi-process support for ohos # force inprocess until we add multi-process support for ohos
ipc-channel = { workspace = true, features = ["force-inprocess"] } ipc-channel = { workspace = true, features = ["force-inprocess"] }
napi-derive-ohos = "1.0.4" napi-derive-ohos = "1.1.0"
napi-ohos = "1.0.4" napi-ohos = "1.1.0"
ohos-ime = "0.4.0" ohos-ime = "0.4.0"
ohos-ime-sys = "0.2.2" ohos-ime-sys = "0.2.2"
ohos-deviceinfo = "0.1.0" ohos-deviceinfo = "0.1.0"

View file

@ -15,10 +15,10 @@ use std::time::Duration;
use keyboard_types::{Key, NamedKey}; use keyboard_types::{Key, NamedKey};
use log::{LevelFilter, debug, error, info, trace, warn}; use log::{LevelFilter, debug, error, info, trace, warn};
use napi_derive_ohos::{module_exports, napi}; use napi_derive_ohos::napi;
use napi_ohos::bindgen_prelude::Function; use napi_ohos::bindgen_prelude::{Function, JsObjectValue, Object};
use napi_ohos::threadsafe_function::{ThreadsafeFunction, ThreadsafeFunctionCallMode}; use napi_ohos::threadsafe_function::{ThreadsafeFunction, ThreadsafeFunctionCallMode};
use napi_ohos::{Env, JsObject, JsString, NapiRaw}; use napi_ohos::{Env, JsString, JsValue};
use ohos_ime::{ use ohos_ime::{
AttachOptions, CreateImeProxyError, CreateTextEditorProxyError, Ime, ImeProxy, AttachOptions, CreateImeProxyError, CreateTextEditorProxyError, Ime, ImeProxy,
RawTextEditorProxy, RawTextEditorProxy,
@ -124,12 +124,13 @@ const PROMPT_QUEUE_SIZE: usize = 4;
// Todo: Need to check if OnceLock is suitable, or if the TS function can be destroyed, e.g. // Todo: Need to check if OnceLock is suitable, or if the TS function can be destroyed, e.g.
// if the activity gets suspended. // if the activity gets suspended.
static SET_URL_BAR_CB: OnceLock< static SET_URL_BAR_CB: OnceLock<
ThreadsafeFunction<String, (), String, false, false, UPDATE_URL_QUEUE_SIZE>, ThreadsafeFunction<String, (), String, napi_ohos::Status, false, false, UPDATE_URL_QUEUE_SIZE>,
> = OnceLock::new();
static TERMINATE_CALLBACK: OnceLock<
ThreadsafeFunction<(), (), (), napi_ohos::Status, false, false, 1>,
> = OnceLock::new(); > = OnceLock::new();
static TERMINATE_CALLBACK: OnceLock<ThreadsafeFunction<(), (), (), false, false, 1>> =
OnceLock::new();
static PROMPT_TOAST: OnceLock< static PROMPT_TOAST: OnceLock<
ThreadsafeFunction<String, (), String, false, false, PROMPT_QUEUE_SIZE>, ThreadsafeFunction<String, (), String, napi_ohos::Status, false, false, PROMPT_QUEUE_SIZE>,
> = OnceLock::new(); > = OnceLock::new();
/// Storing webview related items /// Storing webview related items
@ -594,9 +595,9 @@ pub fn set_log_filter(filter: Option<&str>) {
(*LOGGER).set_filter(filter); (*LOGGER).set_filter(filter);
} }
fn register_xcomponent_callbacks(env: &Env, xcomponent: &JsObject) -> napi_ohos::Result<()> { fn register_xcomponent_callbacks(env: &Env, xcomponent: &Object) -> napi_ohos::Result<()> {
info!("napi_get_named_property call successfull"); info!("napi_get_named_property call successfull");
let raw = unsafe { xcomponent.raw() }; let raw = xcomponent.raw();
let raw_env = env.raw(); let raw_env = env.raw();
let mut nativeXComponent: *mut OH_NativeXComponent = core::ptr::null_mut(); let mut nativeXComponent: *mut OH_NativeXComponent = core::ptr::null_mut();
unsafe { unsafe {
@ -634,7 +635,7 @@ fn register_xcomponent_callbacks(env: &Env, xcomponent: &JsObject) -> napi_ohos:
} }
#[allow(unused)] #[allow(unused)]
fn debug_jsobject(obj: &JsObject, obj_name: &str) -> napi_ohos::Result<()> { fn debug_jsobject(obj: &Object, obj_name: &str) -> napi_ohos::Result<()> {
let names = obj.get_property_names()?; let names = obj.get_property_names()?;
error!("Getting property names of object {obj_name}"); error!("Getting property names of object {obj_name}");
let len = names.get_array_length()?; let len = names.get_array_length()?;
@ -647,11 +648,11 @@ fn debug_jsobject(obj: &JsObject, obj_name: &str) -> napi_ohos::Result<()> {
Ok(()) Ok(())
} }
#[module_exports] #[napi(module_exports)]
fn init(exports: JsObject, env: Env) -> napi_ohos::Result<()> { fn init(exports: Object, env: Env) -> napi_ohos::Result<()> {
initialize_logging_once(); initialize_logging_once();
info!("simpleservo init function called"); info!("simpleservo init function called");
if let Ok(xcomponent) = exports.get_named_property::<JsObject>("__NATIVE_XCOMPONENT_OBJ__") { if let Ok(xcomponent) = exports.get_named_property::<Object>("__NATIVE_XCOMPONENT_OBJ__") {
register_xcomponent_callbacks(&env, &xcomponent)?; register_xcomponent_callbacks(&env, &xcomponent)?;
} }