Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/udzura/purua
Pure Rust Lua implementation
https://github.com/udzura/purua
language lua rust
Last synced: 3 months ago
JSON representation
Pure Rust Lua implementation
- Host: GitHub
- URL: https://github.com/udzura/purua
- Owner: udzura
- License: mit
- Created: 2021-04-29T15:34:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-28T04:15:00.000Z (about 3 years ago)
- Last Synced: 2024-09-14T17:23:04.512Z (4 months ago)
- Topics: language, lua, rust
- Language: Rust
- Homepage:
- Size: 172 KB
- Stars: 39
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# purua
Pure Rust Lua implementation## Usage
```console
$ bat lua_examples/defun.lua
───────┬──────────────────────────────────────────
│ File: lua_examples/defun.lua
───────┼──────────────────────────────────────────
1 │ function myfunc()
2 │ print("Call my own func!\n")
3 │ end
4 │
5 │ myfunc()
6 │
7 │ function println(myarg)
8 │ print(myarg)
9 │ print("\n")
10 │ end
11 │
12 │ println("Hello With LF")
13 │
14 │ function getstr()
15 │ ret = "Hello returned MyStr"
16 │ return ret
17 │ end
18 │
19 │ println(getstr())
───────┴──────────────────────────────────────────
$ cargo run lua_examples/defun.lua
Compiling combine-language v4.0.0
Compiling purua v0.1.0 (/usr/local/ghq/github.com/udzura/purua)
Finished dev [unoptimized + debuginfo] target(s) in 1.62s
Running `target/debug/purua lua_examples/defun.lua`
Call my own func!
Hello With LF
Hello returned MyStr
```## Contribute, License
Issues, patches are welcomed.
See the file for LICENSE.