Skip to content

Commit

Permalink
Merge branch 'master' into feat-rename-jit-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed May 27, 2021
2 parents 720cae7 + 256f696 commit 14f469f
Show file tree
Hide file tree
Showing 18 changed files with 246 additions and 124 deletions.
35 changes: 18 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ qjs >
| ![R logo] | [**R**][R integration] | *no published package* | [Docs][r docs] |
| ![Postgres logo] | [**Postgres**][Postgres integration] | *no published package* | [Docs][postgres docs] |
| | [**Swift**][Swift integration] | *no published package* | |
| ![Zig logo] | [**Zig**][Zig integration] | *no published package* | |

[👋 Missing a language?](https://github.com/wasmerio/wasmer/issues/new?assignees=&labels=%F0%9F%8E%89+enhancement&template=---feature-request.md&title=)

Expand Down Expand Up @@ -170,6 +171,9 @@ qjs >

[swift integration]: https://github.com/AlwaysRightInstitute/SwiftyWasmer

[zig logo]: https://raw.githubusercontent.com/ziglang/logo/master/zig-favicon.png
[zig integration]: https://github.com/kubkon/wasmer-zig

## Contribute

**We welcome any form of contribution, especially from new members of our community** 💜
Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ deny = [
]
# Certain crates/versions that will be skipped when doing duplicate detection.
skip = [
{ name = "cfg-if", version = "=0.1.10" },
{ name = "cfg-if", version = "0.1.10" },
{ name = "strsim", version = "=0.8.0" },
{ name = "semver", version = "=0.9.0" },
{ name = "semver-parser", version = "=0.7.0" },
Expand Down
67 changes: 33 additions & 34 deletions docs/cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="https://wasmer.io" target="_blank" rel="noopener noreferrer">
<img width="300" src="https://raw.githubusercontent.com/wasmerio/wasmer/master/assets/logo.png" alt="Wasmer logo">
</a>

<p>
<a href="https://github.com/wasmerio/wasmer/actions?query=workflow%3Abuild">
<img src="https://github.com/wasmerio/wasmer/workflows/build/badge.svg?style=flat-square" alt="Build Status">
Expand All @@ -18,7 +18,7 @@
<h3>
<a href="https://wasmer.io/">网站</a>
<span> • </span>
<a href="https://docs.wasmer.io">文件资料</a>
<a href="https://docs.wasmer.io">文档</a>
<span> • </span>
<a href="https://slack.wasmer.io/">聊天</a>
</h3>
Expand All @@ -27,24 +27,23 @@

<br />

[Wasmer](https://wasmer.io/) 使得能够基于 [WebAssembly](https://webassembly.org/),其可以在任何地方运行超轻型容器:从桌面到云和的IoT装置,并且也嵌入在 [*任何编程语言*](https://github.com/wasmerio/wasmer#language-integrations).
[Wasmer](https://wasmer.io/) 提供基于 [WebAssembly](https://webassembly.org/) 的超轻量级容器,其可以在任何地方运行:从桌面到云、以及 IoT 设备,并且能也嵌入在 [*任何编程语言*](https://github.com/wasmerio/wasmer#language-integrations).

> This readme is also available in: [🇬🇧 English-英文](https://github.com/wasmerio/wasmer/blob/master/README.md)[🇪🇸 Español-西班牙语](https://github.com/wasmerio/wasmer/blob/master/docs/es/README.md)[🇫🇷 Français-法语](https://github.com/wasmerio/wasmer/blob/master/docs/fr/README.md)[🇯🇵 日本語-日文](https://github.com/wasmerio/wasmer/blob/master/docs/ja/README.md).
> 其他语言的 Readme: [🇬🇧 English-英文](https://github.com/wasmerio/wasmer/blob/master/README.md)[🇪🇸 Español-西班牙语](https://github.com/wasmerio/wasmer/blob/master/docs/es/README.md)[🇫🇷 Français-法语](https://github.com/wasmerio/wasmer/blob/master/docs/fr/README.md)[🇯🇵 日本語-日文](https://github.com/wasmerio/wasmer/blob/master/docs/ja/README.md).
## 特征
## 特性

* **快速又安全**. Wasmer 在完全沙盒化的环境中以“接近本机”的速度运行 WebAssembly。
* **快速又安全**. Wasmer在完全沙盒化的环境中以“接近本机”的速度运行 WebAssembly。

* **可插拔**. Wasmer支持不同的编译框架以最适合您的需求(LLVM,Cranelift ...).
* **可插拔**. Wasmer 可以根据你的需求支持不同的编译框架 (LLVM,Cranelift ...).

* **普遍的**. 您可以在任何*平台*(macOS,Linux和Windows)和*芯片组*中运行Wasmer.
* **通用的**. 你可以在**任何平台**(macOS, Linux and Windows) 和芯片组运行 Wasmer.

* **符合标准**. 运行时通过了[官方WebAssembly测试
套件](https://github.com/WebAssembly/testsuite) 支持[WASI](https://github.com/WebAssembly/WASI)[Emscripten](https://emscripten.org/).
* **符合标准**. 运行时通过了[官方WebAssembly测试集](https://github.com/WebAssembly/testsuite) 支持[WASI](https://github.com/WebAssembly/WASI)[Emscripten](https://emscripten.org/).

## 快速开始

Wasmer出厂时没有任何依赖关系. 您可以使用以下安装程序进行安装:
Wasmer 不需要安装其他依赖. 你可以使用以下安装程序进行安装:

```sh
curl https://get.wasmer.io -sSfL | sh
Expand All @@ -66,41 +65,41 @@ iwr https://win.wasmer.io -useb | iex

#### 执行WebAssembly文件

安装Wasmer之后,您应该已经准备好执行第一个WebAssemby文件! 🎉
安装Wasmer之后,你已经准备好执行第一个WebAssemby文件了! 🎉

您可以通过运行QuickJS开始: [qjs.wasm](https://registry-cdn.wapm.io/contents/_/quickjs/0.0.3/build/qjs.wasm)
您可以通过运行 QuickJS 开始: [qjs.wasm](https://registry-cdn.wapm.io/contents/_/quickjs/0.0.3/build/qjs.wasm)

```bash
$ wasmer qjs.wasm
QuickJS - Type "\h" for help
qjs >
```

#### 接下来是您可以做的:
#### 接下来是你可以做的:

- [在您的Rust应用程序中使用Wasmer](https://docs.wasmer.io/integrations/rust)
- [在你的Rust应用程序中使用Wasmer](https://docs.wasmer.io/integrations/rust)
- [在WAPM上发布Wasm程序包](https://docs.wasmer.io/ecosystem/wapm/publishing-your-package)
- [阅读有关Wasmer的更多信息](https://medium.com/wasmer/)

## 语言整合

📦 Wasmer运行时可以用作**以不同语言嵌入的库**因此您可以在任何位置使用WebAssembly.
📦 Wasmer 运行时能以库的形式**嵌入到不同的语言**因此你可以在任何地方使用WebAssembly.

| &nbsp; | 语言 | | 文件资料 |
| &nbsp; | 语言 | 程序包 | 文档 |
|-|-|-|-|
| ![Rust logo] | [**Rust**][Rust integration] | [`wasmer` Rust crate] | [文件资料][rust docs]
| ![C logo] | [**C/C++**][C integration] | [`wasmer.h` headers] | [文件资料][c docs] |
| ![C# logo] | [**C#**][C# integration] | [`WasmerSharp` NuGet package] | [文件资料][c# docs] |
| ![D logo] | [**D**][D integration] | [`wasmer` Dub package] | [文件资料][d docs] |
| ![Python logo] | [**Python**][Python integration] | [`wasmer` PyPI package] | [文件资料][python docs] |
| ![JS logo] | [**Javascript**][JS integration] | [`@wasmerio` NPM packages] | [文件资料][js docs] |
| ![Go logo] | [**Go**][Go integration] | [`wasmer` Go package] | [文件资料][go docs] |
| ![PHP logo] | [**PHP**][PHP integration] | [`wasm` PECL package] | [文件资料][php docs] |
| ![Ruby logo] | [**Ruby**][Ruby integration] | [`wasmer` Ruby Gem] | [文件资料][ruby docs] |
| ![Java logo] | [**Java**][Java integration] | [`wasmer/wasmer-jni` Bintray package] | [文件资料][java docs] |
| ![Elixir logo] | [**Elixir**][Elixir integration] | [`wasmex` hex package] | [文件资料][elixir docs] |
| ![R logo] | [**R**][R integration] | *没有已发布的软件包* | [文件资料][r docs] |
| ![Postgres logo] | [**Postgres**][Postgres integration] | *没有已发布的软件包* | [文件资料][postgres docs] |
| ![Rust logo] | [**Rust**][Rust integration] | [`wasmer` Rust crate] | [文档][rust docs]
| ![C logo] | [**C/C++**][C integration] | [`wasmer.h` headers] | [文档][c docs] |
| ![C# logo] | [**C#**][C# integration] | [`WasmerSharp` NuGet package] | [文档][c# docs] |
| ![D logo] | [**D**][D integration] | [`wasmer` Dub package] | [文档][d docs] |
| ![Python logo] | [**Python**][Python integration] | [`wasmer` PyPI package] | [文档][python docs] |
| ![JS logo] | [**Javascript**][JS integration] | [`@wasmerio` NPM packages] | [文档][js docs] |
| ![Go logo] | [**Go**][Go integration] | [`wasmer` Go package] | [文档][go docs] |
| ![PHP logo] | [**PHP**][PHP integration] | [`wasm` PECL package] | [文档][php docs] |
| ![Ruby logo] | [**Ruby**][Ruby integration] | [`wasmer` Ruby Gem] | [文档][ruby docs] |
| ![Java logo] | [**Java**][Java integration] | [`wasmer/wasmer-jni` Bintray package] | [文档][java docs] |
| ![Elixir logo] | [**Elixir**][Elixir integration] | [`wasmex` hex package] | [文档][elixir docs] |
| ![R logo] | [**R**][R integration] | *没有已发布的软件包* | [文档][r docs] |
| ![Postgres logo] | [**Postgres**][Postgres integration] | *没有已发布的软件包* | [文档][postgres docs] |
| | [**Swift**][Swift integration] | *没有已发布的软件包* | |

[👋 缺少语言?](https://github.com/wasmerio/wasmer/issues/new?assignees=&labels=%F0%9F%8E%89+enhancement&template=---feature-request.md&title=)
Expand Down Expand Up @@ -174,19 +173,19 @@ qjs >

**我们欢迎任何形式的贡献,尤其是来自社区新成员的贡献** 💜

您可以在[我们的出色文档](https://docs.wasmer.io/ecosystem/wasmer/building-from-source) 中检查如何构建Wasmer运行时!
你可以在[我们的出色文档](https://docs.wasmer.io/ecosystem/wasmer/building-from-source) 中学习如何构建 Wasmer 运行时!

### 测试

要测试吗? The [Wasmer文档将向您展示如何](https://docs.wasmer.io/ecosystem/wasmer/building-from-source/testing).
想要测试吗? [参考 Wasmer 文档](https://docs.wasmer.io/ecosystem/wasmer/building-from-source/testing).

## 社区

Wasmer拥有一个了不起的开发人员和贡献者社区。 欢迎您,请加入我们! 👋
Wasmer 拥有一个由出色的开发人员和贡献者组成的社区。 欢迎你,请加入我们! 👋

### 频道

- [Slack](https://slack.wasmer.io/)
- [Twitter](https://twitter.com/wasmerio)
- [Facebook](https://www.facebook.com/wasmerio)
- [Email](mailto:[email protected])
- [Email](mailto:[email protected])
4 changes: 2 additions & 2 deletions lib/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ wasmer-engine = { path = "../engine", version = "1.0.2" }
wasmer-engine-universal = { path = "../engine-universal", version = "1.0.2", optional = true }
wasmer-engine-native = { path = "../engine-native", version = "1.0.2", optional = true }
wasmer-types = { path = "../types", version = "1.0.2" }
indexmap = { version = "1.4", features = ["serde-1"] }
cfg-if = "0.1"
indexmap = { version = "1.6", features = ["serde-1"] }
cfg-if = "1.0"
wat = { version = "1.0", optional = true }
thiserror = "1.0"
more-asserts = "0.2"
Expand Down
1 change: 1 addition & 0 deletions lib/c-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Looking for changes to the Wasmer CLI and the Rust API? See our [Primary Changel
## **[Unreleased]**

### Added
- [#2346](https://github.com/wasmerio/wasmer/pull/2346) Add missing `wasm_func_copy` function.
- [#2208](https://github.com/wasmerio/wasmer/pull/2208) Add a new CHANGELOG.md specific to our C API to make it easier for users primarily consuming our C API to keep up to date with changes that affect them.

### Changed
Expand Down
5 changes: 5 additions & 0 deletions lib/c-api/src/wasm_c_api/externals/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ pub unsafe extern "C" fn wasm_func_new_with_env(
Some(Box::new(wasm_func_t::new(function)))
}

#[no_mangle]
pub extern "C" fn wasm_func_copy(func: &wasm_func_t) -> Box<wasm_func_t> {
Box::new(func.clone())
}

#[no_mangle]
pub unsafe extern "C" fn wasm_func_delete(_func: Option<Box<wasm_func_t>>) {}

Expand Down
2 changes: 1 addition & 1 deletion lib/engine-native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ wasmer-vm = { path = "../vm", version = "1.0.2", features = ["enable-rkyv"] }
wasmer-engine = { path = "../engine", version = "1.0.2" }
wasmer-object = { path = "../object", version = "1.0.2" }
serde = { version = "1.0", features = ["derive", "rc"] }
cfg-if = "0.1"
cfg-if = "1.0"
tracing = "0.1"
leb128 = "0.2"
libloading = "0.7"
Expand Down
Loading

0 comments on commit 14f469f

Please sign in to comment.