Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cesarvr/v8-hacking
My first steps hacking the V8 Javascript engine.
https://github.com/cesarvr/v8-hacking
Last synced: about 1 month ago
JSON representation
My first steps hacking the V8 Javascript engine.
- Host: GitHub
- URL: https://github.com/cesarvr/v8-hacking
- Owner: cesarvr
- Created: 2015-09-24T15:38:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-20T12:39:46.000Z (about 9 years ago)
- Last Synced: 2023-05-15T07:20:20.660Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 9.54 MB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# v8-hacking
My first steps hacking the V8 Javascript engine. I want to learn how to interact native code with the V8 VM.This is just a hello world example from [Google Developer] page with some modification cause the example
provided there doesn't work out of the box for me.instruction tested only in linux.
* download the source code from https://developers.google.com/v8/build.
* build/installing:```sh
$ git clone [email protected]:cesarvr/v8-hacking.git
```
- go to deps folder and make a symlink to your v8 folder, you can clone the v8 project inside, but I choose to make a soft link.```sh
$ ln -s path/v8 deps/v8
```
* In root directory you can find the Makefile with a basic configuration to compile and link C++ with a Embedded V8.
* this is just a hello world with C++ program with V8 embedded. to build it just do:```sh
make hello
```* in this example I just create a native method [ print ], and exposure them in javascript so you can write something like:
```javascript
function(){
print('hello world');
}
```to compile it just do:
```sh
make native
```- happy hacking!.
-
[Google Developer]: