From 0219bf89f6503f0166179c0962d99b9424a7e62a Mon Sep 17 00:00:00 2001 From: fqwert Date: Fri, 10 Nov 2023 10:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Cargo.toml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fqwert --- .gitignore | 15 +++++++++++++++ Cargo.toml | 18 ++++++++++++++++++ interfaces/innerkits/rust/BUILD.gn | 19 ++++--------------- interfaces/innerkits/rust/Cargo.toml | 24 ++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 15 deletions(-) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 interfaces/innerkits/rust/Cargo.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b794ab5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Copyright (C) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +target +Cargo.lock \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..c34f17b5 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,18 @@ +# Copyright (C) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[workspace] +resolver = "2" +members = [ + "interfaces/innerkits/rust", +] diff --git a/interfaces/innerkits/rust/BUILD.gn b/interfaces/innerkits/rust/BUILD.gn index c7beb5db..7a0867cb 100644 --- a/interfaces/innerkits/rust/BUILD.gn +++ b/interfaces/innerkits/rust/BUILD.gn @@ -17,18 +17,10 @@ SUBSYSTEM_DIR = "//foundation/communication/ipc" IPC_CORE_ROOT = "$SUBSYSTEM_DIR/ipc/native" ohos_rust_shared_library("ipc_rust") { - sources = [ - "src/errors.rs", - "src/ipc/macros.rs", - "src/ipc/mod.rs", - "src/ipc/remote_obj.rs", - "src/ipc/remote_stub.rs", - "src/ipc_binding.rs", - "src/lib.rs", - "src/parcel/mod.rs", - "src/parcel/parcelable.rs", - "src/parcel/types.rs", - ] + crate_name = "ipc_rust" + edition = "2021" + + sources = [ "src/lib.rs" ] deps = [ ":ipc_c" ] @@ -37,9 +29,6 @@ ohos_rust_shared_library("ipc_rust") { "ylong_runtime:ylong_runtime", ] - crate_name = "ipc_rust" - crate_type = "dylib" - install_images = [ system_base_dir ] subsystem_name = "communication" part_name = "ipc" diff --git a/interfaces/innerkits/rust/Cargo.toml b/interfaces/innerkits/rust/Cargo.toml new file mode 100644 index 00000000..efbc8d0c --- /dev/null +++ b/interfaces/innerkits/rust/Cargo.toml @@ -0,0 +1,24 @@ +# Copyright (C) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[package] +name = "ipc_rust" +version = "1.0.0" +edition = "2021" +license = "Apache-2.0" +description = "ipc" +repository = "https://gitee.com/openharmony/communication_ipc" + +[dependencies] +ylong_runtime = { git = "https://gitee.com/openharmony/commonlibrary_rust_ylong_runtime", features = ["macros", "fs", "net", "sync", "time"] } +hilog_rust = { git = "https://gitee.com/openharmony/hiviewdfx_hilog.git" }