minor cleanups and fixes
notably: remove the broken socket module and remove CALLISTO_OSLIBNAME and CALLISTO_MATHLIBNAME
This commit is contained in:
parent
a4d229b812
commit
dfe3e57d1c
52 changed files with 62 additions and 7117 deletions
70
README.md
70
README.md
|
@ -1,24 +1,21 @@
|
|||
# Callisto
|
||||
## callisto - standalone scripting platform for Lua 5.4
|
||||
|
||||
A featureful extension runtime for Lua 5.4, using POSIX APIs.
|
||||
Callisto extends Lua 5.4's standard library by adding new libraries and
|
||||
facilities to the language. It includes a file system library to manage
|
||||
and manipulate files, a process library to find active processes and
|
||||
manipulate signals, and a JSON manipulation library (lua-cjson) *among
|
||||
many more*.
|
||||
|
||||
Callisto is an extension to Lua that adds commonly-needed functions
|
||||
and features to the language, and includes a file system library to
|
||||
manage and manipulate files, a process library to find active processes
|
||||
and manipulate signals, a socket and networking library using LuaSocket,
|
||||
and a JSON manipulation library *among many more*.
|
||||
It is a standalone interpreter designed for people using Lua as a
|
||||
general scripting language, instead of using it embedded into another
|
||||
application (what Lua was designed for).
|
||||
|
||||
It is a standalone program designed for people using Lua as a
|
||||
general scripting language, instead of using it embedded into
|
||||
another application.
|
||||
Before I made Callisto, I had to rely on luaposix for basic file system
|
||||
manipulation and occasionally luasocket for HTTP plus lua-cjson for JSON
|
||||
parsing.
|
||||
|
||||
Before I made Callisto, I usually had to rely on three libraries:
|
||||
luaposix for basic file system manipulation and other routines,
|
||||
lua-cjson for JSON parsing support and LuaSocket for networking.
|
||||
|
||||
luaposix provides most of the necessary functions, but is
|
||||
generally aimed towards people who already know how to use
|
||||
the POSIX APIs in C.
|
||||
luaposix provides most of the necessary functions, but is generally
|
||||
aimed towards people who already know how to use the POSIX APIs in C.
|
||||
|
||||
First and foremost, Callisto tries to be:
|
||||
- an all-in-one zero-dependencies library for Lua that includes
|
||||
|
@ -30,7 +27,7 @@ First and foremost, Callisto tries to be:
|
|||
Callisto relies on APIs specified in the POSIX specification;
|
||||
therefore it does not support operating systems that do not
|
||||
implement these APIs (like Microsoft Windows), only ones that
|
||||
do (like Linux and the BSDs).
|
||||
do (like Linux, macOS, and the BSDs).
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -38,11 +35,16 @@ To build Callisto, you'll need nothing but a C compiler.
|
|||
The default C compiler is *cc* which is usually a symbolic link
|
||||
to your system's default C compiler. This should be gcc on Linux,
|
||||
and clang on most of the BSDs. If *cc* doesn't exist on your system,
|
||||
override it by adding `CC=cc` to `make`'s command like (replace `cc` with
|
||||
the name of or the path to your C compiler)
|
||||
override it by adding `CC=ccompiler` to make's command like
|
||||
(replace `ccompiler` with the nameor the path to your C compiler)
|
||||
|
||||
### Portability
|
||||
|
||||
**Callisto has zero runtime dependencies**, unless you built it with
|
||||
support for GNU libreadline. Lua 5.4 is statically linked in.
|
||||
This means that the same binary will likely work across differnt Linux
|
||||
distributions/versions. The only strictly required library is libc
|
||||
which is available on all systems.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -53,21 +55,37 @@ the [Releases](https://github.com/jtbx/callisto/releases) page.
|
|||
Untar it then enter the directory with Callisto's source code.
|
||||
|
||||
After that, run
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
make
|
||||
|
||||
to compile Callisto and all its dependencies.
|
||||
|
||||
To install it, run `make install` as the root user in the source code directory
|
||||
to install Callisto and its shared library.
|
||||
|
||||
### Arch Linux
|
||||
|
||||
Users of Arch Linux can install the AUR package:
|
||||
https://aur.archlinux.org/packages/callisto
|
||||
|
||||
### Nix
|
||||
|
||||
If you use Nix, you can use the flake:
|
||||
|
||||
nix profile install github:jtbx/callisto
|
||||
|
||||
## Usage
|
||||
|
||||
The standalone Callisto interpreter is called `csto`. Running it
|
||||
will start a REPL so you can execute chunks of code interactively.
|
||||
|
||||
csto works just like the standalone Lua 5.4 interpreter. To execute
|
||||
a file, run `csto <file>` where *\<file\>* is the name of the file
|
||||
you want to run. Alternatively, you can put `#!/usr/bin/env csto` at
|
||||
the top of your script, run `chmod +x` on it, and then you can run the
|
||||
a file, run `csto file` where *file* is the name of the file containing
|
||||
code that you want to run. Alternatively, you can put `#!/usr/bin/env csto`
|
||||
at the top of your script, run `chmod +x` on it, and then you can run the
|
||||
script as if it was a standalone executable, for example `./yourscript.lua`.
|
||||
|
||||
## Documentation
|
||||
|
||||
Docs can be found here:
|
||||
https://jtbx.github.io/callisto/doc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue