GithubHelp home page GithubHelp logo

v8-rs's Introduction

v8-rs Build Status Crates.io codecov Language (Rust)

Note: This library is not actively maintained. I (dflemstr) have attempted keeping it up to date with the latest mainline V8 versions, but the maintenance burden is too high. The path forward would be to more directly map the C++ API of V8 via bindgen and go forward from there to try to automate more of the API surface mapping, but several attempts at doing so by me have failed. Pull requests welcome!

This is a wrapper around the V8 Javascript engine, used for example in the Google Chrome browser or Node.js.

Documentation

Building

It is quite complicated to build V8. This library has been tested against V8 5.4.x with GCC 6.x, but later versions might work.

Static / Shared

By default, this library links V8 statically. There is a feature called shared that builds it by linking to libv8.so (and related libraries like libicu-i10n.so) instead. There's usually little reason to link dynamically since the V8 ABI changes fairly frequently.

Ubuntu / Travis CI

The easiest way to build this library on Ubuntu or Travis CI is to use a pre-packaged version of V8. You need both sudo and Ubuntu Trusty or later to install a compatible one:

sudo: true
dist: trusty
language: rust

addons:
  apt:
    sources:
      - sourceline: 'ppa:pinepain/libv8-5.4'
      - ubuntu-toolchain-r-test
    packages:
      # Modern compilers
      - gcc-6
      - g++-6
      # The V8 version that we want to bind
      - libv8-5.4-dev
      - libicu-dev

env:
  global:
    - CC=gcc-6
    - CXX=g++-6

Build tree

You can build a build tree using any supported build method that uses any combination of depot_tools, make, gyp, ninja and/or gn, but gn hasn't been tested that extensively.

You should set v8_use_snapshot=false, loading snapshots is currently not supported.

You should also not disable i10n support; this library assumes libicu was built at the same time as V8 or is compatible with V8.

You should build using shared_library if you want to build with the shared feature.

Simply set the environment variable V8_SOURCE to the root of the v8 checkout, and V8_BUILD to the build output in the tree (for example $V8_SOURCE/out/Release) and the build Should Work®. If not, please figure out how to fix it and send a PR, it'll be impossible for me to test all of the V8 build configurations :)

v8-rs's People

Contributors

darfink avatar dflemstr avatar prokopyl avatar tcosprojects avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v8-rs's Issues

Incorrect version listed in README

The README mentions that this should work with V8 5.4.x, but it seems that this should be 5.5x based on my tests with different versions of V8.

src/v8-trampoline.h:3:10: fatal error: 'v8.h' file not found

I have v8 built in shared mode, and when trying to add v8-rs to a project, like this:

[dependencies.v8]
version = "0.9.6"
features = ["shared"]

It gives the error in the title. How can I add a compiler include argument to point it to the v8 include folder where the v8.h file lives?

Example code for reading an ArrayBufferView?

Hi, despite the lack of documentation, examples or tests, I've figured out how to read most values I needed from function arguments. But I haven't been able to read an ArrayBuffer or ArrayBufferView.

Here's one of my attempts:

use v8::*;
fn testf(info: value::FunctionCallbackInfo) -> Result<Value, Value> {
    let arr = info.args[0].into_array_buffer_view().unwrap();
    println!("{:?}", arr);
    Ok(Value::from(value::undefined(&info.isolate)))
}

for which I get

29 |     let arr = info.args[0].into_array_buffer().unwrap();
   |               ^^^^^^^^^^^^ cannot move out of indexed content

windows compilation

i compiled v8 with the depot_tools. this was suprislingly, without any greater hasle.
but if i want to compile v8-rs, the following error emerges.

rust toolchain: nightly-x86_64-pc-windows-msvc
visual studio: 15.5.2
v8: 6.5.9
environment variables set:
* V8_SOURCE: v8_path
* V8_BUILD: v8_path + 'out/Release'

as one my notice, the flags for the "c++14" standart is already there. i cloned the v8-rs repo and changed it. but it does change nothing. the error message is exactly the same.

   Compiling v8-sys v0.14.7 (file:///E:/workspace/v8-rs/v8-sys)
error: failed to run custom build command for `v8-sys v0.14.7 (file:///E:/workspace/v8-rs/v8-sys)`
process didn't exit successfully: `E:\workspace\evermore\target\debug\build\v8-sys-a77c977a56620f5b\build-script-build` (exit code: 101)
--- stderr
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstddef:257:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:521:13: error: deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:772:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:816:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:1226:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:1280:12: error: deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xmemory0:412:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xmemory0:422:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:75:2: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:119:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:144:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:169:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:188:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:213:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:233:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:252:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:276:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\vector:643:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\vector:935:3: error: deduced return types are a C++14 extension
fatal error: too many errors emitted, stopping now [-ferror-limit=]
thread 'main' panicked at '

Internal error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX64\\x64\\cl.exe" "/nologo" "/MD" "/Z7" "/I" "E:\\workspace\\evermo
re\\libs\\v8\\include" "/I" "src" "/I" "E:\\workspace\\evermore\\target\\debug\\build\\v8-sys-a7c4f5bbff11adde\\out" "-std=c++14" "/std:c++14" "-Wall" "/W4" "/FoE:\\workspace\\evermore\\target\\debug\\build\
\v8-sys-a7c4f5bbff11adde\\out\\src\\v8-glue.o" "/c" "src/v8-glue.cc" with args "cl.exe" did not execute successfully (status code exit code: 2).

', C:\Users\gojira\.cargo\registry\src\github.com-1ecc6299db9ec823\gcc-0.3.54\src\lib.rs:1670:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.```

Compiling with V8 6.9 on windows

Hi,

I've been evaluating embedding V8 into a rust application. At a high level, what's needed to make this work with v6.9, assuming that I use bindgen to generate the low level bindings?

I'm not familiar with how often the V8 API changes between releases, so how much work would it take to change this crate accordingly? I'll be happy to help if I decide to attempt this.

My use cases are:

  • Exposing many functions from Rust to be called by JavaScript, hopefully in an ergonomic way.
  • Calling some JS functions from Rust
  • Exposing some structs as JS classes, controlling what happens when script tries to make modifications so I can implement copy on write semantics.

Context requirement for function templates

I've been thinking about the context requirement for FunctionTemplate. From what I can tell by analysing the source code, the context is required because an object is created to map the callback and its associated context together.

Because of this you cannot create a FunctionTemplate without a reference, and it removes the ability to reuse templates between contexts. This creates some issues (from the top of my head):

  • The HasInstance method (corresponding to JavaScript's instanceof) cannot be used between objects from different contexts.
  • You need to allocate a new object (and templates) even for those which have a static lifetime (e.g a console-like object).

I was thinking about analysing the code to decide whether this dependency can be removed, but I assume it was created for an educated reason in the first place.

License(s) missing

Potential users and contributors would probably want to know the license terms for this library, even though it's in an early stage of development.

Failed to run example against V8 6.3.0 (candidate) on macOS 10.12.6

I appreciate that this was likely to fail, but thought I'd report findings for reference.

$ gn gen out.gn/pdsdev --args='is_debug=false target_cpu="x64" v8_target_cpu="x64" v8_use_snapshot=false'
$ ninja -C out.gn/pdsdev
$ export V8_SOURCE=/Users/pwrdwnsys/tmp_stuff/v8
$ export V8_LIBS=/Users/pwrdwnsys/tmp_stuff/v8/out.gn/pdsdev/obj

The V8 build completes and tests run successfully. I then try running the v8-rs hello-world example using rustc 1.22.0-nightly (6c476ce46 2017-09-25):

   Compiling serde v0.9.15
   Compiling pkg-config v0.3.9
   Compiling void v1.0.2
   Compiling strsim v0.6.0
   Compiling log v0.3.8
   Compiling regex-syntax v0.4.1
   Compiling dtoa v0.4.2
   Compiling unicode-width v0.1.4
   Compiling utf8-ranges v1.0.0
   Compiling glob v0.2.11
   Compiling cfg-if v0.1.2
   Compiling rustc-demangle v0.1.5
   Compiling num-traits v0.1.40
   Compiling bitflags v0.9.1
   Compiling bitflags v0.7.0
   Compiling unicode-xid v0.0.4
   Compiling siphasher v0.2.2
   Compiling ansi_term v0.9.0
   Compiling rustc-serialize v0.3.24
   Compiling itoa v0.3.4
   Compiling gcc v0.3.54
   Compiling libc v0.2.31
   Compiling vec_map v0.8.0
   Compiling lazy_static v0.2.8
   Compiling term v0.4.6
   Compiling unreachable v1.0.0
   Compiling phf_shared v0.7.21
   Compiling clang-sys v0.14.1
   Compiling thread_local v0.3.4
   Compiling atty v0.2.2
   Compiling backtrace v0.3.3
   Compiling memchr v1.0.1
   Compiling rand v0.3.16
   Compiling term_size v0.3.0
   Compiling num_cpus v1.6.2
   Compiling phf v0.7.21
   Compiling aho-corasick v0.6.3
   Compiling nom v3.2.0
   Compiling error-chain v0.9.0
   Compiling textwrap v0.8.0
   Compiling regex v0.2.2
   Compiling clap v2.26.2
   Compiling phf_generator v0.7.21
   Compiling phf_codegen v0.7.21
   Compiling target_build_utils v0.3.1
   Compiling syntex_pos v0.54.0
   Compiling cexpr v0.2.2
   Compiling syntex_errors v0.54.0
   Compiling serde_json v0.9.10
   Compiling syntex_syntax v0.54.0
   Compiling env_logger v0.4.3
   Compiling libloading v0.3.4
   Compiling clang v0.15.0
   Compiling v8-api v0.7.3 (file:///Users/pwrdwnsys/tmp_stuff/v8-rs/v8-api)
   Compiling aster v0.38.0
   Compiling quasi v0.29.0
   Compiling syntex v0.54.0
   Compiling quasi_codegen v0.29.0
   Compiling bindgen v0.22.1
   Compiling v8-sys v0.14.7 (file:///Users/pwrdwnsys/tmp_stuff/v8-rs/v8-sys)
warning: use of deprecated item: gcc::Config has been renamed to gcc::Build
   --> v8-sys/build.rs:205:22
    |
205 |     let mut config = gcc::Config::new();
    |                      ^^^^^^^^^^^^^^^^
    |
    = note: #[warn(deprecated)] on by default

warning: unused extern crate
 --> v8-sys/build.rs:3:1
  |
3 | extern crate clang;
  | ^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_extern_crates)] on by default

error: failed to run custom build command for `v8-sys v0.14.7 (file:///Users/pwrdwnsys/tmp_stuff/v8-rs/v8-sys)`
process didn't exit successfully: `/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-dba2bb6c12b6e54a/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=src/v8-trampoline.h
cargo:rerun-if-changed=src/v8-glue.h
cargo:rerun-if-changed=src/v8-glue.cc
-I"/Users/pwrdwnsys/tmp_stuff/v8/include"
-I"/usr/local/include"
-I"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/include"
-I"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include"
-I"/usr/include"
-I"/System/Library/Frameworks"
-I"/Library/Frameworks"
V8_LIBS="/Users/pwrdwnsys/tmp_stuff/v8/out.gn/pdsdev/obj"
cargo:rustc-link-search=native=/Users/pwrdwnsys/tmp_stuff/v8/out.gn/pdsdev
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CXX_x86_64-apple-darwin = None
CXX_x86_64_apple_darwin = None
HOST_CXX = None
CXX = None
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CXXFLAGS_x86_64-apple-darwin = None
CXXFLAGS_x86_64_apple_darwin = None
HOST_CXXFLAGS = None
CXXFLAGS = None
DEBUG = Some("true")
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-m64" "-I" "/Users/pwrdwnsys/tmp_stuff/v8/include" "-I" "src" "-I" "/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out" "-std=c++11" "-Wall" "-Wall" "-Wextra" "-o" "/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out/src/v8-glue.o" "-c" "src/v8-glue.cc"
cargo:warning=In file included from src/v8-glue.cc:1:
cargo:warning=In file included from src/v8-glue.h:3:
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:647:54: warning: unused parameter 'source' [-Wunused-parameter]
cargo:warning=  V8_INLINE static void Copy(const Persistent<S, M>& source,
cargo:warning=                                                     ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:648:53: warning: unused parameter 'dest' [-Wunused-parameter]
cargo:warning=                             NonCopyablePersistent* dest) {
cargo:warning=                                                    ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:667:54: warning: unused parameter 'source' [-Wunused-parameter]
cargo:warning=  static V8_INLINE void Copy(const Persistent<S, M>& source,
cargo:warning=                                                     ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:668:50: warning: unused parameter 'dest' [-Wunused-parameter]
cargo:warning=                             CopyablePersistent* dest) {
cargo:warning=                                                 ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:6065:16: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=      Isolate* isolate, Local<String> name) {
cargo:warning=               ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:6065:39: warning: unused parameter 'name' [-Wunused-parameter]
cargo:warning=      Isolate* isolate, Local<String> name) {
cargo:warning=                                      ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:6689:50: warning: unused parameter 'string' [-Wunused-parameter]
cargo:warning=  virtual void VisitExternalString(Local<String> string) {}
cargo:warning=                                                 ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:6699:57: warning: unused parameter 'value' [-Wunused-parameter]
cargo:warning=  virtual void VisitPersistentHandle(Persistent<Value>* value,
cargo:warning=                                                        ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:6700:47: warning: unused parameter 'class_id' [-Wunused-parameter]
cargo:warning=                                     uint16_t class_id) {}
cargo:warning=                                              ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:9103:55: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=  V8_INLINE static void CheckInitialized(v8::Isolate* isolate) {
cargo:warning=                                                      ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:9242:35: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=Local<T> Eternal<T>::Get(Isolate* isolate) const {
cargo:warning=                                  ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:9530:29: warning: unused parameter 'whatever' [-Wunused-parameter]
cargo:warning=void ReturnValue<T>::Set(S* whatever) {
cargo:warning=                            ^
cargo:warning=In file included from src/v8-glue.cc:1:
cargo:warning=In file included from src/v8-glue.h:4:
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:71:62: warning: unused parameter 'name' [-Wunused-parameter]
cargo:warning=  virtual const uint8_t* GetCategoryGroupEnabled(const char* name) {
cargo:warning=                                                             ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:85:12: warning: unused parameter 'phase' [-Wunused-parameter]
cargo:warning=      char phase, const uint8_t* category_enabled_flag, const char* name,
cargo:warning=           ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:85:34: warning: unused parameter 'category_enabled_flag' [-Wunused-parameter]
cargo:warning=      char phase, const uint8_t* category_enabled_flag, const char* name,
cargo:warning=                                 ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:85:69: warning: unused parameter 'name' [-Wunused-parameter]
cargo:warning=      char phase, const uint8_t* category_enabled_flag, const char* name,
cargo:warning=                                                                    ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:86:19: warning: unused parameter 'scope' [-Wunused-parameter]
cargo:warning=      const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
cargo:warning=                  ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:86:35: warning: unused parameter 'id' [-Wunused-parameter]
cargo:warning=      const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
cargo:warning=                                  ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:86:48: warning: unused parameter 'bind_id' [-Wunused-parameter]
cargo:warning=      const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
cargo:warning=                                               ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:86:65: warning: unused parameter 'num_args' [-Wunused-parameter]
cargo:warning=      const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
cargo:warning=                                                                ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:87:20: warning: unused parameter 'arg_names' [-Wunused-parameter]
cargo:warning=      const char** arg_names, const uint8_t* arg_types,
cargo:warning=                   ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:87:46: warning: unused parameter 'arg_types' [-Wunused-parameter]
cargo:warning=      const char** arg_names, const uint8_t* arg_types,
cargo:warning=                                             ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:88:23: warning: unused parameter 'arg_values' [-Wunused-parameter]
cargo:warning=      const uint64_t* arg_values,
cargo:warning=                      ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:89:50: warning: unused parameter 'arg_convertables' [-Wunused-parameter]
cargo:warning=      std::unique_ptr<ConvertableToTraceFormat>* arg_convertables,
cargo:warning=                                                 ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:90:20: warning: unused parameter 'flags' [-Wunused-parameter]
cargo:warning=      unsigned int flags) {
cargo:warning=                   ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:98:56: warning: unused parameter 'category_enabled_flag' [-Wunused-parameter]
cargo:warning=  virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
cargo:warning=                                                       ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:99:53: warning: unused parameter 'name' [-Wunused-parameter]
cargo:warning=                                        const char* name, uint64_t handle) {}
cargo:warning=                                                    ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:99:68: warning: unused parameter 'handle' [-Wunused-parameter]
cargo:warning=                                        const char* name, uint64_t handle) {}
cargo:warning=                                                                   ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:187:52: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=  virtual void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) {
cargo:warning=                                                   ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:187:71: warning: unused parameter 'task' [-Wunused-parameter]
cargo:warning=  virtual void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) {
cargo:warning=                                                                      ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:194:42: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=  virtual bool IdleTasksEnabled(Isolate* isolate) {
cargo:warning=                                         ^
cargo:warning=In file included from src/v8-glue.cc:1:
cargo:warning=src/v8-glue.h:163:9: warning: 'V8_INTRINSICS_LIST' macro redefined [-Wmacro-redefined]
cargo:warning=#define V8_INTRINSICS_LIST(F) F(ArrayProto_values, array_values_iterator)
cargo:warning=        ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:5038:9: note: previous definition is here
cargo:warning=#define V8_INTRINSICS_LIST(F)                    \
cargo:warning=        ^
cargo:warning=In file included from src/v8-glue.cc:1:
cargo:warning=In file included from src/v8-glue.h:362:
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out/v8-glue-generated.h:733:49: error: unknown type name 'DcheckErrorCallback'; did you mean 'v8::DcheckErrorCallback'?
cargo:warning=void v8_V8_SetDcheckErrorHandler(RustContext c, DcheckErrorCallback that);
cargo:warning=                                                ^~~~~~~~~~~~~~~~~~~
cargo:warning=                                                v8::DcheckErrorCallback
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:6198:16: note: 'v8::DcheckErrorCallback' declared here
cargo:warning=typedef void (*DcheckErrorCallback)(const char* file, int line,
cargo:warning=               ^
cargo:warning=src/v8-glue.cc:43:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(bool, bool, MaybeBool)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:44:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(int, int, MaybeInt)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:45:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(unsigned int, uint, MaybeUInt)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:46:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(long, long, MaybeLong)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:47:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(unsigned long, ulong, MaybeULong)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:48:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(uint32_t, u32, MaybeU32)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:49:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(int32_t, i32, MaybeI32)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:50:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(uint64_t, u64, MaybeU64)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:51:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(int64_t, i64, MaybeI64)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:52:1: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=UNWRAP_MAYBE_PRIM(double, f64, MaybeF64)
cargo:warning=^
cargo:warning=src/v8-glue.cc:31:22: note: expanded from macro 'UNWRAP_MAYBE_PRIM'
cargo:warning=        v8::Isolate *isolate,                   \
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:55:18: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=    v8::Isolate *isolate,
cargo:warning=                 ^
cargo:warning=src/v8-glue.cc:81:18: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=    v8::Isolate *isolate,
cargo:warning=                 ^
cargo:warning=src/v8-glue.cc:92:44: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=template<typename A> A unwrap(v8::Isolate *isolate, A &&value) {
cargo:warning=                                           ^
cargo:warning=src/v8-glue.cc:106:37: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::AccessControl wrap(v8::Isolate *isolate, AccessControl value) {
cargo:warning=                                    ^
cargo:warning=src/v8-glue.cc:124:38: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::PropertyFilter wrap(v8::Isolate *isolate, PropertyFilter value) {
cargo:warning=                                     ^
cargo:warning=src/v8-glue.cc:150:41: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::KeyCollectionMode wrap(v8::Isolate *isolate, KeyCollectionMode value) {
cargo:warning=                                        ^
cargo:warning=src/v8-glue.cc:160:35: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::IndexFilter wrap(v8::Isolate *isolate, IndexFilter value) {
cargo:warning=                                  ^
cargo:warning=src/v8-glue.cc:170:38: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::IntegrityLevel wrap(v8::Isolate *isolate, IntegrityLevel value) {
cargo:warning=                                     ^
cargo:warning=src/v8-glue.cc:180:41: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::PropertyAttribute wrap(v8::Isolate *isolate, PropertyAttribute value) {
cargo:warning=                                        ^
cargo:warning=src/v8-glue.cc:202:44: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::PropertyHandlerFlags wrap(v8::Isolate *isolate, PropertyHandlerFlags value) {
cargo:warning=                                           ^
cargo:warning=src/v8-glue.cc:220:43: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::ConstructorBehavior wrap(v8::Isolate *isolate, ConstructorBehavior value) {
cargo:warning=                                          ^
cargo:warning=src/v8-glue.cc:230:42: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::PromiseRejectEvent wrap(v8::Isolate *isolate, PromiseRejectEvent value) {
cargo:warning=                                         ^
cargo:warning=src/v8-glue.cc:240:33: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::Intrinsic wrap(v8::Isolate *isolate, Intrinsic value) {
cargo:warning=                                ^
cargo:warning=src/v8-glue.cc:249:47: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=v8::ArrayBufferCreationMode wrap(v8::Isolate *isolate, ArrayBufferCreationMode value) {
cargo:warning=                                              ^
cargo:warning=src/v8-glue.cc:667:42: warning: unused parameter 'isolate' [-Wunused-parameter]
cargo:warning=template<typename A> A wrap(v8::Isolate *isolate, A value) {
cargo:warning=                                         ^
cargo:warning=src/v8-glue.cc:757:16: error: allocating an object of abstract class type 'GluePlatform'
cargo:warning=    return new GluePlatform(platform_functions);
cargo:warning=               ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:212:18: note: unimplemented pure virtual method 'CurrentClockTimeMillis' in 'GluePlatform'
cargo:warning=  virtual double CurrentClockTimeMillis() = 0;
cargo:warning=                 ^
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8-platform.h:225:30: note: unimplemented pure virtual method 'GetTracingController' in 'GluePlatform'
cargo:warning=  virtual TracingController* GetTracingController() = 0;
cargo:warning=                             ^
cargo:warning=In file included from src/v8-glue.cc:847:
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out/v8-glue-generated.cc:2166:92: error: cannot initialize a parameter of type 'AccessorNameGetterCallback' (aka 'void (*)(Local<v8::Name>, const PropertyCallbackInfo<v8::Value> &)') with an lvalue of type 'void (*)(v8::Persistent<v8::Name, v8::NonCopyablePersistentTraits<v8::Name> > *, PropertyCallbackInfo *)': type mismatch at 1st parameter ('Local<v8::Name>' vs 'v8::Persistent<v8::Name, v8::NonCopyablePersistentTraits<v8::Name> > *')
cargo:warning=  auto result = self->Get(c.isolate)->SetNativeDataProperty(context_wrapped, name_wrapped, getter_wrapped, setter_wrapped, data_wrapped, attributes_wrapped);
cargo:warning=                                                                                           ^~~~~~~~~~~~~~
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:3261:34: note: passing argument to parameter 'getter' here
cargo:warning=      AccessorNameGetterCallback getter,
cargo:warning=                                 ^
cargo:warning=In file included from src/v8-glue.cc:847:
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out/v8-glue-generated.cc:4492:40: error: cannot initialize a parameter of type 'FunctionCallback' (aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)') with an lvalue of type 'void (*)(FunctionCallbackInfo *)': type mismatch at 1st parameter ('const FunctionCallbackInfo<v8::Value> &' vs 'FunctionCallbackInfo *')
cargo:warning=  self->Get(c.isolate)->SetCallHandler(callback_wrapped, data_wrapped);
cargo:warning=                                       ^~~~~~~~~~~~~~~~
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:5572:40: note: passing argument to parameter 'callback' here
cargo:warning=  void SetCallHandler(FunctionCallback callback,
cargo:warning=                                       ^
cargo:warning=In file included from src/v8-glue.cc:847:
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out/v8-glue-generated.cc:5452:49: error: unknown type name 'DcheckErrorCallback'; did you mean 'v8::DcheckErrorCallback'?
cargo:warning=void v8_V8_SetDcheckErrorHandler(RustContext c, DcheckErrorCallback that) {
cargo:warning=                                                ^~~~~~~~~~~~~~~~~~~
cargo:warning=                                                v8::DcheckErrorCallback
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:6198:16: note: 'v8::DcheckErrorCallback' declared here
cargo:warning=typedef void (*DcheckErrorCallback)(const char* file, int line,
cargo:warning=               ^
cargo:warning=In file included from src/v8-glue.cc:847:
cargo:warning=/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out/v8-glue-generated.cc:5782:10: error: cannot initialize return object of type 'uint8_t *' (aka 'unsigned char *') with an lvalue of type 'const unsigned char *'
cargo:warning=  return unwrap(c.isolate, result);
cargo:warning=         ^~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=src/v8-glue.cc:941:16: warning: unused parameter 'resource_is_embedder_debug_script' [-Wunused-parameter]
cargo:warning=    BooleanRef resource_is_embedder_debug_script,
cargo:warning=               ^
cargo:warning=src/v8-glue.cc:1127:17: warning: unused parameter 'self' [-Wunused-parameter]
cargo:warning=    TemplateRef self,
cargo:warning=                ^
cargo:warning=src/v8-glue.cc:1128:15: warning: unused parameter 'name' [-Wunused-parameter]
cargo:warning=    StringRef name,
cargo:warning=              ^
cargo:warning=src/v8-glue.cc:1129:28: warning: unused parameter 'getter' [-Wunused-parameter]
cargo:warning=    AccessorGetterCallback getter,
cargo:warning=                           ^
cargo:warning=src/v8-glue.cc:1130:28: warning: unused parameter 'setter' [-Wunused-parameter]
cargo:warning=    AccessorSetterCallback setter,
cargo:warning=                           ^
cargo:warning=src/v8-glue.cc:1131:14: warning: unused parameter 'data' [-Wunused-parameter]
cargo:warning=    ValueRef data,
cargo:warning=             ^
cargo:warning=src/v8-glue.cc:1132:23: warning: unused parameter 'attribute' [-Wunused-parameter]
cargo:warning=    PropertyAttribute attribute,
cargo:warning=                      ^
cargo:warning=src/v8-glue.cc:1133:26: warning: unused parameter 'signature' [-Wunused-parameter]
cargo:warning=    AccessorSignatureRef signature,
cargo:warning=                         ^
cargo:warning=src/v8-glue.cc:1134:19: warning: unused parameter 'settings' [-Wunused-parameter]
cargo:warning=    AccessControl settings) {
cargo:warning=                  ^
cargo:warning=src/v8-glue.cc:1176:23: warning: unused parameter 'self' [-Wunused-parameter]
cargo:warning=    ObjectTemplateRef self,
cargo:warning=                      ^
cargo:warning=src/v8-glue.cc:1177:15: warning: unused parameter 'name' [-Wunused-parameter]
cargo:warning=    StringRef name,
cargo:warning=              ^
cargo:warning=src/v8-glue.cc:1178:28: warning: unused parameter 'getter' [-Wunused-parameter]
cargo:warning=    AccessorGetterCallback getter,
cargo:warning=                           ^
cargo:warning=src/v8-glue.cc:1179:28: warning: unused parameter 'setter' [-Wunused-parameter]
cargo:warning=    AccessorSetterCallback setter,
cargo:warning=                           ^
cargo:warning=src/v8-glue.cc:1180:14: warning: unused parameter 'data' [-Wunused-parameter]
cargo:warning=    ValueRef data,
cargo:warning=             ^
cargo:warning=src/v8-glue.cc:1181:19: warning: unused parameter 'settings' [-Wunused-parameter]
cargo:warning=    AccessControl settings,
cargo:warning=                  ^
cargo:warning=src/v8-glue.cc:1182:23: warning: unused parameter 'attribute' [-Wunused-parameter]
cargo:warning=    PropertyAttribute attribute,
cargo:warning=                      ^
cargo:warning=src/v8-glue.cc:1183:26: warning: unused parameter 'signature' [-Wunused-parameter]
cargo:warning=    AccessorSignatureRef signature) {
cargo:warning=                         ^
cargo:warning=src/v8-glue.cc:1193:23: warning: unused parameter 'self' [-Wunused-parameter]
cargo:warning=    ObjectTemplateRef self,
cargo:warning=                      ^
cargo:warning=src/v8-glue.cc:1194:15: warning: unused parameter 'name' [-Wunused-parameter]
cargo:warning=    StringRef name,
cargo:warning=              ^
cargo:warning=src/v8-glue.cc:1195:32: warning: unused parameter 'getter' [-Wunused-parameter]
cargo:warning=    AccessorNameGetterCallback getter,
cargo:warning=                               ^
cargo:warning=src/v8-glue.cc:1196:32: warning: unused parameter 'setter' [-Wunused-parameter]
cargo:warning=    AccessorNameSetterCallback setter,
cargo:warning=                               ^
cargo:warning=src/v8-glue.cc:1197:14: warning: unused parameter 'data' [-Wunused-parameter]
cargo:warning=    ValueRef data,
cargo:warning=             ^
cargo:warning=src/v8-glue.cc:1198:19: warning: unused parameter 'settings' [-Wunused-parameter]
cargo:warning=    AccessControl settings,
cargo:warning=                  ^
cargo:warning=src/v8-glue.cc:1199:23: warning: unused parameter 'attribute' [-Wunused-parameter]
cargo:warning=    PropertyAttribute attribute,
cargo:warning=                      ^
cargo:warning=src/v8-glue.cc:1200:26: warning: unused parameter 'signature' [-Wunused-parameter]
cargo:warning=    AccessorSignatureRef signature) {
cargo:warning=                         ^
cargo:warning=src/v8-glue.cc:1210:23: warning: unused parameter 'self' [-Wunused-parameter]
cargo:warning=    ObjectTemplateRef self,
cargo:warning=                      ^
cargo:warning=src/v8-glue.cc:1211:22: warning: unused parameter 'callback' [-Wunused-parameter]
cargo:warning=    FunctionCallback callback,
cargo:warning=                     ^
cargo:warning=src/v8-glue.cc:1212:14: warning: unused parameter 'data' [-Wunused-parameter]
cargo:warning=    ValueRef data) {
cargo:warning=             ^
cargo:warning=src/v8-glue.cc:1222:23: warning: unused parameter 'self' [-Wunused-parameter]
cargo:warning=    ObjectTemplateRef self,
cargo:warning=                      ^
cargo:warning=src/v8-glue.cc:1223:25: warning: unused parameter 'callback' [-Wunused-parameter]
cargo:warning=    AccessCheckCallback callback,
cargo:warning=                        ^
cargo:warning=src/v8-glue.cc:1224:14: warning: unused parameter 'data' [-Wunused-parameter]
cargo:warning=    ValueRef data) {
cargo:warning=             ^
cargo:warning=88 warnings and 6 errors generated.
exit code: 1

--- stderr
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4166:26: error: no member named 'unique_ptr' in namespace 'std'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4166:37: error: expected expression
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4166:53: error: expected member name or ';' after declaration specifiers
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4181:28: error: no member named 'unique_ptr' in namespace 'std'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4181:39: error: expected expression
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4181:55: error: expected member name or ';' after declaration specifiers
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4183:25: error: unknown type name 'OwnedBuffer'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4183:45: error: unknown type name 'OwnedBuffer'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4186:5: error: unknown type name 'OwnedBuffer'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4187:5: error: unknown type name 'OwnedBuffer'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4205:3: error: unknown type name 'SerializedModule'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4226:34: error: no type named 'OwnedBuffer' in 'v8::WasmCompiledModule::TransferrableModule'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4184:30: error: no member named 'move' in namespace 'std'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4184:59: error: no member named 'move' in namespace 'std'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4248:26: error: no member named 'unique_ptr' in namespace 'std'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4248:37: error: expected expression
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4248:53: error: expected member name or ';' after declaration specifiers
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4270:15: error: use of undeclared identifier 'Buffer'
/Users/pwrdwnsys/tmp_stuff/v8/include/v8.h:4272:8: error: no type named 'shared_ptr' in namespace 'std'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
thread 'main' panicked at '

Internal error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-m64" "-I" "/Users/pwrdwnsys/tmp_stuff/v8/include" "-I" "src" "-I" "/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out" "-std=c++11" "-Wall" "-Wall" "-Wextra" "-o" "/Users/pwrdwnsys/tmp_stuff/v8-rs/target/debug/build/v8-sys-612cdfcace439d82/out/src/v8-glue.o" "-c" "src/v8-glue.cc" with args "c++" did not execute successfully (status code exit code: 1).

', /Users/pwrdwnsys/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.54/src/lib.rs:1670:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:60
             at src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:397
   4: std::panicking::begin_panic
             at src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at src/libstd/panicking.rs:538
   6: std::panicking::try::do_call
             at src/libstd/panicking.rs:522
   7: gcc::fail
             at /Users/pwrdwnsys/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.54/src/lib.rs:1670
   8: gcc::Build::try_compile::{{closure}}
             at /Users/pwrdwnsys/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.54/src/lib.rs:783
   9: build_script_build::build_glue
             at v8-sys/build.rs:232
  10: build_script_build::main
             at v8-sys/build.rs:51
  11: panic_unwind::dwarf::eh::read_encoded_pointer
             at src/libpanic_unwind/lib.rs:99
  12: <std::rand::reader::ReaderRng<R> as rand::Rng>::fill_bytes
             at src/libstd/panicking.rs:459
             at src/libstd/panic.rs:361
             at src/libstd/rt.rs:59
  13: <v8_api::Type as build_script_build::DisplayAsC>::fmt

Is this project dead?

There haven't been any commits for almost one year, is this project dead?

If so, it would be nice to put that into the README.

v8-sys fails to compile due to some problem with the build script

I was trying to compile rq from sources but it failed on v8-sys with an error. I tried to compile v8-sys separately to check it and indeed it could be reproduced:

/tmp/v8-rs/v8-sys % cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading gcc v0.3.40
 Downloading clang-sys v0.11.1
 Downloading rustc-serialize v0.3.22
   Compiling rustc-serialize v0.3.22
   Compiling lazy_static v0.2.2
   Compiling bitflags v0.7.0
   Compiling glob v0.2.11
   Compiling pkg-config v0.3.8
   Compiling gcc v0.3.40
   Compiling strsim v0.5.2
   Compiling unicode-xid v0.0.3
   Compiling utf8-ranges v0.1.3
   Compiling bitflags v0.5.0
   Compiling log v0.3.6
   Compiling clang-sys v0.11.1
   Compiling libc v0.2.18
   Compiling nom v1.2.4
   Compiling memchr v0.1.11
   Compiling aho-corasick v0.5.3
   Compiling winapi v0.2.8
   Compiling cexpr v0.2.0
   Compiling winapi-build v0.1.1
   Compiling kernel32-sys v0.2.2
   Compiling thread-id v2.0.0
   Compiling thread_local v0.2.7
   Compiling syntex_pos v0.38.0
   Compiling term v0.4.4
   Compiling regex-syntax v0.3.9
   Compiling clang v0.13.0
   Compiling syntex_errors v0.38.0
   Compiling regex v0.1.80
   Compiling syntex_syntax v0.38.0
   Compiling docopt v0.6.86
   Compiling env_logger v0.3.5
   Compiling v8-api v0.7.0 (file:///tmp/v8-rs/v8-api)
   Compiling bindgen v0.19.1
   Compiling v8-sys v0.14.1 (file:///tmp/v8-rs/v8-sys)
error: failed to run custom build command for `v8-sys v0.14.1 (file:///tmp/v8-rs/v8-sys)`
process didn't exit successfully: `/tmp/v8-rs/v8-sys/target/debug/build/v8-sys-3dc4d834d583cc7e/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=src/v8-trampoline.h
cargo:rerun-if-changed=src/v8-glue.h
cargo:rerun-if-changed=src/v8-glue.cc
-I"/usr/include"
-I"/usr/local/include"
preferring static linking: true
cargo:rustc-link-search=native=/usr/lib
cargo:rustc-link-lib=v8
cargo:rustc-link-lib=icui18n
cargo:rustc-link-lib=icuuc
cargo:rustc-link-lib=icudata
cargo:rustc-link-lib=pthread
cargo:rustc-link-lib=dl
cargo:rustc-link-lib=m
cargo:rustc-link-lib=v8_libbase
using pkg-config for library v8
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("x86_64-unknown-linux-gnu")
debug=true opt-level=0
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CXX_x86_64-unknown-linux-gnu = None
CXX_x86_64_unknown_linux_gnu = None
HOST_CXX = None
CXX = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CXXFLAGS_x86_64-unknown-linux-gnu = None
CXXFLAGS_x86_64_unknown_linux_gnu = None
HOST_CXXFLAGS = None
CXXFLAGS = None
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-fPIC" "-I" "src" "-I" "/tmp/v8-rs/v8-sys/target/debug/build/v8-sys-2ded8b1ee7da9ab0/out" "-std=c++11" "-Wall" "-o" "/tmp/v8-rs/v8-sys/target/debug/build/v8-sys-2ded8b1ee7da9ab0/out/src/v8-glue.o" "-c" "src/v8-glue.cc"
ExitStatus(ExitStatus(0))
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
AR_x86_64-unknown-linux-gnu = None
AR_x86_64_unknown_linux_gnu = None
HOST_AR = None
AR = None
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
running: "ar" "crs" "/tmp/v8-rs/v8-sys/target/debug/build/v8-sys-2ded8b1ee7da9ab0/out/libv8sysglue.a" "/tmp/v8-rs/v8-sys/target/debug/build/v8-sys-2ded8b1ee7da9ab0/out/src/v8-glue.o"
ExitStatus(ExitStatus(0))
TARGET = Some("x86_64-unknown-linux-gnu")
cargo:rustc-link-lib=static=v8sysglue
cargo:rustc-link-search=native=/tmp/v8-rs/v8-sys/target/debug/build/v8-sys-2ded8b1ee7da9ab0/out
TARGET = Some("x86_64-unknown-linux-gnu")
cargo:rustc-link-lib=stdc++
V8_SOURCE not set, searching system paths

--- stderr
/usr/include/v8.h:18:10: fatal error: 'stddef.h' file not found
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', ../src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Naturally, I have v8 compiled and installed. I'm using Archlinux (x86_64), so v8 is installed from AUR. I also have both gcc and clang installed:

% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 6.2.1 20160830 (GCC)
% clang -v
clang version 3.9.0 (tags/RELEASE_390/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.1
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.2.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/6.2.1
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.2.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

Although I don't think that clang is needed since v8-sys seems to be using c++ which is an alias to GCC.

Storing callbacks (v8::value::Function) in a struct

Hey, I know this repo is not maintained anymore, but thought I'd give it a shot.

I had the hardest time storing a v8 Function in a struct. Here's what I was encountering: https://gist.github.com/jeromegn/40727cf0eaa8e18734b0822b5ffd14bc

With a little help from IRC, I was able to get it to work by wrapping the value::Function with a Rc<RefCell<value::Function>>, but I don't think that's the right way?

I wish this was maintained, it's a really good bindings implementation. There aren't many out there given the complexity of v8.

Also, worth noting building this project is a bit broken (I'm not entirely sure which environment variables to use, and they seem to assume a directory structure.) I was able to build everything by putting v8 in /usr/local/{lib,include} and not using any environment variables.

I used v8 5.7.x from the ruby libv8 gem which made this entirely more easy. I bet you could link to it in the readme for a very easy way to install v8 for a bunch of platforms. All you have to do is download the gem, untar (a gem is just a tarball) and get to the vendor folder with pre-compiled v8 for your platform.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.