Best scripting language for cross compiling to ARM

2019-06-03 08:02发布

I am looking for the "best" scripting language interpreter for cross compiling to an ARM processor. Here are the requirements for "best":

  • Its small. Ideally, I'd like to be able to decide which parts of the language and "standard" libraries that are supported. (For instance: file system, nah don't want that. Floating point math, nope don't want that either.)

  • Its easy. Ideally, I'd like some documentation/tutorial/examples on how to do the cross-compile.

The goal: I'm writing a small, simple web server in an embedded ARM device and I'd like to do some string processing easily. The code is currently written in C. I'd like the server and system-level code to be in C. I'd like to write the web "application" in a scripting language. The language features I'm most interested in are:

  • built-in string support
  • built-in regex support
  • built-in map support (i.e key-value pairs object)

I'd like the "best" to come from the following list: Perl, Python, Ruby, Lua. But I would be open to other language suggestions.

1条回答
Deceive 欺骗
2楼-- · 2019-06-03 08:06

I would consider Lua.

Lua is distributed in a small package and builds out-of-the-box in all platforms that have an ANSI/ISO C compiler. Lua runs on all flavors of Unix and Windows, and also on mobile devices (such as handheld computers and cell phones that use BREW, Symbian, Pocket PC, etc.) and embedded microprocessors (such as ARM and Rabbit) for applications like Lego MindStorms.

Lua compared to Python

(Note: I really like Python and for general purpose scriping would prefer it to Lua but in terms of portability and performance on embedded processors I'd lean towards Lua).

查看更多
登录 后发表回答