Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b405110
Merge tag '1.0.10' into develop
vjain008 Oct 31, 2025
23402ed
RDKEMW-9461:Nativescript Minimal build for Coverity
trupthi1403 Oct 22, 2025
d3cf4d8
Merge branch 'develop' into topic/RDKEMW-9461
trupthi1403 Nov 18, 2025
08d5c85
Merge pull request #84 from rdkcentral/topic/RDKEMW-9461
madanagopalt Nov 19, 2025
2e18ed3
RDK-59281:Modifying JSRuntime Widget for VIPA playback in 8.2_VIPA br…
Sid2001-maker Nov 12, 2025
94444b4
Update URLSearchParams.js
vjain008 Dec 2, 2025
43147a5
Update URLSearchParams.js
vjain008 Dec 2, 2025
14f1c9e
Update URLSearchParams.js
vjain008 Dec 2, 2025
a1c57e1
Merge pull request #86 from rdkcentral/topic/RDK-59281
vjain008 Dec 3, 2025
961988e
RDKEMW-9172: L2testcase for rdkNativeScript
trupthi1403 Dec 3, 2025
fddbc21
Update src/NativeJSRenderer.cpp
vjain008 Dec 9, 2025
896f2db
Update src/jsruntime.cpp
vjain008 Dec 9, 2025
37f5d5a
Merge pull request #91 from rdkcentral/topic/RDKEMW-9172
vjain008 Dec 9, 2025
37b83ba
RDKEMW-11265: Migrate L1 and native build workflow to rdk-e
trupthi1403 Dec 9, 2025
b25b0cd
Merge branch 'develop' into topic/RDKEMW-11265
trupthi1403 Dec 9, 2025
83a5667
Merge pull request #93 from rdkcentral/topic/RDKEMW-11265
vjain008 Dec 9, 2025
605e0ad
RDKEMW-8844: Improve L1 coverage
trupthi1403 Oct 15, 2025
52172c7
RDKEMW-9785: Increasing Test Coverage for L1 test
Sid2001-maker Nov 27, 2025
a0796df
Update include/EssosInstance.h
vjain008 Dec 10, 2025
bad6e9d
Update include/NativeJSRenderer.h
vjain008 Dec 10, 2025
158dd7f
Merge pull request #95 from rdkcentral/topic/RDKEMW-9785
vjain008 Dec 10, 2025
3e0f65c
Update src/linux/KeyInput.cpp
vjain008 Dec 10, 2025
641cfcd
Merge branch 'develop' into topic/RDKEMW-8844
vjain008 Dec 10, 2025
a8b999f
Merge pull request #79 from rdkcentral/topic/RDKEMW-8844
vjain008 Dec 10, 2025
f2fbbe9
RDKEMW-9355: Add Support to run app widgets in different contexts wit…
gurpreet319 Nov 14, 2025
7e7e35d
Update src/JSRuntimeServer.cpp
vjain008 Dec 11, 2025
ff8f3e9
Update src/JSRuntimeClientContainer.cpp
vjain008 Dec 11, 2025
62116af
Update src/JSRuntimeServer.cpp
vjain008 Dec 11, 2025
3a565ca
Update src/JSRuntimeServer.cpp
vjain008 Dec 11, 2025
9513535
Merge pull request #90 from rdkcentral/topic/RDKEMW-9355
vjain008 Dec 11, 2025
de7bbf3
2.0 release changelog updates
vjain008 Dec 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 0 additions & 106 deletions .github/workflows/jsruntime_L1tests.yml

This file was deleted.

23 changes: 17 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [2.0](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.10...2.0)

- RDKEMW-9355: Add Support to run app widgets in different contexts wit… [`#90`](https://github.com/rdkcentral/rdkNativeScript/pull/90)
- RDKEMW-8844: Analyse and Improve L1 coverage [`#79`](https://github.com/rdkcentral/rdkNativeScript/pull/79)
- RDKEMW-9785: Increasing Test Coverage for L1 test [`#95`](https://github.com/rdkcentral/rdkNativeScript/pull/95)
- RDKEMW-11265: Migrate L1 and native build workflow to rdk-e [`#93`](https://github.com/rdkcentral/rdkNativeScript/pull/93)
- RDKEMW-9172: L2testcase for rdkNativeScript [`#91`](https://github.com/rdkcentral/rdkNativeScript/pull/91)
- RDKEMW-9461:Nativescript Minimal build for Coverity [`#84`](https://github.com/rdkcentral/rdkNativeScript/pull/84)
- RDKEMW-9355: Add Support to run app widgets in different contexts within a single process [`f2fbbe9`](https://github.com/rdkcentral/rdkNativeScript/commit/f2fbbe9eec146be3b91a8aa550dddb26ff43d2ff)
- RDKEMW-8844: Improve L1 coverage [`605e0ad`](https://github.com/rdkcentral/rdkNativeScript/commit/605e0ad2b4a9241aeceb5311ac4eaa53dd7b17fd)
- Update src/linux/KeyInput.cpp [`3e0f65c`](https://github.com/rdkcentral/rdkNativeScript/commit/3e0f65cf6a9d560b26e5a0ee6c26350d48046ded)

#### [1.0.10](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.9...1.0.10)

- RDKEMW-9765 : [BUG_FIX]UserAgent string need to be aligned with browser for diff… [`#77`](https://github.com/rdkcentral/rdkNativeScript/pull/77)
- RDKEMW-9765 : [BUG_FIX]UserAgent string need to be aligned with browser for different agents [`881b332`](https://github.com/rdkcentral/rdkNativeScript/commit/881b332528ae114f0a9c2f767c8a1436154d380c)
> 31 October 2025

- RDKEMW-9765 : UserAgent string need to be aligned with browser for diff… [`#77`](https://github.com/rdkcentral/rdkNativeScript/pull/77)
- RDKEMW-9765 : UserAgent string need to be aligned with browser for different agents [`881b332`](https://github.com/rdkcentral/rdkNativeScript/commit/881b332528ae114f0a9c2f767c8a1436154d380c)
- 1.0.10 release changelog updates [`6233823`](https://github.com/rdkcentral/rdkNativeScript/commit/62338232511edac45b4aa7c1a0c1622909c29098)
- Merge tag '1.0.9' into develop [`b60efc0`](https://github.com/rdkcentral/rdkNativeScript/commit/b60efc01bf49975196c7a55aa3e6736af753916b)

#### [1.0.9](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.8...1.0.9)
Expand All @@ -32,13 +47,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 30 September 2025

- DELIA-68967 : Switching between Xumo Fast Channels and Vipa activated… [`#68`](https://github.com/rdkcentral/rdkNativeScript/pull/68)
- RDKEMW-5610 : L1 test cases for jsruntime [`#66`](https://github.com/rdkcentral/rdkNativeScript/pull/66)
- Deploy fossid_integration_stateless_diffscan_target_repo action [`#67`](https://github.com/rdkcentral/rdkNativeScript/pull/67)
- Deploy cla action [`#40`](https://github.com/rdkcentral/rdkNativeScript/pull/40)
- Update CODEOWNERS [`#63`](https://github.com/rdkcentral/rdkNativeScript/pull/63)
- 1.0.7 release changelog updates [`0f3be4f`](https://github.com/rdkcentral/rdkNativeScript/commit/0f3be4fecad9213a4d86c828e978c29199e5d190)
- DELIA-68967 : Switching between Xumo Fast Channels and Vipa activated Channels [`228cf8b`](https://github.com/rdkcentral/rdkNativeScript/commit/228cf8bfdde6d7f7d991805193038b392bc0e89b)
- Merge tag '1.0.6' into develop [`afdf341`](https://github.com/rdkcentral/rdkNativeScript/commit/afdf341c4f81e7019d76f207c7b428dbd0ffc00d)

#### [1.0.6](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.5...1.0.6)
Expand Down Expand Up @@ -115,6 +128,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- RDKEMW-2469 : Merging latest changes of rdknativescript [`#4`](https://github.com/rdkcentral/rdkNativeScript/pull/4)
- RDKEMW-2469 : Merging latest changes of javascriptcore and rdknativescript for rdke build [`#3`](https://github.com/rdkcentral/rdkNativeScript/pull/3)
- Bring latest changes till 2024 [`#2`](https://github.com/rdkcentral/rdkNativeScript/pull/2)
- RDK-56154 Merging all rdknativescript latest changes to rdkcentral github from comcast rdke github [`2542b7c`](https://github.com/rdkcentral/rdkNativeScript/commit/2542b7cac0c0c0dd1aef7d8b158e5dd63b56347e)
- Import of Comcast source (develop) [`dfc9b89`](https://github.com/rdkcentral/rdkNativeScript/commit/dfc9b89df42fb0b844e04624b13808333afb19ce)
- RDK-56154: Merging all rdknativescript latest changes [`0d8189e`](https://github.com/rdkcentral/rdkNativeScript/commit/0d8189e76bdfa9f2cf619af300d95e5ec8f4def9)
48 changes: 46 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ option(BUILD_JSRUNTIME_APP "BUILD_JSRUNTIME_APP" ON)
option(ENABLE_JSRUNTIME_SERVER "ENABLE_JSRUNTIME_SERVER" OFF)
option(BUILD_JSRUNTIME_CLIENT "BUILD_JSRUNTIME_CLIENT" OFF)
option(NATIVEJS_DEVELOPER_MODE "NATIVEJS_DEVELOPER_MODE" OFF)
option(NATIVEJS_L2_BUILD "NATIVEJS_L2_BUILD" OFF)

#can be jsc or node or v8 or quickjs
option(JSRUNTIME_ENGINE_NAME "JSRUNTIME_ENGINE_NAME" "jsc")
Expand All @@ -39,6 +40,7 @@ option(ENABLE_JSRUNTIME_PLAYER "ENABLE_JSRUNTIME_PLAYER" OFF)
option(ENABLE_JSRUNTIME_THUNDER_SECURITYAGENT "ENABLE_JSRUNTIME_THUNDER_SECURITYAGENT" OFF)
option(BUILD_JSRUNTIME_DESKTOP "BUILD_JSRUNTIME_DESKTOP" ON)
option(USE_ETHANLOG "USE_ETHANLOG" OFF)
option(ENABLE_COVERAGE "ENABLE_COVERAGE" OFF)
option(PKG_CONFIG_SYSROOT_DIR "PKG_CONFIG_SYSROOT_DIR" "${CMAKE_CURRENT_SOURCE_DIR}/externals/extlibs")

if(JSRUNTIME_ENGINE_NAME STREQUAL "jsc")
Expand Down Expand Up @@ -101,15 +103,23 @@ if (ENABLE_JSRUNTIME_THUNDER_SECURITYAGENT)
add_definitions("-DENABLE_JSRUNTIME_THUNDER_SECURITYAGENT")
endif (ENABLE_JSRUNTIME_THUNDER_SECURITYAGENT)

if (NATIVEJS_DEVELOPER_MODE)
add_definitions("-DNATIVEJS_DEVELOPER_MODE")
endif (NATIVEJS_DEVELOPER_MODE)

if (NATIVEJS_L2_BUILD)
add_definitions("-DNATIVEJS_L2_BUILD")
endif (NATIVEJS_L2_BUILD)

include (${JSRUNTIME_SOURCE_DIRECTORY}/include.cmake)
set(JSRUNTIME_APP_FILES
${JSRUNTIME_COMMON_SOURCE_DIRECTORY}/jsruntime.cpp
)

if ( ENABLE_JSRUNTIME_SERVER )
add_definitions("-DENABLE_JSRUNTIME_SERVER")
add_definitions("-DWS_SERVER_PORT=9112")
set (JSRUNTIME_APP_FILES ${JSRUNTIME_APP_FILES}
add_definitions("-DWS_SERVER_PORT=5000")
set (JSRUNTIME_COMMON_FILES ${JSRUNTIME_COMMON_FILES}
${JSRUNTIME_COMMON_SOURCE_DIRECTORY}/JSRuntimeServer.cpp
)
endif ( ENABLE_JSRUNTIME_SERVER )
Expand All @@ -124,6 +134,15 @@ add_library(${JSRUNTIME_LIBRARY_NAME} SHARED
${JSRUNTIME_ENGINE_FILES}
)

#JSRUNTIMECLIENTCONTAINER CHANGES
option(BUILD_JSRUNTIME_CONTAINER "BUILD_JSRUNTIME_CONTAINER" ON)
set(JSRUNTIME_CONTAINER_FILES
${JSRUNTIME_COMMON_SOURCE_DIRECTORY}/JSRuntimeClientContainer.cpp
)
set(JSRUNTIME_FILES
${JSRUNTIME_COMMON_SOURCE_DIRECTORY}/JSRuntimeContainer.cpp
)

set(JSRUNTIME_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include/${JSRUNTIME_ENGINE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/include/linux ${CMAKE_CURRENT_SOURCE_DIR}/src/jsc/jsc_lib ${JSRUNTIME_ENGINE_INCLUDE_DIRECTORIES})

set(JSRUNTIME_LIBRARY_LINK_DIRECTORIES ${JSRUNTIME_ENGINE_LIBRARY_LINK_DIRECTORIES})
Expand Down Expand Up @@ -182,12 +201,37 @@ if (BUILD_JSRUNTIME_CLIENT)
target_link_libraries(jsruntime_client ${JSRUNTIME_LIBRARY_LINK_DIRECTORIES} ${JSRUNTIME_LINK_ETHANLIB} -lpthread)
endif (BUILD_JSRUNTIME_CLIENT)

set(JSRUNTIMECONTAINER_LIBRARY_NAME "JSRuntimeContainer")

if (BUILD_JSRUNTIME_CONTAINER)
add_library(${JSRUNTIMECONTAINER_LIBRARY_NAME} SHARED ${JSRUNTIME_FILES})
target_include_directories(${JSRUNTIMECONTAINER_LIBRARY_NAME} PRIVATE ${JSRUNTIME_INCLUDE_DIRECTORIES})
target_link_libraries(${JSRUNTIMECONTAINER_LIBRARY_NAME} ${JSRUNTIME_LIBRARY_LINK_DIRECTORIES} -lpthread)

add_executable(jsruntime_container ${JSRUNTIME_CONTAINER_FILES})
add_dependencies(jsruntime_container ${JSRUNTIMECONTAINER_LIBRARY_NAME})
target_include_directories(jsruntime_container PRIVATE ${JSRUNTIME_INCLUDE_DIRECTORIES})
set_target_properties(jsruntime_container PROPERTIES OUTPUT_NAME "JSRuntimeContainer")
target_link_libraries(jsruntime_container ${JSRUNTIME_LIBRARY_LINK_DIRECTORIES} -l${JSRUNTIMECONTAINER_LIBRARY_NAME} -lpthread)

endif (BUILD_JSRUNTIME_CONTAINER)

set(UWEBSOCKETS_TARGET "Linux")
if (APPLE)
set(UWEBSOCKETS_TARGET "Darwin")
endif (APPLE)

add_definitions("-std=c++17 -DUSE_LIBUV")

# Coverage support
if (ENABLE_COVERAGE)
message("Enabling code coverage support")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
endif (ENABLE_COVERAGE)

set_target_properties(${JSRUNTIME_LIBRARY_NAME} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED YES)
Expand Down
2 changes: 1 addition & 1 deletion include/EssosInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class EssosInstance
void onKeyRelease(struct JavaScriptKeyDetails& details);
void update();
void registerKeyListener(JavaScriptKeyListener*);

private:
EssosInstance();
static EssosInstance* mInstance;
Expand Down
11 changes: 11 additions & 0 deletions include/JSRuntimeClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,23 @@ class JSRuntimeClient : public CommandInterface<JSRuntimeClient>

std::string getState();

#ifdef UNIT_TEST_BUILD
protected:
void onMessage(websocketpp::connection_hdl hdl, message_ptr msg);
void setState(const std::string &state);
void onOpen(websocketpp::connection_hdl hdl);
void onFail(websocketpp::connection_hdl hdl);
void onClose(websocketpp::connection_hdl hdl);
#endif

#ifndef UNIT_TEST_BUILD
private:
void onMessage(websocketpp::connection_hdl hdl, message_ptr msg);
void setState(const std::string &state);
void onOpen(websocketpp::connection_hdl hdl);
void onFail(websocketpp::connection_hdl hdl);
void onClose(websocketpp::connection_hdl hdl);
#endif

private:
JSRuntimeClient();
Expand Down
43 changes: 43 additions & 0 deletions include/JSRuntimeContainer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#ifndef JSRUNTIMECONTAINER_H
#define JSRUNTIMECONTAINER_H

#include <string>
#include <functional>
#include <map>

class JSRuntimeContainer
{
public:
enum Namespace {
NetworkNamespace = 0x01,
MountNamespace = 0x02,
IpcNamespace = 0x04,
PidNamespace = 0x08,
UserNamespace = 0x10,
UtsNamespace = 0x20
};

// Get container IP address
static std::string getContainerIpAddress(const std::string& containerId);

// Check if container exists
static bool isContainer(const std::string& containerId);

// Execute function in container namespace
static bool nsEnter(const std::string& containerId, Namespace type, const std::function<void()>& func);

// WebSocket client functions
static bool connectAndSend(const std::string& ip, const std::string& message);
static std::string buildLaunchMessage(const std::string& url, const std::string& options);
static std::string parseAppConfig(const std::string& configPath);

private:
// Internal implementation functions
static bool nsEnterImpl(const std::string& containerId, Namespace type, const std::function<void()>& func);
static pid_t findContainerPid(const std::string& containerId);
static bool nsEnterWithPid(pid_t pid, int nsType, const std::function<void()>& func);
static void nsThread(int newNsFd, int nsType, bool* success, const std::function<void()>& func);
};

#endif // JSRUNTIMECONTAINER_H

19 changes: 18 additions & 1 deletion include/JSRuntimeServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#pragma once
#include <NativeJSRenderer.h>
#include <IExternalApplicationHandler.h>

#ifdef USE_WEBSOCKET_MOCK
#include "websocketpp.hpp"
Expand All @@ -40,15 +41,30 @@ class JSRuntimeServer
static JSRuntimeServer *getInstance();
~JSRuntimeServer() = default;

void initialize(int serverport, std::shared_ptr<JsRuntime::NativeJSRenderer> renderer);
void initialize(int serverport, std::shared_ptr<JsRuntime::NativeJSRenderer> renderer, std::shared_ptr<IExternalApplicationHandler> externalHandler = nullptr);
bool start();
bool stop();

private:
#ifdef UNIT_TEST_BUILD
public:
// Expose private methods for testing
void send(websocketpp::connection_hdl hdl, const std::string &msg);
void onMessage(websocketpp::connection_hdl hdl, message_ptr msg);
void onOpen(websocketpp::connection_hdl hdl);
void onClose(websocketpp::connection_hdl hdl);

const std::set<websocketpp::connection_hdl, std::owner_less<websocketpp::connection_hdl>>& getConnections() const { return mConnections; }
WsServer& getServer() { return mServer; }
#endif

#ifndef UNIT_TEST_BUILD
private:
void send(websocketpp::connection_hdl hdl, const std::string &msg);
void onMessage(websocketpp::connection_hdl hdl, message_ptr msg);
void onOpen(websocketpp::connection_hdl hdl);
void onClose(websocketpp::connection_hdl hdl);
#endif

private:
typedef std::set<websocketpp::connection_hdl, std::owner_less<websocketpp::connection_hdl>> ConnectionSet;
Expand All @@ -62,4 +78,5 @@ class JSRuntimeServer
ConnectionSet mConnections;
int mServerPort;
std::shared_ptr<JsRuntime::NativeJSRenderer> mRenderer;
std::shared_ptr<IExternalApplicationHandler> mExternalHandler;
};
Loading
Loading