wren
所属分类:编译器/解释器
开发工具:Nim
文件大小:0KB
下载次数:0
上传日期:2019-01-18 12:50:29
上 传 者:
sh-1993
说明: Wren的nim包装器,Wren是一种嵌入式脚本语言,
(A nim wrapper for Wren, an embedded scripting language,)
文件列表:
LICENSE (1063, 2019-01-18)
examples/ (0, 2019-01-18)
examples/01_hello_world/ (0, 2019-01-18)
examples/01_hello_world/main.nim (86, 2019-01-18)
examples/01_hello_world/main.wren (30, 2019-01-18)
examples/02_foreign_functions/ (0, 2019-01-18)
examples/02_foreign_functions/main.nim (248, 2019-01-18)
examples/02_foreign_functions/main.wren (127, 2019-01-18)
examples/03_module_import/ (0, 2019-01-18)
examples/03_module_import/MyModule.wren (45, 2019-01-18)
examples/03_module_import/main.nim (86, 2019-01-18)
examples/03_module_import/main.wren (71, 2019-01-18)
examples/04_slots/ (0, 2019-01-18)
examples/04_slots/main.nim (431, 2019-01-18)
examples/05_variables/ (0, 2019-01-18)
examples/05_variables/main.nim (188, 2019-01-18)
examples/05_variables/main.wren (48, 2019-01-18)
src/ (0, 2019-01-18)
src/wren.nim (2618, 2019-01-18)
src/wren/ (0, 2019-01-18)
wren.cfg (1454, 2019-01-18)
wren.nimble (1071, 2019-01-18)
# Wren
A [Nim](https://nim-lang.org/) wrapper for [Wren](http://wren.io/), an embedded scripting language.
This package uses [nimgen](https://github.com/genotrance/nimgen) and [c2nim](https://github.com/nim-lang/c2nim/) to generate the wrapper code.
## Installation
This package is distributed on nimble: `nimble install wren`
## Usage
A simple usage example looks like this:
_in hello_world.nim:_
```nim
import wren
let vm = defaultConfig().newVM()
vm.runScript("example.wren")
```
_in example.wren:_
```wren
System.print("Hello world!")
```
```bash
> nim c -r hello_world.nim`
> Hello world!
```
For more example usage refer to the `examples` folder of this repository.
## Todo:
* Tests
* API documentation
## Contributing
This package is a work in progress and any feedback or suggestions are welcome. It is hosted on [GitHub](https://github.com/geotre/wren) with an MIT license so issues, forks and PRs are most appreciated.
近期下载者:
相关文件:
收藏者: