Commit Graph

595 Commits

Author SHA1 Message Date
Mark McCaskey
63f277bce4 Make FuncRef nullable at the API level 2021-02-01 09:41:18 -08:00
Mark McCaskey
e013581fda Update vm::Table to support more than just funcref 2021-01-29 10:19:19 -08:00
Nick Lewycky
91d399e8f4 Apply cleanups proposed by clippy. 2021-01-26 16:02:22 -08:00
Mark McCaskey
924ffd8797 Prepare for 1.0.1 release 2021-01-12 08:08:19 -08:00
Mark McCaskey
86574c6b09 Merge pull request #2005 from wasmerio/fix/emscripten-exports
Improve WasmerEnv, fix emscripten imports
2021-01-11 14:11:51 -08:00
Mark McCaskey
f4d317070c Document the updates to WasmerEnv derive 2021-01-11 12:40:28 -08:00
Alexander Mescheryakov
ba5dabe3f3 Fixed broken link to wasmer-wasi 2021-01-10 22:04:03 +03:00
Mark McCaskey
cac4583b19 Add links on all crates.io badges 2021-01-07 06:48:32 -08:00
Mark McCaskey
0448f729fd Fix up readme files, remove version numbers 2021-01-07 06:36:27 -08:00
Alexander Mescheryakov
142a788cfc Fix examples URI 2021-01-07 13:18:07 +03:00
Mark McCaskey
bc73789cc0 Prepare for 1.0.0 release 2021-01-05 06:21:03 -08:00
Mark McCaskey
b592ed83af Reimplement WasmPtr::get_utf8_string to be fully sound 2021-01-04 07:45:57 -08:00
Mark McCaskey
316bfa08e9 Improve docs, update cl 2021-01-04 07:37:39 -08:00
Mark McCaskey
34072cbf6f Make WasmPtr::get_utf8_string return String
The old functionality is readded as an `unsafe` method,
`WasmPtr::get_utf8_str`.

It's important to note that `WasmPtr::get_utf8_string` isn't _entirely_
sound and technically should be marked `unsafe` as well, but this change
is a massive improvement over what we had before.

For future reference, the reason `WasmPtr::get_utf8_string` still has some
soundness issues is that we can't guarantee exclusive access to the memory
while parsing in the string, we temporarily hold a `&[u8]` and hope it
doesn't get mutated. It's possible to implement this method in a more
correct way by copying each byte as we read it into a `Vec` and converting
that into a String.
2021-01-04 07:23:08 -08:00
Mark McCaskey
1ac42e2e3b Update usage of beta to rc 2020-12-23 11:33:53 -08:00
Mark McCaskey
2d1c03bea0 Prepare for 1.0.0-rc1 release 2020-12-23 11:17:07 -08:00
Simon Warta
df74a4812c Create dedicated MiddlewareError 2020-12-23 00:07:00 +01:00
Simon Warta
c41451a547 Replace wasmparser::Result with wasmer::WasmResult in middleware 2020-12-23 00:07:00 +01:00
Mark McCaskey
e3eb529c60 Merge branch 'master' into feature/clean-up-host-env-code 2020-12-18 07:56:55 -08:00
Mark McCaskey
fc9a8f87df Address feedback, clean up code 2020-12-18 07:54:30 -08:00
bors[bot]
8e343633df Merge #1948
1948: doc: Fix links r=Hywan a=Hywan

# Description

Since the `intra-doc-links` feature has been stabilized, we can see more clearly that we have many broken links. This PR is an attempt to fix them!

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Ivan Enderlin <ivan@mnt.io>
2020-12-17 13:35:59 +00:00
Ivan Enderlin
78faa4fa25 doc: Fix links.
Since the `intra-doc-links` feature has been stabilized, we can see
more clearly that we have many broken links. This PR is an attempt to
fix them!
2020-12-17 11:24:54 +01:00
Simon Warta
9d6fc4a4ba Expose wasmer::LLVMOptLevel 2020-12-17 10:13:07 +01:00
Simon Warta
85bb1039f8 Expose wasmer::CraneliftOptLevel
This is required to do something like

```rust
use wasmer::{Cranelift, CraneliftOptLevel};

let mut compiler = Cranelift::default();
compiler.opt_level(CraneliftOptLevel::None);
let engine = JIT::new(compiler).engine();
// ...
```
2020-12-17 10:13:07 +01:00
Mark McCaskey
4494bea70a Clean up host env code, add more Send, Sync bounds 2020-12-16 08:37:47 -08:00
Mark McCaskey
59df6917d8 Prepare for 1.0.0-beta2 release 2020-12-16 07:41:59 -08:00
Mark McCaskey
8081aaeee4 Add WasmerEnv: Sync 2020-12-15 13:43:37 -08:00
Mark McCaskey
6a2116917f Fix up tests, make WasmerEnv: Send 2020-12-15 13:35:19 -08:00
Mark McCaskey
62d15fae36 Merge branch 'master' into fix/host-func-env-memory-leak 2020-12-15 08:37:18 -08:00
bors[bot]
59431fade7 Merge #1924 #1934
1924: Export wasmer::{BaseTunables, Tunables} r=Hywan a=webmaster128

Closes #1872

ping @Hywan 

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


1934: Point to `native` versions of functions in Function docs r=Hywan a=MarkMcCaskey

It's not obvious from looking at the docs for `Function` that there are native variants.  This PR makes it clear that when users are figuring out how to make functions that they're shown the `native` variants.

Co-authored-by: Simon Warta <simon@warta.it>
Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-12-15 08:17:25 +00:00
bors[bot]
5b6c4de0ce Merge #1929
1929: fix(vm) Update doc', clarify type fields etc. r=Hywan a=Hywan

# Description

Sequel of https://github.com/wasmerio/wasmer/pull/1902. This PR updates the documentation, rename some variables, and clarify some type fields.

# Review

- ~[ ] Add a short description of the the change to the CHANGELOG.md file~ not necessary I guess


Co-authored-by: Ivan Enderlin <ivan@mnt.io>
2020-12-15 07:41:59 +00:00
Mark McCaskey
ad864912c7 Point to native versions of functions in Function docs 2020-12-14 14:41:10 -08:00
Simon Warta
69f834a9e8 Accept Into<FunctionType> as signatures 2020-12-14 13:08:15 +01:00
Ivan Enderlin
facd41412a feat(vm) Rename the instance_allocator fields to instance_ref. 2020-12-14 10:28:38 +01:00
Simon Warta
c0e7f194ad Export wasmer::{BaseTunables, Tunables} 2020-12-12 16:07:14 +01:00
Mark McCaskey
f798f34eef Merge branch 'master' into fix/host-func-env-memory-leak 2020-12-11 17:22:08 -08:00
Mark McCaskey
ec4d6e6d10 Address feedback, make code more explicit about the different cases 2020-12-11 13:00:20 -08:00
bors[bot]
c1402c810b Merge #1896
1896: Improve Wasmer API intro docs r=MarkMcCaskey a=MarkMcCaskey

Setting up our core docs to be easily accessible by new users.

Still a work in progress, but we should be able to ship these doc improvements to master at any time.

Here's what it looks like:

![image](https://user-images.githubusercontent.com/5770194/101407925-738d0580-3890-11eb-9a81-39004093c1bb.png)

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-12-11 20:29:54 +00:00
Mark McCaskey
7e1274b0b5 Address feedback on API docs 2020-12-10 17:38:01 -08:00
jubianchi
c81ea9e4bb chore: Remove some warnings 2020-12-10 15:25:56 +01:00
Mark McCaskey
ff194f6251 Add example in the intro, reorder docs 2020-12-09 16:49:07 -08:00
Mark McCaskey
be3c381169 Make NativeFunc Clone 2020-12-09 12:26:53 -08:00
Mark McCaskey
99e035711c Merge branch 'master' into fix/host-func-env-memory-leak 2020-12-09 11:55:50 -08:00
Mark McCaskey
eb8b486388 Fix use-after free with NativeFunc 2020-12-08 12:13:17 -08:00
Mark McCaskey
6e95c50dc2 Address feedback 2020-12-08 11:02:26 -08:00
Mark McCaskey
d54a8b8676 Improve Wasmer API intro docs 2020-12-07 13:29:53 -08:00
Mark McCaskey
476e8d1cd6 Merge branch 'master' into fix/host-func-env-memory-leak 2020-12-07 11:06:01 -08:00
Mark McCaskey
ca4736cca9 Fix tests in C API and deprecated API 2020-12-04 17:40:37 -08:00
Mark McCaskey
4ec8c9e71a Fix issue with dynamic host env 2020-12-04 17:07:01 -08:00
Mark McCaskey
e43d9d2732 Experimental: clone host envs during construction 2020-12-04 16:04:03 -08:00