Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/archo5/sgscript
SGScript Scripting Engine
https://github.com/archo5/sgscript
android c coroutines cpp game-development game-library language library linux low-level macos memory-efficient script scripting scripting-engine scripting-games scripting-language sgscript windows
Last synced: 4 days ago
JSON representation
SGScript Scripting Engine
- Host: GitHub
- URL: https://github.com/archo5/sgscript
- Owner: archo5
- License: mit
- Created: 2012-12-26T00:28:00.000Z (almost 12 years ago)
- Default Branch: apidev
- Last Pushed: 2018-06-29T06:33:47.000Z (over 6 years ago)
- Last Synced: 2023-03-24T07:19:00.432Z (over 1 year ago)
- Topics: android, c, coroutines, cpp, game-development, game-library, language, library, linux, low-level, macos, memory-efficient, script, scripting, scripting-engine, scripting-games, scripting-language, sgscript, windows
- Language: C
- Homepage: http://www.sgscript.org
- Size: 5.93 MB
- Stars: 63
- Watchers: 15
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# SGScript v1.4.1
## Usage
- MinGW/GNU Make/GCC/Clang users:
* compile the makefile (add ```mode=release``` to get the release build)
* include ```src/sgscript.h``` and link with -lsgscript from the bin/ directory (-Lbin)
* to get a static library, use ```static=1``` and link to ```lib/libsgscript.a``` (-Llib -lsgscript)
- VC10+ users: project file is in build/vc10/SGScript
- XCode users: project file is in build/xcode
- Android NDK users: include jni/Android.mk into your makefile## Sample Code and Documentation
Look in ```examples/```, ```tests/``` and ```docs/``` directories.
To build local HTML5 documentation, use "make docs".
More sample code can be found in documentation: http://www.sgscript.org/docs/sgscript.docs/code-samples-sgscript
## Features
- A C-like syntax
- The usual stuff (while/do-while/for/foreach, expressions, variables etc.)
- Highly optimized, register-based virtual machine
- Mixed memory management (ref.counting + GC)
- Extensive native debugging features
- **Coroutines, threads, advanced sync features**
- **Interactive debug inspector add-on**
- **Function/instruction execution time and memory usage profiler add-on**
- 10 data types (with lots of space for extensions):
* null, bool, int, real, string, function, C function, object, pointer, thread
- Tests:
* testing framework is in ext/sgstest.c => bin/sgstest ("make test" to run)
* API testing framework is in ext/sgsapitest.c => bin/sgsapitest ("make apitest" to run)
* C++/BC testing framework is in ext/sgscppbctest.cpp/h => bin/sgscppbctest ("make cppbctest" or "make cppbctest11" to run)
- Object-oriented constructs (dict, class, closure, "compatible call", overloadable operators)## Bindings
- .NET 2.0+ bindings are at ```dotnet/SGS.NET``` (currently only tested on Windows - standalone VM and Unity)
## Bugs
- Development branch status:
[![Travis CI Build Status](https://travis-ci.org/snake5/sgscript.svg?branch=apidev)](https://travis-ci.org/snake5/sgscript)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/snake5/sgscript?svg=true&branch=apidev)](https://ci.appveyor.com/project/snake5/sgscript)If you think you've found a bug, please create a new issue on GitHub.
Don't forget to include a test sample, as small as possible!
## Future plans
- full state serialization
- got a suggestion? write some sample code (in the form of a test) and send it here## Community
- [SGScript on Discord](https://discord.gg/QysXUNq)
## Credits
- developer: Arvīds Kokins (snake5)
* I can be reached at https://twitter.com/snake5creator and snake5creator [at] GMail