Skip to content

letoche/codius-nacl-node

 
 

Repository files navigation

Native Client port of V8 to run JavaScript Codius contracts

To run test:

Prerequisites:

export NACL_SDK_ROOT=<your-path>/nacl_sdk/pepper_<version>

Run the test:

node test.js

To run plain without outside JS:

$NACL_SDK_ROOT/tools/sel_ldr_x86_32 -h 3:3 -a -- $NACL_SDK_ROOT/toolchain/linux_x86_glibc/x86_64-nacl/lib32/runnable-ld.so --library-path .:deps/v8/out/nacl_ia32.release/lib.target:$NACL_SDK_ROOT/ports/lib/glibc_x86_32/Release:$NACL_SDK_ROOT/toolchain/linux_x86_glibc/x86_64-nacl/lib32 ./codius_node.nexe

To build NaCl-sandboxed Node.js-lite

Prerequisites:

cd deps/v8
make dependencies
make library=shared nacl_ia32.debug
make library=shared nacl_ia32.release

Build NaCl module with V8:

source ./codius-nacl-configure $NACL_SDK_ROOT
make nacl

This will create a nexe called codius_node.nexe.

To build unsandboxed Node.js-lite

Prerequisites:

  • Linux
  • Build essentials
  • zlib (32-bit version, e.g. lib32z1-dev)
  • libseccomp-dev:i386
  • stream-parser

Build Node.js-lite executable that uses seccomp instead of Native Client:

source ./codius-configure
make

This will create an executable called codius_node.

About

Node.js fork ported to Native Client for Codius

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.9%
  • C++ 16.9%
  • C 7.9%
  • Python 0.9%
  • Makefile 0.3%
  • Objective-C 0.1%