160636f74Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
260636f74Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
360636f74Sopenharmony_ci# you may not use this file except in compliance with the License.
460636f74Sopenharmony_ci# You may obtain a copy of the License at
560636f74Sopenharmony_ci#
660636f74Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
760636f74Sopenharmony_ci#
860636f74Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
960636f74Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1060636f74Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1160636f74Sopenharmony_ci# See the License for the specific language governing permissions and
1260636f74Sopenharmony_ci# limitations under the License.
1360636f74Sopenharmony_ci
1460636f74Sopenharmony_ciimport("//build/templates/rust/ohos_cargo_crate.gni")
1560636f74Sopenharmony_ci
1660636f74Sopenharmony_ciohos_cargo_crate("lib") {
1760636f74Sopenharmony_ci    crate_name = "memoffset"
1860636f74Sopenharmony_ci    crate_type = "rlib"
1960636f74Sopenharmony_ci    crate_root = "src/lib.rs"
2060636f74Sopenharmony_ci
2160636f74Sopenharmony_ci    sources = ["src/lib.rs"]
2260636f74Sopenharmony_ci    edition = "2015"
2360636f74Sopenharmony_ci    cargo_pkg_version = "0.7.1"
2460636f74Sopenharmony_ci    cargo_pkg_authors = "Gilad Naaman <gilad.naaman@gmail.com>"
2560636f74Sopenharmony_ci    cargo_pkg_name = "memoffset"
2660636f74Sopenharmony_ci    cargo_pkg_description = "offset_of functionality for Rust structs."
2760636f74Sopenharmony_ci    build_deps = ["//third_party/rust/crates/autocfg:lib"]
2860636f74Sopenharmony_ci    features = ["default"]
2960636f74Sopenharmony_ci    build_root = "build.rs"
3060636f74Sopenharmony_ci    build_sources = ["build.rs"]
3160636f74Sopenharmony_ci    build_script_outputs = ["probe0.ll"]
3260636f74Sopenharmony_ci}
33