Skip to content

Commit

Permalink
[wasm] Draft version of C/C++ Wasm API
Browse files Browse the repository at this point in the history
Imported from https://github.com/WebAssembly/wasm-c-api/ and
updated to work inside V8.
Tests will be added in an upcoming CL.

This is experimental; it is not yet recommended to rely on it.

Change-Id: I05914f4b63298bf7c848c4d4c8811f0f6eb882e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1516478
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60910}
  • Loading branch information
jakobkummerow authored and Commit Bot committed Apr 17, 2019
1 parent bfc8afd commit f80bfea
Show file tree
Hide file tree
Showing 8 changed files with 5,299 additions and 4 deletions.
21 changes: 21 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3664,6 +3664,27 @@ if (v8_monolithic) {
}
}

v8_static_library("wee8") {
deps = [
":v8_base",
":v8_libbase",
":v8_libplatform",
":v8_libsampler",
":v8_maybe_snapshot",
"//build/win:default_exe_manifest",
]

# TODO: v8dll-main.cc equivalent for shared library builds

configs = [ ":internal_config" ]

sources = [
"src/wasm/c-api.cc",
"third_party/wasm-c-api/wasm.h",
"third_party/wasm-c-api/wasm.hh",
]
}

###############################################################################
# Executables
#
Expand Down
10 changes: 6 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ are:
This code is copyrighted by Sun Microsystems Inc. and released
under a 3-clause BSD license.

- Valgrind client API header, located at third_party/valgrind/valgrind.h
This is release under the BSD license.
- Valgrind client API header, located at src/third_party/valgrind/valgrind.h
This is released under the BSD license.

- antlr4 parser generator Cpp library located in third_party/antlr4
This is release under the BSD license.
- The Wasm C/C++ API headers, located at third_party/wasm-api/wasm.{h,hh}
This is released under the Apache license. The API's upstream prototype
implementation also formed the basis of V8's implementation in
src/wasm/c-api.cc.

These libraries have their own licenses; we recommend you read them,
as their terms may differ from the terms below.
Expand Down
7 changes: 7 additions & 0 deletions src/wasm/DEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
specific_include_rules = {
"c-api\.cc": [
"+include/libplatform/libplatform.h",
"+third_party/wasm-api/wasm.h",
"+third_party/wasm-api/wasm.hh",
],
}
Loading

0 comments on commit f80bfea

Please sign in to comment.