• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    Rust
  • Created about 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An idiomatic Rust wrapper for the V8 Javascript engine

v8-rs Build Status Crates.io codecov Language (Rust)

Note: This library is not actively maintained. I (dflemstr) have attempted keeping it up to date with the latest mainline V8 versions, but the maintenance burden is too high. The path forward would be to more directly map the C++ API of V8 via bindgen and go forward from there to try to automate more of the API surface mapping, but several attempts at doing so by me have failed. Pull requests welcome!

This is a wrapper around the V8 Javascript engine, used for example in the Google Chrome browser or Node.js.

Documentation

Building

It is quite complicated to build V8. This library has been tested against V8 5.4.x with GCC 6.x, but later versions might work.

Static / Shared

By default, this library links V8 statically. There is a feature called shared that builds it by linking to libv8.so (and related libraries like libicu-i10n.so) instead. There's usually little reason to link dynamically since the V8 ABI changes fairly frequently.

Ubuntu / Travis CI

The easiest way to build this library on Ubuntu or Travis CI is to use a pre-packaged version of V8. You need both sudo and Ubuntu Trusty or later to install a compatible one:

sudo: true
dist: trusty
language: rust

addons:
  apt:
    sources:
      - sourceline: 'ppa:pinepain/libv8-5.4'
      - ubuntu-toolchain-r-test
    packages:
      # Modern compilers
      - gcc-6
      - g++-6
      # The V8 version that we want to bind
      - libv8-5.4-dev
      - libicu-dev

env:
  global:
    - CC=gcc-6
    - CXX=g++-6

Build tree

You can build a build tree using any supported build method that uses any combination of depot_tools, make, gyp, ninja and/or gn, but gn hasn't been tested that extensively.

You should set v8_use_snapshot=false, loading snapshots is currently not supported.

You should also not disable i10n support; this library assumes libicu was built at the same time as V8 or is compatible with V8.

You should build using shared_library if you want to build with the shared feature.

Simply set the environment variable V8_SOURCE to the root of the v8 checkout, and V8_BUILD to the build output in the tree (for example $V8_SOURCE/out/Release) and the build Should Work®. If not, please figure out how to fix it and send a PR, it'll be impossible for me to test all of the V8 build configurations :)

More Repositories

1

rq

Record Query - A tool for doing record analysis and transformation
Rust
2,226
star
2

rust-native-wasm-loader

JavaScript
163
star
3

serde-protobuf

Rust
69
star
4

tin

A statically structurally typed JIT-compiled programming language, mainly for embedding in other programs.
Rust
63
star
5

type-info

Rust
23
star
6

mux

Like tmux but without the t
Rust
22
star
7

femtopb

Rust
15
star
8

wifi-nina

Rust
15
star
9

realize

Rust
12
star
10

uc8159

Driver crate for rust for the uc8159 e-ink display chip, found in the Pimoroni Inky Impression
Rust
9
star
11

direct-executor

Rust
9
star
12

embedded-platform

Rust
7
star
13

prost-simple-rpc

Rust
6
star
14

semantic-editor.old2

Rust
5
star
15

sparkey-rs

High-level bindings to Sparkey, a simple constant key/value storage library, for read-heavy systems with infrequent large bulk inserts.
C
5
star
16

emui

An embedded user interface toolkit for Rust
Rust
3
star
17

duk

A high-level wrapper around the Duktape Javascript/EcmaScript interpreter.
C
3
star
18

ads1x15

Rust
2
star
19

marble-legacy

Java
2
star
20

drone-dind

A Docker image for Drone CI that starts an isolated Docker daemon
Shell
2
star
21

box

A web application for managing PND files
JavaScript
2
star
22

vcdiff-rs

High-level bindings to open-vcdiff, a codec for the VCDIFF binary delta format.
C++
2
star
23

lumine

A Minecraft server mod that focuses on user- and developer-friendliness (DONT fork me yet!)
Java
2
star
24

auracube

Rust
2
star
25

emacs-config

Emacs Lisp
1
star
26

shipit

Rust
1
star
27

pndmanager

A web application for managing PND packages
Scala
1
star
28

mcubed

Haskell
1
star
29

Bukkit

Java
1
star
30

homebrew-tools

Ruby
1
star
31

seven-segment-display

Rust
1
star
32

socialgraph

Haskell
1
star
33

mimxrt1062

Rust
1
star
34

playbook

An ansible playbook for setting up an Arch Linux system
Shell
1
star
35

inky-dashboard

A tool for rendering web pages (e.g. Home Assistant dashboards) to E-Ink® displays supported by the python "inky" library
Python
1
star
36

QuantumDrive

An innovative open source RTS.
Java
1
star
37

esp-at-rs

Rust
1
star
38

rust-buildenv

A repository for automatically building Docker images for use with cross.
Rust
1
star
39

cargo-feature-aspect

A Cargo plugin that creates and updates aspect features across a Cargo workspace
Rust
1
star