walnut / lang
There is no license information available for the latest version (0.0.8) of this package.
0.0.8
2025-03-28 02:16 UTC
Requires
- php: >=8.4
- ext-bcmath: *
- ext-mbstring: *
- kapitancho/walex: ^0.0.1
Requires (Dev)
- phpunit/phpunit: ^11.0.5
README
The follow-up of the Cast and the Walnut languages.
Installation
To install the latest version, use the following command:
$ composer require walnut/lang
Usage
Walnut is a programming language which you can easily call from any PHP code.
You can use the CliEntryPoint
for interactions between the language and the host environment.
Sample usage:
use Walnut\Lang\Implementation\Program\EntryPoint\Cli\CliEntryPointFactory; $rootDir = __DIR__; //or something different $sourceRoot = $rootDir . '/nut-src'; $packages = ['core' => $rootDir . '/vendor/walnut/lang/core-nut-lib']; $result = new CliEntryPointFactory($sourceRoot, $packages) ->entryPoint->call('start', 'arg1', 'arg2'); //Call the main function of the `start` module echo "Result: $result", PHP_EOL;