Category:Wren-std
This is an example of a library. You may see a list of other libraries used on Rosetta Code at Category:Solutions by Library.
Wren-std provides a leaner alternative to Wren CLI which doesn't depend on libuv. It consists of 5 sub-modules and 23 classes details of which can be found on the talk page. These give it significantly more functionality than Wren CLI currently has including the ability to invoke external processes, to perform precise 64-bit integer arithmetic and to capture the current date/time.
It will enable many RC tasks which previously required a custom C or Go executable to be rewritten and executed using the Wren-std executable instead.
Subject to a few minor differences, it should also be able to run any Wren CLI scripts without modification.
It is the forty-eighth in a series of modules (listed on the language's main page) designed to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily.
To use it you need to copy the Wren source code (in the talk page) to a text file called std.wren and place this in the same directory as the importing script so the Wren-std executable can find it.
As there is a dependency on the Wren-check module, you also need to copy that (if it is not already present) to the same directory as described here. Unless you are using classes in that module directly, there is no need to 'import' them into your script and the Check class can even be imported via Wren-std itself.
The Wren-std executable is written in C using only the C99 standard library and can be built with a command line such as the following using GCC under Linux:
$ gcc -O3 wren-std.c -o wren-std -lwren -lm
If you then want to run a script called myscript.wren you would type at the command-line:
$ ./wren-cmd myscript.wren
However, it should be possible to compile it for other POSIX platforms or for Microsoft Windows on which the Wren VM has already been installed using a C99 compatible compiler.
Unless stated otherwise, it should be assumed that tasks which use Wren-std won't run under Wren CLI because they use functionality which is not provided by the latter.
Pages in category "Wren-std"
The following 29 pages are in this category, out of 29 total.