SPVM(3)
π Name π
okay bestie, welcome to SPVM(3) β a User Contributed Perl Documentation page for SPVM - The SPVM Language β¨. This is the manual for SPVM, and it's lowkey giving "Perl, but statically typed" main character energy π
.
β¨ Description β¨
SPVM is a statically typed programming language that has Perl-like syntax. Literally Perl-like syntax, but with static types, no cap π§.
okay, real talk bestie: SPVM has not yet reached a stable release of version1.0. For now, there is currently no policy to keep the backward compatibility βhttps://github.com/yuki-kimoto/SPVM/wiki/Backward-Compatibility. So keep that in mind, fr fr π«Ά.
π Usage π
Okay, here's the vibe check for actually using SPVM. Buckle up π.
π One Liner π
Run a one liner using spvm command:
# Hello World!
spvm -e 'say "Hello World!";';
Run a one liner with loading a class:
# foo,bar,baz
spvm -M Fn -e 'say Fn->join(",", ["foo", "bar", "baz"]);'
πΈ Executing An SPVM Program πΈ
Write a SPVM class named hello.spvm to print "Hello World!" using say operator:
# hello.spvm
say "Hello World!";
This class is an anon class and has main method that is an bootstrap method.
Run the SPVM program using spvm command:
spvm hello.spvm
π¦ Generating An Executable File π¦
Generate an executable file using spvmcc command:
spvmcc -B ~/.spvm_build -o ./hello --no-config hello.spvm
Run the executable file:
./hello
π§ Calling An SPVM Method from Perl π§
Write an SPVM class:
# lib/SPVM/MyMath.spvm
class MyMath {
static method sum : int ($nums : int[]) {
my $total = 0;
for (my $i = 0; $i < @$nums; $i++) {
$total += $nums->[$i];
}
return $total;
}
}
Write a Perl program calling an SPVM method using exchange APIs:
# sum.pl
use FindBin;
use lib "$FindBin::Bin/lib";
use SPVM 'MyMath';
my $total = SPVM::MyMath->sum([3, 6, 8, 9]);
print "$total\n";
Run the Perl program:
# Run
perl sum.pl
π₯ Features π₯
SPVM is serving features, bestie:
- Perl starndard functions and Perl standard modules.
- Native threads and goroutines.
- Executing SPVM programs.
- Generating an executable file.
- AOT(Ahead-of-time compilation) and JIT(Just-in-time compilation).
- Static types, type inference and static analysis.
- C and C++ binding and resource system for C and C++ libraries.
- Perl binding for SPVM methods.
- Perl-like syntax with class syntax.
- High performance β
https://github.com/yuki-kimoto/SPVM/wiki/Benchmark.
π Tutorial π
Start here, bestie:
- SPVM Tutorial β
https://github.com/yuki-kimoto/SPVM/wiki/Tutorial
π Documents π
All SPVM Documents β the whole doc-verse:
- Language Specification
- Lexical Tokenization
- Syntax Parsing
- Class Definition
- Types
- Statements
- Operators
- Exception Handling
- Garbage Collection
- System Setting
- Native Classes
- Native Class Config
- Native APIs
- Runtime Native APIs
- Basic Type Native APIs
- Class Variable Native APIs
- Field Native APIs
- Method Native APIs
- Argument Native APIs
- Type Native APIs
- Compiler Native APIs
- Class File Native APIs
- String Buffer Native APIs
- Allocatord Native APIs
- Mutex Native APIs
- Internal Native APIs
- Resources
- Environment Variables
π Exchange APIs π
- Exchange APIs
β Builder APIs β
- Builder APIs
- Builder Utility APIs
- Config Builder
- SPVM Script Information
π Commands π
spvmβ Executing SPVM Programsspvmccβ Generating Executable Filesspvmdistβ Distributing SPVM Modulesspvmdepsβ Class Dependencies Analyzer
π«Ά Modules π«Ά
- Standard Modules
- CPAN Modules β
https://github.com/yuki-kimoto/SPVM/wiki/CPAN-Modules
π¦ Examples π¦
- SPVM Test Cases β
https://github.com/yuki-kimoto/SPVM/tree/doc/t/02_vm/lib/SPVM/TestCase - Binding C/C++ Libraries β
https://github.com/yuki-kimoto/SPVM/tree/doc/examples/native
π Wiki π
π Repository π
- SPVM - Github β
https://github.com/yuki-kimoto/SPVM
πΈ Author πΈ
Yuki Kimoto <kimoto.yuki@gmail.com> β the author, periodt β¨.
π Core Developers π
moti<motohiko.ave@gmail.com> β core dev, slay π«Ά.
β Contributors β
These iconic humans contributed, and yes, every name is here:
- Mohammad S Anwar
- akinomyoga
- NAGAYASU Shinya
- Reini Urban
- chromatic
- Kazutake Hiramatsu
- Yasuaki Omokawa
- Suman Khanal
- Ryunosuke Murakami β
https://github.com/ryun0suke22 - Yoshiyuki Itoh β
https://github.com/YoshiyukiItoh - Tore Aursand β
https://github.com/toreau - greengorcer β
https://github.com/greengorcer
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
That's the legal tea β.
okay that's the whole manual, bestie π
β this page is from perl v5.42.2, dated 2026-02-03, and it's the SPVM(3) manual. mwah π«Ά
π¦ where this page comes from
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms