Skip to content

Find or download wasmtime for use by other Perl modules

Notifications You must be signed in to change notification settings

perlwasm/Alien-wasmtime

Repository files navigation

Alien::wasmtime linux windows macos

Find or download wasmtime for use by other Perl modules

SYNOPSIS

use Alien::wasmtime;
use FFI::Platypus 1.00;

my $ffi = FFI::Platypus->new(
  api => 1,
  lib => [Alien::wasmtime->dynamic_libs],
);

DESCRIPTION

NOTE: If you want to call WebAssembly from Perl you want to use Wasm or Wasm::Wasmtime instead.

This Alien provides wasmtime a library runtime for Wasm (WebAssembly). It's intended to be used by FFI (not XS) to build Wasm bindings for Perl.

METHODS

dynamic_libs

my @libs = Alien::wasmtime->dynamic_libs;

Returns the list of libraries needed to use wasmtime via FFI.

ENVIRONMENT

  • ALIEN_WASMTIME_VERSION

    Override the version of wasmtime downloaded. To get the latest development release you can install with:

    $ env ALIEN_WASMTIME_VERSION=dev cpanm Alien::wasmtime
    

CAVEATS

Wasm and wasmtime is a moving target at the moment, so expect breakage until it becomes stable.

Normally Aliens should try to use the system library before downloading from the internet. Since wasmtime isn't provided by many package managers yet, we skip this step for now. In the future we will support probing of the system wasmtime.

This Alien is geared for use with FFI only.

SEE ALSO

  • Wasm

    High level interface to WebAssembly which uses wasmtime under the covers.

  • Wasm::Wasmtime

    Lower-level direct interface to Wasmtime itself from Perl.

  • Alien

    Documentation for the Perl / Alien concept.

  • FFI::Platypus

    Foreign function interface to dynamic libraries in perl via libffi.

AUTHOR

Graham Ollis [email protected]

COPYRIGHT AND LICENSE

This software is copyright (c) 2020-2022 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

About

Find or download wasmtime for use by other Perl modules

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages