Name

spvm - Executing SPVM programs

Description

The spvm command executes SPVM programs.

Usage

usage: spvm [<options>] <script_name>
  
  spvm myapp.spvm
  
options:
  -h, --help                     Shows this message
  -v, --version                  Shows the version
  -I, --include-dir <directory>  Adds a include directory
  -B, --build-dir <directory>    Build diretory
  -e <source>                    Executes a program source code in main method.

Details

spvm [<options>] <script_name>

The spvm command executes a SPVM program.

<options> are options.

<script_name> is a script name that contains a bootstrap method in an anon class.

class {
  static method main : void () {
    
  }
}

See Class Search Directories about default class search directories.

See SPVM::Document::EnvironmentVariables about available environment variables.

Options

--help

Outputs how to use the spvm command to standard output.

-h

-h

Same as "--help".

--version

Outputs the version of the spvm command to standard output. This version is the same as the version of SPVM.

-v

-v

Same as "--version".

--include-dir

--include-dir <directory>

Prepends <directory> to class search directories

This option can be specified multiple times.

--include-dir dir1 --include-dir dir2

In this case, class search directories becomes the following.

[dir1, dir2, default_dirs]

-I

-I <directory>

Same as "--include-dir".

--build-dir

--build-dir <directory>

Sets SPVM_BUILD_DIR environment variable to <directory>.

-B

-B <directory>

Same as "--build-dir".

-E

-E <source>

Executes a source code <source>.

Examples:

spvm -E 'class { static method main : void () { say "Hello World!"; } }';

-e

-e <source>

Executes a source code <source> in main method.

Examples:

spvm -e 'say "Hello World!";';

Copyright & License

Copyright 2023 Yuki Kimoto. All Rights Reserved.

MIT License.