关注
HarmonyOS技术社区
,回复
【鸿蒙】
送
小米小爱音箱mini
(数量不多,先到先得)
,还可以
免费下载
鸿蒙
入门资料
!
👇
扫码
立刻关注
👇
专注开源技术,共建鸿蒙生态
本文作者将给大家分享:移植 lua 到鸿蒙—在鸿蒙上用 lua 跑 hello world。
https://gitee.com/hiharmonica/lua
https://gitee.com/hiharmonica/lua/releases/v5.4.2
PS:
本文使用与鸿蒙系统一同编译的方法。如果自己有本地环境,可以把 lua 项目放鸿蒙代码目录里(或者使用软接连
)
。
mkdir -p ~/code/ohos/
cd ~/code/ohos/
git clone https://github.com/lua/lua.git
因为要与系统一起编译, 为了方便,直接用替换掉示例的方法,这样就只需要写一个 BUILD.gn 就好了。
# Copyright (c) 2020 YSTYLE([email protected])
# 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.
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/ndk/ndk.gni")
static_library("hello_world"