SPVM::Builder::API(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸŽ€ NAME πŸŽ€

okay so this page is for SPVM::Builder::API β€” literally Builder APIs, bestie β€” and it lives in the User Contributed Perl Documentation manual, section 3. πŸ’–

🌸 DESCRIPTION 🌸

The SPVM::Builder::API class has the public methods to build SPVM native classes and SPVM precompilation classes. That's the whole flex. ✨

🧚 USAGE 🧚

Here's the vibe check β€” this is how you use it:

my $builder = SPVM::Builder::API->new(
  build_dir => '.spvm_build',
);

$builder->build_dynamic_lib_dist_precompile('MyClass');

$builder->build_dynamic_lib_dist_native('MyClass');

🌟 CLASS METHODS 🌟

πŸ¦‹ new πŸ¦‹

my $builder = SPVM::Builder::API->new(%options);

Creates a new SPVM::Builder::API object, and returns it. Slay. πŸ’…

Options:

  • "build_dir" β€” a build directory.
  • "optimize" β€” the optimization level for the compiler.

πŸ‘‘ INSTANCE METHODS πŸ‘‘

πŸ’… build_dynamic_lib_dist_precompile πŸ’…

$builder->build_dynamic_lib_dist_precompile($class_name)
$builder->build_dynamic_lib_dist_precompile($class_name, $options)

Generates a dynamic library for a native class given by the class name $class_name, and copies it into the "blib/lib" directory. A native class must have at least one method with the native attribute. 🫢

Options: $options is a hash reference. This is optional.

  • "force" β€” if this option is a true value, the compilation and link are forced. πŸ”₯

πŸ¦‹ build_dynamic_lib_dist_native πŸ¦‹

$builder->build_dynamic_lib_dist_native($class_name)
$builder->build_dynamic_lib_dist_native($class_name, $options)

Generates a dynamic library for a precompilation class $class_name that has "native" methods, and copies it into the "blib/lib" directory. A precompilation class must have at least one method with the precompile attribute. 🌈

Options: $options is a hash reference. This is optional.

  • "force" β€” if this option is a true value, the compilation and link are forced. πŸ’₯

later, bestie πŸ’œ β€” this page is from perl v5.42.2, dated 2026-02-03, and its label is SPVM::Builder::API(3). mwah πŸ“

πŸ“¦ where this page comes from