- Rust 100%
| spell_macros | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE_GPL.md | ||
| LICENSE_LGPL.md | ||
| README.md | ||
Spellbook
Unified interpreter, dependency, and project manager tool.
Building
cargo build --features="bin"
Running
For full CLI help:
spellbook -h
Evaluating an Expression
An expression can be evaluated as a command line argument with spellbook eval, and the argument being the expression
to evaluate.
spellbook eval "+(2, 3)"
Running a Single File
You can load all functions within a file and evaluate the file's expression (if it has one) using spellbook run:
spellbook run file_name.spl
Including Multiple Files
You can include function definitions from additional files. If the included file has an expression to evaluate, it will
not be evaluated (unless that file is invoked as the argument of spellbook run)
spellbook -i incl.spl eval "included_func(1, 2, 3)"
The -i flag can be used with any subcommand. To include multiple files, simply repeat the -i flag for each file.
Using the REPL
Coming soon
License
This program is licensed under the GNU Lesser General Public License, version 3.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License (and the GNU General Public License) along
with this program. If not, see https://www.gnu.org/licenses/.