Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The framework for building with WebAssembly (wasm). Easily & securely load wasm modules, move data, call functions, and build extensible apps.

License

NotificationsYou must be signed in to change notification settings

extism/extism

Repository files navigation

Extism - the WebAssembly framework

DiscordGitHub Org's starsDownloadsGitHub LicenseGitHub release (with filter)

Overview

Extism is a lightweight framework for building with WebAssembly (Wasm). Itsupports running Wasm code on servers, the edge, CLIs, IoT, browsers andeverything in between. Extism is designed to be "universal" in that it supportsa common interface, no matter where it runs.

Note: One of the primary use cases for Extism isbuilding extensiblesoftware & plugins. You want to be able to execute arbitrary, untrusted codefrom your users? Extism makes this safe and practical to do.

Additionally, Extism adds some extra utilities on top of standard Wasm runtimes.For example, we support persistent memory/module-scope variables, secure &host-controlled HTTP without WASI, runtime limiters & timers, simpler hostfunction linking, and more. Extism users build:

  • plug-in systems
  • FaaS platforms
  • code generators
  • web applications
  • & much more...

Supported Targets

We currently provide releases for the following targets:

  • aarch64-apple-darwin
  • aarch64-unknown-linux-gnu
  • aarch64-unknown-linux-musl
  • x86_64-apple-darwin
  • x86_64-pc-windows-gnu
  • x86_64-pc-windows-msvc
  • x86_64-unknown-linux-gnu
  • x86_64-unknown-linux-musl

For Android we suggest taking a look at theChicory SDK for a pure JavaExtism runtime.

Run WebAssembly In Your App

Pick a SDK to import into your program, and refer to the documentation to getstarted:

TypeLanguageSource CodePackage
Rust SDKRust SDKhttps://github.com/extism/extism/tree/main/runtimeCrates.io
JS SDKJS SDKhttps://github.com/extism/js-sdk
(supports Web, Node, Deno & Bun!)
NPM
Elixir SDKElixir SDKhttps://github.com/extism/elixir-sdkHex
Go SDKGo SDKhttps://github.com/extism/go-sdkGo mod
Haskell SDKHaskell SDKhttps://github.com/extism/haskell-sdkHackage
Java SDKJava SDKhttps://github.com/extism/java-sdkSonatype
.NET SDK.NET SDKhttps://github.com/extism/dotnet-sdk
(supports C# & F#!)
Nuget
OCaml SDKOCaml SDKhttps://github.com/extism/ocaml-sdkopam
Perl SDKPerl SDKhttps://github.com/extism/perl-sdkCPAN
PHP SDKPHP SDKhttps://github.com/extism/php-sdkPackagist
Python SDKPython SDKhttps://github.com/extism/python-sdkPyPi
Ruby SDKRuby SDKhttps://github.com/extism/ruby-sdkRubyGems
Zig SDKZig SDKhttps://github.com/extism/zig-sdkN/A
C SDKC SDKhttps://github.com/extism/extism/tree/main/libextismN/A
C++ SDKC++ SDKhttps://github.com/extism/cpp-sdkN/A

Compile WebAssembly to run in Extism Hosts

Extism Hosts (running the SDK) must execute WebAssembly code that has aPDK, or Plug-in Development Kit, librarycompiled in to the.wasm binary. PDKs make it easy for plug-in / extensioncode authors to read input from the host and return data back, read providedconfiguration, set/get variables, make outbound HTTP calls if allowed, and more.

Pick a PDK to import into your Wasm program, and refer to the documentation toget started:

TypeLanguageSource CodePackage
Rust PDKRust PDKhttps://github.com/extism/rust-pdkCrates.io
JS PDKJS PDKhttps://github.com/extism/js-pdkN/A
Python PDKPython PDKhttps://github.com/extism/python-pdkN/A
Go PDKGo PDKhttps://github.com/extism/go-pdkGo mod
Haskell PDKHaskell PDKhttps://github.com/extism/haskell-pdkHackage
AssemblyScript PDKAssemblyScript PDKhttps://github.com/extism/assemblyscript-pdkNPM
.NET PDK.NET PDKhttps://github.com/extism/dotnet-pdk
(supports C# & F#!)
Nuget
C PDKC PDKhttps://github.com/extism/c-pdkN/A
C++ PDKC++ PDKhttps://github.com/extism/cpp-pdkN/A
Zig PDKZig PDKhttps://github.com/extism/zig-pdkN/A

Generating Bindings

It's often very useful to define a schema to describe the function signaturesand types you want to use between Extism SDK and PDK languages.

XTP Bindgen is an open sourceframework to generate PDK bindings for Extism plug-ins. It's used by theXTP Platform, but can be used outside of the platformto define any Extism compatible plug-in system.

1. Install thextp CLI.

See installation instructionshere.

2. Create a schema using our OpenAPI-inspired IDL:

version:v1-draftexports:CountVowels:input:type:stringcontentType:text/plain; charset=utf-8output:$ref:"#/components/schemas/VowelReport"contentType:application/json# components.schemas defined in example-schema.yaml...

See an example inexample-schema.yaml, or a full"kitchen sink" example onthe docs page.

3. Generate bindings to use from your plugins:

xtp plugin init --schema-file ./example-schema.yaml  > 1. TypeScript                          2. Go                                  3. Rust                                4. Python                              5. C#                                  6. Zig                                 7. C++                                 8. GitHub Template                     9. Local Template

This will create an entire boilerplate plugin project for you to get startedwith. Implement the empty function(s), and runxtp plugin build to compileyour plugin.

For more information about XTP Bindgen, see thedylibso/xtp-bindgen repository andthe officialXTP Schema documentation.

Support

Discord

If you experience any problems or have any questions, please join ourDiscord and let us know. Our community is veryresponsive and happy to help get you started.

Usage

Head to theproject website for more information and docs.Also, consider reading anoverview of Extismand its goals & approach.

Contribution

Thank you for considering a contribution to Extism, we are happy to help youmake a PR or find something to work on!

The easiest way to start would be to join theDiscord or open an issue on theextism/proposals issue tracker, whichcan eventually become an Extism Improvement Proposal (EIP).

For more information, please read theContributing guide.


Who's behind this?

Extism is an open-source product from the team at:

Reach out and tell us what you're building! We'd love to help:hello@dylibso.com

About

The framework for building with WebAssembly (wasm). Easily & securely load wasm modules, move data, call functions, and build extensible apps.

Topics

Resources

License

Stars

Watchers

Forks

Contributors39

Languages


[8]ページ先頭

©2009-2025 Movatter.jp