embedded-v8

How to compile the smallest possible V8 library for Windows?

混江龙づ霸主 提交于 2019-11-30 09:18:13
I'm making a game engine for school, and I want to use Google's V8 to allow for JavaScript scripting in-engine. The engine is written using Visual Studio 2013, and as the final game must not exceed 50MB, I want to keep the V8 filesize impact as small as possible. Looking around the Internet for how to do stuff with V8, I came across a series of tutorials on V8 , which comes with a precompiled .lib file for V8. However, it is four years old. I'm assuming that building a more recent version on my own would improve performance and add features, so I spent all of yesterday struggling with the V8

How to compile the smallest possible V8 library for Windows?

我是研究僧i 提交于 2019-11-29 14:13:59
问题 I'm making a game engine for school, and I want to use Google's V8 to allow for JavaScript scripting in-engine. The engine is written using Visual Studio 2013, and as the final game must not exceed 50MB, I want to keep the V8 filesize impact as small as possible. Looking around the Internet for how to do stuff with V8, I came across a series of tutorials on V8, which comes with a precompiled .lib file for V8. However, it is four years old. I'm assuming that building a more recent version on

Installing PHPv8js on Ubuntu

旧城冷巷雨未停 提交于 2019-11-29 02:07:14
I'm having some trouble installing phpv8js on Ubuntu. I've made sure I have a recent version of libv8 installed and have the required version of PHP but the install fails using PECL. Here's the output: libtool: compile: g++ -I. -I/tmp/pear/temp/v8js -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootFyySRS/v8js-0.1.2/include -I/tmp/pear/temp/pear-build-rootFyySRS/v8js-0.1.2/main -I/tmp/pear/temp/v8js -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/v8js

How to expose “native functions” to Javascript in a web page using Chromium and Delphi 6?

感情迁移 提交于 2019-11-28 17:58:46
I have successfully embedded Chromium into my Delphi 6 projects with the help of Delphi Chromium Embedded . Now I want to be able to execute Javascript code and the have results returned to my host Delphi app. My current method is to call ExecuteJavascript() and use a DOM element that the Javascript call writes its results to, and poll that element in a TTimer method from Delphi to retrieve the results. However, I read about using native functions and V8 extensions to have the Javascript call "call back" into my Delphi code as a way to receive results instead: http://magpcss.org/ceforum

Calling a v8 javascript function from c++ with an argument

一世执手 提交于 2019-11-28 17:31:04
I am working with c++ and v8, and have run into the following challenge: I want to be able to define a function in javascript using v8, then call the function later on through c++. Additionally, I want to be able to pass an argument to the javascript function from c++. I think the following sample source code would explain it best. Check towards the end of the sample code to see what I am trying to accomplish. #include <v8.h> #include <iostream> #include <string> #include <array> using namespace v8; int main(int argc, char* argv[]) { // Create a stack-allocated handle scope. HandleScope handle

What exactly is the difference between v8::Isolate and v8::Context?

我是研究僧i 提交于 2019-11-28 17:24:08
问题 What is the difference/connection between these objects in V8? Does a context "belong" to an Isolate or vice versa? I know that a single Isolate may only be accessed by one thread at a time (and that's what v8::Locker is for I guess?). I've looked through the docs but I can't seem to get a grasp on these concepts - any help is appreciated! 回答1: I'm sure the following is a simplification, but it works for me. An isolate is an independent copy of the V8 runtime, including a heap manager, a

Android NDK linking V8 static library: cannot find symbols, but they are there

痞子三分冷 提交于 2019-11-28 14:09:32
I've been pulling my hair out over this one. I am developing on Ubuntu 12.04 64-bit. I created a native Android app with V8 embedded in it, but after rebooting my computer, it doesn't link with V8 anymore! I've tried reinstalling ndk and recompiling V8, but to no avail. It appears the linker does include the static libraries, but doesn't find the symbols in them. I checked with nm, and the symbols appear to be there. When I run ndk_build, I get the following output: $ ndk-build V=1 rm -f ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/armeabi-v7a-hard/lib*.so ./libs/mips/lib*.so .

How to expose “native functions” to Javascript in a web page using Chromium and Delphi 6?

我们两清 提交于 2019-11-27 10:38:43
问题 I have successfully embedded Chromium into my Delphi 6 projects with the help of Delphi Chromium Embedded. Now I want to be able to execute Javascript code and the have results returned to my host Delphi app. My current method is to call ExecuteJavascript() and use a DOM element that the Javascript call writes its results to, and poll that element in a TTimer method from Delphi to retrieve the results. However, I read about using native functions and V8 extensions to have the Javascript call

Calling a v8 javascript function from c++ with an argument

让人想犯罪 __ 提交于 2019-11-27 10:32:05
问题 I am working with c++ and v8, and have run into the following challenge: I want to be able to define a function in javascript using v8, then call the function later on through c++. Additionally, I want to be able to pass an argument to the javascript function from c++. I think the following sample source code would explain it best. Check towards the end of the sample code to see what I am trying to accomplish. #include <v8.h> #include <iostream> #include <string> #include <array> using

Android NDK linking V8 static library: cannot find symbols, but they are there

房东的猫 提交于 2019-11-27 08:23:43
问题 I've been pulling my hair out over this one. I am developing on Ubuntu 12.04 64-bit. I created a native Android app with V8 embedded in it, but after rebooting my computer, it doesn't link with V8 anymore! I've tried reinstalling ndk and recompiling V8, but to no avail. It appears the linker does include the static libraries, but doesn't find the symbols in them. I checked with nm, and the symbols appear to be there. When I run ndk_build, I get the following output: $ ndk-build V=1 rm -f .