开发者

Best scripting language for cross compiling to ARM

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.


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.

  • Pattern matching in Lua
  • Lua tables should meet your map requirement.
  • Lua string manipulation

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜