The tiny wren runtime.
Wray can be used to create any type of program: from basic command line tools up to fully fledged graphical applications and games. Programs written with it are lightweight, fast and cross platform. All of this is possible thanks to wray's main dependencies: the amazing raylib library and the wren programming language.
The project takes A LOT of inspiration from the love2d framework, but trying to be even more lightweight and friendly to use. Wray aims to be a self-contained, scripting tool with minimal dependencies and a lot of educational value.
- Simple: the API is friendly and can be learned by anyone.
- Fast: thanks to the speed of wren and raylib.
- Cross Platform: wray works on all major desktop platforms.
- Tiny: the runtime is self-contained and minimal in size.
- Educational: easy to get up and running with writing code.
- Versatile: can be used to create a vast array of different programs.
To get started simply download the latest release for your operating system. Wray has a simple CLI which allows to create, package and run projects.
wray new my_project
wray my_project
This should output: "Hello, World!".
If so you are ready to start writing code! Just open the new folder in a code editor. To learn everything you can do with wray, look at the api file in the source directory. Also check out wren's documentation.
The following code opens a window:
import "wray" for Window, Graphics, Color
Window.init(640, 480, "Hello Wray!")
Window.targetFps = 60
while (!Window.closed) {
Graphics.begin()
Graphics.clear(Color.blue)
Graphics.end()
}
For more examples check the examples folder in the repository! Also look at the modules directory for some wren libraries to use in your projects!
Once you've completed your project, you have to package it up.
First you should create an egg
file.
This is an archive that contains all the project files and assets.
wray nest my_project
This file can now be distributed, but users will need to have the wray runtime installed. You can also create completely indipendent executables by fusing the runtime and the egg file.
wray fuse my_project.egg
This will create the file my_project.exe
, which can be distributed.
To build wray from source you need cmake.
mkdir build
cd build
cmake ..
cmake --build . --config Release
Thanks to all these amazing projects:
Wray is licensed under the MIT License. See the LICENSE file for details.