Commit graph

4 commits

Author SHA1 Message Date
Liam Appelbe cff78bed87 Reland "Switch wasmer FFI boilerplate to new API"
This reverts commit 0c3d3da6ce.

Un-deleting the LICENSE file, to fix the dart->flutter roller.

Change-Id: Iee44c24e7cdb5c03f4ae131d08451fae2e996f49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167201
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-10-13 19:30:58 +00:00
Alexander Aprelev 0c3d3da6ce Revert "Switch wasmer FFI boilerplate to new API"
This reverts commit 9d0ae7d017 as it broke dart->flutter roller's flutter license script.

Change-Id: If523b9b88631e1eca0fef3612387005921481222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166981
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-10-10 05:56:29 +00:00
Liam Appelbe 9d0ae7d017 Switch wasmer FFI boilerplate to new API
Broadly speaking, the new API is very similar to the old one. The only
public facing change is that you can't make a memory by itself anymore.
You need to construct if from a store, which is owned by a module.

The new API no longer passes structs by value, so I was able to delete
the wasmer_wrapper.cc, and the files I had copied from the wasmer repo.

The new API is also a lot more verbose, so it made more sense to write
a script to generate the FFI boilerplate, rather that write it all
manually.

All the migrated tests that were passing before this refactor are still
passing.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I52ca54b982a27f1d851c630d3e09833b8810060c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164081
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-10-09 19:43:57 +00:00
Liam Appelbe 0fee296130 [vm] Add wasmer to third_party, and support building rust libraries
This isn't linked in to anything yet, but I've verified that it works.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: Ib65d7f11aacac1a20d93fc5d4f10ced19ecb1e51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113263
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-20 16:56:10 +00:00