Wasmer是一个速度极快且安全的WebAssembly运行时,它能够实现轻量级容器在任何地方运行:从桌面到云端、边缘设备和你的浏览器。
- 默认安全。除非明确启用,否则不会访问文件、网络或环境。
- 可插拔。开箱即支持WASIX、WASI和Emscripten。
- 速度极快。以接近原生的速度运行WebAssembly。
- 可通过Wasmer SDKs嵌入任何地方
安装Wasmer
curl https://get.wasmer.io -sSfL | sh
其他安装选项(Powershell、Brew、Cargo等)
Wasmer可以通过各种包管理器安装。选择最适合你环境的一种:
- Powershell(Windows)
iwr https://win.wasmer.io -useb | iex
-
Homebrew(macOS、Linux)
brew install wasmer
-
Scoop(Windows)
scoop install wasmer
-
Chocolatey(Windows)
choco install wasmer
-
cargo binstall wasmer-cli
-
注意:所有可用的功能都在
wasmer-cli
crate文档中描述cargo install wasmer-cli
寻找更多安装选项?查看
wasmer-install
仓库了解更多!
注意:你也可以在wasmer.sh上在线尝试Wasmer
快速入门
你可以从运行Cowsay开始:
$ wasmer run cowsay "hello world"
_____________
< hello world >
-------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
还有许多其他可用的包,如
wasmer/python
或quickjs
。创建你自己的包,或探索社区的包:https://wasmer.io/explore
接下来你可以做这些:
Wasmer SDK
你可以使用Wasmer SDK将Wasmer运行时嵌入到不同的语言中:
语言 | 包 | 文档 | |
---|---|---|---|
![Rust标志] | [Rust][Rust集成] | [wasmer Rust crate] | [学习][rust文档] |
![C标志] | [C][C集成] | [wasm.h 头文件] | [学习][c文档] |
![C++标志] | [C++][C集成] | [wasm.hh 头文件] | [学习][c文档] |
![C#标志] | [C#][C#集成] | [WasmerSharp NuGet包] | [学习][c#文档] |
![D标志] | [D][D集成] | [wasmer Dub包] | [学习][d文档] |
![Zig标志] | [Zig][Zig集成] | [wasmer Zig包] | [学习][zig文档] |
![Python标志] | [Python][Python集成] | [wasmer PyPI包] | [学习][python文档] |
![JS标志] | [Javascript][JS集成] | [@wasmerio NPM包] | [学习][js文档] |
![Go标志] | [Go][Go集成] | [wasmer Go包] | [学习][go文档] |
![PHP标志] | [PHP][PHP集成] | [wasm PECL包] | [学习][php文档] |
![Ruby标志] | [Ruby][Ruby集成] | [wasmer Ruby Gem] | [学习][ruby文档] |
![Java标志] | [Java][Java集成] | [wasmer/wasmer-jni Bintray包] | [学习][java文档] |
![R标志] | [R][R集成] | 无发布包 | [学习][r文档] |
![Postgres标志] | [Postgres][Postgres集成] | 无发布包 | [学习][postgres文档] |
![Swift标志] | [Swift][Swift集成] | 无发布包 | |
![Dart标志] | [Dart][Dart集成] | [wasm pub包] | |
![Crystal标志] | [Crystal][Crystal集成] | 无发布包 | [学习][crystal文档] |
![Lisp标志] | [Lisp][Lisp集成] | 无发布包 | |
![Julia标志] | [Julia][Julia集成] | 无发布包 | |
![VLang标志] | [V][vlang集成] | 无发布包 | |
![Ocaml标志] | [OCaml][OCaml集成] | [wasmer OCaml包] |
👋 缺少某种语言?
[rust logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/rust.svg
[rust 集成]: https://github.com/wasmerio/wasmer/tree/main/lib/api
[wasmer
rust crate]: https://crates.io/crates/wasmer/
[rust 文档]: https://docs.rs/wasmer/
[c logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/c.svg
[c 集成]: https://github.com/wasmerio/wasmer/tree/main/lib/c-api
[wasm.h
头文件]: https://github.com/wasmerio/wasmer/blob/main/lib/c-api/tests/wasm-c-api/include/wasm.h
[c 文档]: https://docs.rs/wasmer-c-api/*/wasmer/wasm_c_api/index.html
[c++ logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/cpp.svg
[wasm.hh
头文件]: https://github.com/wasmerio/wasmer/blob/main/lib/c-api/tests/wasm-c-api/include/wasm.hh
[c# logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/csharp.svg
[c# 集成]: https://github.com/migueldeicaza/WasmerSharp
[wasmersharp
nuget 包]: https://www.nuget.org/packages/WasmerSharp/
[c# 文档]: https://migueldeicaza.github.io/WasmerSharp/
[d logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/d.svg
[d 集成]: https://github.com/chances/wasmer-d
[wasmer
Dub 包]: https://code.dlang.org/packages/wasmer
[d 文档]: https://chances.github.io/wasmer-d
[python logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/python.svg
[python 集成]: https://github.com/wasmerio/wasmer-python
[wasmer
pypi 包]: https://pypi.org/project/wasmer/
[python 文档]: https://wasmerio.github.io/wasmer-python/api/wasmer
[go logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/go.svg
[go 集成]: https://github.com/wasmerio/wasmer-go
[wasmer
go 包]: https://pkg.go.dev/github.com/wasmerio/wasmer-go/wasmer
[go 文档]: https://pkg.go.dev/github.com/wasmerio/wasmer-go/wasmer?tab=doc
[php logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/php.svg
[php 集成]: https://github.com/wasmerio/wasmer-php
[wasm
pecl 包]: https://pecl.php.net/package/wasm
[php 文档]: https://wasmerio.github.io/wasmer-php/
[js logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/js.svg
[js 集成]: https://github.com/wasmerio/wasmer-js
[@wasmerio
npm 包]: https://www.npmjs.com/org/wasmer
[js 文档]: https://docs.wasmer.io/integrations/js/reference-api
[ruby logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/ruby.svg
[ruby 集成]: https://github.com/wasmerio/wasmer-ruby
[wasmer
ruby gem]: https://rubygems.org/gems/wasmer
[ruby 文档]: https://wasmerio.github.io/wasmer-ruby/wasmer_ruby/index.html
[java logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/java.svg
[java 集成]: https://github.com/wasmerio/wasmer-java
[wasmer/wasmer-jni
bintray 包]: https://bintray.com/wasmer/wasmer-jni/wasmer-jni
[java 文档]: https://github.com/wasmerio/wasmer-java/#api-of-the-wasmer-library
[elixir logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/elixir.svg
[elixir 集成]: https://github.com/tessi/wasmex
[elixir 文档]: https://hexdocs.pm/wasmex/api-reference.html
[wasmex
hex 包]: https://hex.pm/packages/wasmex
[r logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/r.svg
[r 集成]: https://github.com/dirkschumacher/wasmr
[r 文档]: https://github.com/dirkschumacher/wasmr#example
[postgres logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/postgres.svg
[postgres 集成]: https://github.com/wasmerio/wasmer-postgres
[postgres 文档]: https://github.com/wasmerio/wasmer-postgres#usage--documentation
[swift logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/swift.svg
[swift 集成]: https://github.com/AlwaysRightInstitute/SwiftyWasmer
[zig logo]: https://github.com/ziglang/logo/blob/master/zig-mark.svg
[zig 集成]: https://github.com/Afirium/wasmer-zig-api
[wasmer
Zig 包]: https://github.com/Afirium/wasmer-zig-api/releases/
[zig 文档]: https://wasmer-zig-api.crappy.systems/
[dart logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/dart.svg
[dart 集成]: https://github.com/dart-lang/wasm
[wasm
pub 包]: https://pub.dev/packages/wasm
[lisp logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/lisp.svg
[lisp 集成]: https://github.com/helmutkian/cl-wasm-runtime
[crystal logo]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/crystal.svg
[crystal 集成]: https://github.com/naqvis/wasmer-crystal
[crystal文档]: https://naqvis.github.io/wasmer-crystal/
[julia图标]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/julia.svg
[julia集成]: https://github.com/Pangoraw/Wasmer.jl
[vlang图标]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/vlang.svg
[vlang集成]: https://github.com/vlang/wasmer
[OCaml图标]: https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/languages/ocaml.svg
[OCaml集成]: https://github.com/wasmerio/wasmer-ocaml
[wasmer
OCaml包]: https://opam.ocaml.org/packages/wasmer/
开发
我们提供了不同的指南来帮助您开发Wasmer:
贡献
我们非常感谢您的帮助! 💜
我们建议阅读以下关于如何成功为复杂项目做出贡献的指南: https://mitchellh.com/writing/contributing-to-complex-projects
查看我们的文档,了解如何从源代码构建Wasmer或测试您的更改。
社区
Wasmer拥有一个令人惊叹的开发者和贡献者社区。欢迎加入我们! 👋
README还有以下语言版本: 🇨🇳 中文 -Chinese • 🇩🇪 Deutsch-German • 🇪🇸 Español-Spanish • 🇫🇷 Français-French • 🇯🇵 日本語 -Japanese • 🇰🇷 한국어 -Korean.