Skip to content

Latest commit

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MafiaNode

Pre-built libnode (Node.js as a shared library) and standalone V8 distributions for embedding JavaScript in C++ projects.

Part of the MafiaHub ecosystem.

Downloads

Pre-built binaries are available on the Releases page.

libnode

Embeddable Node.js runtime with full npm and ICU support.

PlatformArchitectureDownload
Windowsx64libnode-v{version}-win-x64.zip
Windowsx86libnode-v{version}-win-x86.zip(Node.js <= 24 only)
macOSarm64libnode-v{version}-darwin-arm64.tar.gz
Linuxx64libnode-v{version}-linux-x64.tar.gz

Standalone V8

Lightweight V8 engine as a monolithic static library for projects needing only JavaScript execution without Node.js APIs.

PlatformArchitectureDownload
Windowsx64v8-v{version}-win-x64.zip
Windowsx86v8-v{version}-win-x86.zip
macOSarm64v8-v{version}-darwin-arm64.tar.gz
Linuxx64v8-v{version}-linux-x64.tar.gz

Contents

libnode Archive

lib/
├── libnode.dll/.dylib/.so # Node.js shared library
├── libnode.lib # Import library (Windows)
├── libuv.lib/.a # libuv async I/O
├── v8_libbase.lib/.a # V8 base library
├── v8_libplatform.lib/.a # V8 platform library
└── abseil.lib/.a # Abseil (V8 dependency)
include/
├── node/ # Node.js headers
└── v8/ # V8 headers
bin/
└── node(.exe) # Node.js executable

V8 Archive

lib/
└── libv8_monolith.a/.lib # V8 static library
include/
└── v8/ # V8 headers

Usage

CMake Integration

# Find libnodefind_library(LIBNODE_LIBRARYNAMESlibnodenodePATHS${LIBNODE_DIR}/lib)
target_include_directories(your_targetPRIVATE${LIBNODE_DIR}/include/node)
target_link_libraries(your_target${LIBNODE_LIBRARY})

Basic Embedding Example

#include<node.h>
#include<uv.h>intmain(int argc, char* argv[]) {
// Initialize Node.js
std::vector<std::string> args(argv, argv + argc);
std::unique_ptr<node::MultiIsolatePlatform> platform =
node::MultiIsolatePlatform::Create(4);
v8::V8::InitializePlatform(platform.get());
v8::V8::Initialize();
// Create and run Node.js environment// See Node.js embedding documentation for complete examplesreturn0;
}

For detailed embedding documentation, see the Node.js Embedding Guide.

Building

Builds are automated via GitHub Actions. The workflow:

  1. Resolves the latest Node.js LTS version (v22.x)
  2. Builds libnode with --shared --with-intl=full-icu
  3. Builds standalone V8 as a monolithic static library
  4. Publishes releases with all platform artifacts

Manual Trigger

Builds can be triggered manually via GitHub Actions with an optional version override.

Version Policy

  • Node.js: Latest LTS release (currently v22.x)
  • V8: Version bundled with the corresponding Node.js release
  • Releases: Created automatically when pushing to main, skipped if the version already exists

Related Projects

License

The build infrastructure in this repository is provided as-is for the MafiaHub project.

Pre-built binaries include components under their respective licenses:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors