Skip to content

Commit

Permalink
Javet v1.0.0 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao authored Oct 9, 2021
1 parent d8ed2fa commit 35585f8
Show file tree
Hide file tree
Showing 443 changed files with 14,266 additions and 5,387 deletions.
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Major Features
==============

* Linux + Mac OS + ️Windows (x86_64)
* Node.js ``v14.17.6`` + V8 ``v9.4.146.16`` (`Which Node.js version do you prefer? <https://github.com/caoccao/Javet/issues/89>`_)
* Node.js ``v16.10.0`` + V8 ``v9.4.146.16`` (`Which Node.js version do you prefer? <https://github.com/caoccao/Javet/issues/89>`_)
* Dynamic switch between Node.js and V8 mode (`Which mode do you prefer? <https://github.com/caoccao/Javet/discussions/92>`_)
* Polyfill V8 mode with `Javenode <https://github.com/caoccao/Javenode>`_
* V8 API exposure in JVM
Expand All @@ -52,31 +52,31 @@ Maven
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet</artifactId>
<version>0.9.14</version>
<version>1.0.0</version>
</dependency>
<!-- Mac OS (x86_64 Only) -->
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>javet-macos</artifactId>
<version>0.9.14</version>
<version>1.0.0</version>
</dependency>
Gradle Kotlin DSL
^^^^^^^^^^^^^^^^^

.. code-block:: kotlin
implementation("com.caoccao.javet:javet:0.9.14") // Linux or Windows
implementation("com.caoccao.javet:javet-macos:0.9.14") // Mac OS (x86_64 Only)
implementation("com.caoccao.javet:javet:1.0.0") // Linux or Windows
implementation("com.caoccao.javet:javet-macos:1.0.0") // Mac OS (x86_64 Only)
Gradle Groovy DSL
^^^^^^^^^^^^^^^^^

.. code-block:: groovy
implementation 'com.caoccao.javet:javet:0.9.14' // Linux or Windows
implementation 'com.caoccao.javet:javet-macos:0.9.14' // Mac OS (x86_64 Only)
implementation 'com.caoccao.javet:javet:1.0.0' // Linux or Windows
implementation 'com.caoccao.javet:javet-macos:1.0.0' // Mac OS (x86_64 Only)
Hello Javet
-----------
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repositories {
}

group = "com.caoccao.javet"
version = "0.9.14"
version = "1.0.0"

repositories {
mavenCentral()
Expand Down
13 changes: 8 additions & 5 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ if(DEFINED NODE_DIR)
${NODE_DIR}/deps/v8/include
${NODE_DIR}/src)
list(APPEND importLibraries
brotli cares histogram llhttp nghttp2 openssl torque_base uvwasi
brotli cares histogram llhttp nghttp2 nghttp3 ngtcp2 openssl torque_base uvwasi
v8_base_without_compiler v8_compiler v8_init v8_initializers
v8_libbase v8_libplatform v8_libsampler v8_snapshot v8_zlib zlib)
v8_libbase v8_libplatform v8_snapshot v8_zlib zlib)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND importLibraries libnode libuv)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
Expand All @@ -86,6 +86,9 @@ endforeach(importLibrary)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(JAVET_LIB_PREFIX "libjavet")
set(JAVET_LIB_SYSTEM "windows")
# Generate PDB file
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
add_definitions(-D_ITERATOR_DEBUG_LEVEL=0 -D_WIN32)
list(APPEND includeDirs $ENV{JAVA_HOME}/include/win32)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
Expand All @@ -100,7 +103,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND includeDirs
${NODE_DIR}/out/Release/obj/global_intermediate/generate-bytecode-output-root
${NODE_DIR}/out/Release/obj/global_intermediate/inspector-generated-output-root
${NODE_DIR}/out/Release/obj/global_intermediate/torque-output-root)
${NODE_DIR}/out/Release/obj/global_intermediate)
foreach(importLibrary ${importLibraries})
set_target_properties(${importLibrary} PROPERTIES IMPORTED_LOCATION ${NODE_DIR}/out/release/lib/${importLibrary}.lib)
endforeach(importLibrary)
Expand Down Expand Up @@ -136,7 +139,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"
list(APPEND includeDirs
${NODE_DIR}/out/Release/obj/gen/generate-bytecode-output-root
${NODE_DIR}/out/Release/obj/gen/inspector-generated-output-root
${NODE_DIR}/out/Release/obj/gen/torque-output-root)
${NODE_DIR}/out/Release/obj/gen)
foreach(importLibrary ${importLibraries})
set_target_properties(${importLibrary} PROPERTIES IMPORTED_LOCATION ${NODE_DIR}/out/Release/lib${importLibrary}.a)
endforeach(importLibrary)
Expand Down Expand Up @@ -164,7 +167,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"
list(APPEND includeDirs
${NODE_DIR}/out/Release/obj/gen/generate-bytecode-output-root
${NODE_DIR}/out/Release/obj/gen/inspector-generated-output-root
${NODE_DIR}/out/Release/obj/gen/torque-output-root)
${NODE_DIR}/out/Release/obj/gen)
foreach(importLibrary ${importLibraries})
set_target_properties(${importLibrary} PROPERTIES IMPORTED_LOCATION ${NODE_DIR}/out/Release/lib${importLibrary}.a)
endforeach(importLibrary)
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Usage for V8: sh build-linux.sh -DV8_DIR=${HOME}/v8
# Usage for Node: sh build-linux.sh -DNODE_DIR=${HOME}/node
JAVET_VERSION=0.9.14
JAVET_VERSION=1.0.0
rm -rf build
mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Usage for V8: sh build-macos.sh -DV8_DIR=${HOME}/v8
# Usage for Node: sh build-macos.sh -DNODE_DIR=${HOME}/node
JAVET_VERSION=0.9.14
JAVET_VERSION=1.0.0
rm -rf build
mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion cpp/build-windows.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
REM Usage for V8: build -DV8_DIR=C:\v8
REM Usage for Node: build -DNODE_DIR=C:\node
SET JAVET_VERSION=0.9.14
SET JAVET_VERSION=1.0.0
rd /s/q build
mkdir build
cd build
Expand Down
Loading

0 comments on commit 35585f8

Please sign in to comment.