Skip to content

Commit

Permalink
feat: add experimental v8 build script
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldziuba03 committed Sep 25, 2024
1 parent b51146c commit a37f4ae
Show file tree
Hide file tree
Showing 1,730 changed files with 61,543 additions and 37,543 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ _
*.app
sample
pand
build/
build/

# v8 related:
_/
deps/v8
deps/.cipd
deps/depot_tools
deps/.gclient*
deps/.gcs_entries
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,25 @@
My own JavaScript runtime - currently, just randomly messing around with v8 engine in C++. Very unstable as I learn how things work together.

### TODO:

- [x] Try to bind SWC (written in Rust) into my C++ codebase
- [x] Integrate my async IO library for runtime's event loop: [luxio](https://github.com/michaldziuba03/luxio) (renamed to `pandio`, runtime will use updated version soon).
- [x] Create timers
- [x] Clunky TCP support
- [x] Basic support for ES6 imports
- [ ] Improve TCP module
- [ ] Improve memory management and fix potential leaks
- [ ] File system module
### Building

Make sure you have CMake installed.

You need to download v8 as dependency and it will take reasonable amount of time to compile (even 40 mins - depends on machine).

```sh
# Download v8 and build
cmake -P v8.cmake
mkdir build
cd build

# Build our actual project
cmake ..
cmake --build .
```

> `v8.cmake` script is not tested yet on fresh Linux installation.

> Current state example:
Expand Down
21 changes: 0 additions & 21 deletions build.sh

This file was deleted.

12 changes: 7 additions & 5 deletions deps/v8/.clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
---
Checks: '-*,
bugprone-unique-ptr-array-mismatch,
# google-build-explicit-make-pair,
google-default-arguments,
google-explicit-constructor,
google-readability-casting,
modernize-redundant-void-arg,
modernize-replace-random-shuffle,
modernize-shrink-to-fit,
Expand All @@ -11,12 +15,10 @@
# modernize-use-equals-delete,
modernize-use-nullptr,
modernize-use-override,
# google-build-explicit-make-pair,
google-default-arguments,
google-explicit-constructor,
google-readability-casting'
performance-inefficient-vector-operation,
performance-trivially-destructible,
performance-unnecessary-copy-initialization'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
...

6 changes: 3 additions & 3 deletions deps/v8/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
root = true
# editorconfig.org

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
6 changes: 4 additions & 2 deletions deps/v8/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
/third_party/colorama/src
!/third_party/cpu_features
/third_party/cpu_features/src
!/third_party/fast_float
/third_party/fast_float/src
!/third_party/glibc
!/third_party/googletest
/third_party/googletest/src
Expand All @@ -81,8 +83,8 @@
!/third_party/test262-harness
!/third_party/v8
!/third_party/wasm-api
/tools/builtins-pgo/profiles/*.profile
/tools/builtins-pgo/profiles/profiles_version
/tools/builtins-pgo/profiles/*
!/tools/builtins-pgo/profiles/.*
/tools/clang
/tools/gcmole/bootstrap
/tools/gcmole/gcmole-tools
Expand Down
11 changes: 10 additions & 1 deletion deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ Anton Bershanskiy <[email protected]>
Anton Bikineev <[email protected]>
Ao Wang <[email protected]>
Archil Sharashenidze <[email protected]>
Artem Kobzar <[email protected]>
Arthur Islamov <[email protected]>
Asuka Shikina <[email protected]>
Aurèle Barrière <[email protected]>
Bala Avulapati <[email protected]>
Bangfu Tao <[email protected]>
Expand Down Expand Up @@ -143,11 +145,11 @@ Henrique Ferreiro <[email protected]>
Helmut Januschka <[email protected]>
Hirofumi Mako <[email protected]>
Hisham Muhammad <[email protected]>
Ho Cheung <[email protected]>
Honggyu Kim <[email protected]>
Huáng Jùnliàng <[email protected]>
HyeockJin Kim <[email protected]>
Iain Ireland <[email protected]>
Ilya Gavrilin <[email protected]>
Ingvar Stepanyan <[email protected]>
Ioseb Dzmanashvili <[email protected]>
Isiah Meadows <[email protected]>
Expand All @@ -170,6 +172,7 @@ Joel Stanley <[email protected]>
Johan Bergström <[email protected]>
Johan Levin <[email protected]>
John Paul Adrian Glaubitz <[email protected]>
Jojo R <[email protected]>
Jonathan Liu <[email protected]>
Juan Arboleda <[email protected]>
Julien Brianceau <[email protected]>
Expand Down Expand Up @@ -205,7 +208,9 @@ Matt Hanselman <[email protected]>
Matthew Sporleder <[email protected]>
Maxim Mazurok <[email protected]>
Maxim Mossienko <[email protected]>
Md Hasibul Hasan <[email protected]>
Meir Shpilraien <[email protected]>
Meng Tan <[email protected]>
Michael Lutz <[email protected]>
Michael Mclaughlin <[email protected]>
Michael Smith <[email protected]>
Expand Down Expand Up @@ -264,6 +269,7 @@ Sébastien Doeraene <[email protected]>
Seo Sanghyeon <[email protected]>
Shawn Anastasio <[email protected]>
Shawn Presser <[email protected]>
Sho Miyamoto <[email protected]>
Stefan Penner <[email protected]>
Stefan Stojanovic <[email protected]>
Stephan Hartmann <[email protected]>
Expand Down Expand Up @@ -299,6 +305,7 @@ Wiktor Garbacz <[email protected]>
Wouter Vermeiren <[email protected]>
Xiaofang Zou <[email protected]>
Xiaoyin Liu <[email protected]>
Yagiz Nizipli <[email protected]>
Yanbo Li <[email protected]>
Yannic Bonenberger <[email protected]>
Yi Wang <[email protected]>
Expand All @@ -307,11 +314,13 @@ Youfeng Hao <[email protected]>
Yu Yin <[email protected]>
Yujie Wang <[email protected]>
Yuri Iozzelli <[email protected]>
Yuri Gaevsky <[email protected]>
Yusif Khudhur <[email protected]>
Yuxiang Cao <[email protected]>
Zac Hansen <[email protected]>
Zeynep Cankara <[email protected]>
Zhao Jiazhong <[email protected]>
Zhaojun Meng <[email protected]>
Zheng Liu <[email protected]>
Zhongping Wang <[email protected]>
柳荣一 <[email protected]>
Expand Down
Loading

0 comments on commit a37f4ae

Please sign in to comment.