当前位置 : 主页 > 网络编程 > lua >

语言是Lua,单词是“嵌入式”

来源:互联网 收集:自由互联 发布时间:2021-06-23
我正在阅读有关“Lua”的语言,我对以下三行感到困惑: Lua主要用于嵌入式系统和客户端. 当时Lua唯一的竞争对手是TCL,它意味着嵌入到应用程序中. Lua旨在嵌入到其他应用程序中, 那么
我正在阅读有关“Lua”的语言,我对以下三行感到困惑:

> Lua主要用于嵌入式系统和客户端.
>当时Lua唯一的竞争对手是TCL,它意味着嵌入到应用程序中.
> Lua旨在嵌入到其他应用程序中,

那么,第一行中“嵌入”一词的含义与第二行和第三行中“嵌入”一词的含义有何区别?
将语言嵌入到其他应用程序中意味着什么?

根据维基百科

An embedded system is a computer system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints.

典型的例子包括汽车或咖啡机,其中计算机嵌入到系统中以完成某些任务.

典型的限制是由于成本和能量限制,嵌入式系统通常不如典型的台式计算机强大.因此,要在嵌入式系统上使用的语言应该允许轻量级执行.这就是第一行中使用“嵌入式”的方式.

第二行和第三行是Lua的通常应用:
它旨在用于扩展现有程序的功能.例如,想想咖啡机,您可以在其中指定自己的咖啡配方.然后咖啡机的实际控制程序例如在C中编写,而您可以在Lua中指定咖啡配方.这样,您在Lua中编写的咖啡配方就嵌入在C应用程序中.

Lua在嵌入式系统中的应用

由于评论在嵌入式系统中使用Lua,这里有一些例子来自Wikipedia’s list of Lua applications:

  • The Canon Hack Development Kit (CHDK), an open source firmware for Canon cameras, uses Lua as one of two scripting languages.
  • Cisco Systems uses Lua to implement Dynamic Access Policies within the Adaptive Security Appliance (ASA), and also SIP normalization in Cisco Unified Communications Manager (CUCM).
  • Custom applications for the Creative Technology Zen X-Fi2 portable media player can be created in Lua.
  • Lego Mindstorms NXT and NXT 2.0 can be scripted with Lua using third-party software.
  • LuCI, the default web interface for OpenWrt, is written primarily in Lua.
  • NodeMCU uses Lua in hardware. NodeMCU is an open source hardware platform, which can run Lua directly on the ESP8266 Wi-Fi SoC.
  • Sierra Wireless AirLink ALEOS GSM / CDMA / LTE gateways allow user applications to be written in Lua.
  • The Perimeta session border controller from Metaswitch Networks uses Lua as a scripting language to manipulate SDP data on the fly.
  • Rockbox, the open-source digital audio player firmware, supports plugins written in Lua.
  • The Squeezebox music players from Logitech support plugins written in Lua on recent models (Controller, Radio and Touch).
  • TI-Nspire calculators contain applications written in Lua, since TI added Lua scripting support with a calculator-specific API in OS 3+.
网友评论