• Stars
    star
    150
  • Rank 247,323 (Top 5 %)
  • Language
    Rust
  • Created over 9 years ago
  • Updated about 2 years ago

Reviews

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

Repository Details

Run your JavaScript apps backed by Rust

Rust.js

Run your JavaScript apps backed by Rust.

Build

Prerequisites:

  • Rust 1.10.0+
  • Python 2.6 or 2.7
  • GNU Make 3.81 or newer
$ ./configure
$ make

Usage

rustjs 0.1.0
Yorkie Liu <[email protected]>
The platform lets you can work with Rust, C, C++ and JavaScript compatible with NPM and Cargo

USAGE:
  rustjs <INPUT> [FLAGS]

FLAGS:
    -h, --help       Prints help information
    -v, --version    Prints version information

POSITIONAL ARGUMENTS:
    INPUT      main script file

API References

  • assert This module is used for writing unit tests for your applications.
    • assert.equal()
    • assert.notEqual()
  • console Console object.
    • console.log()
    • console.info()
    • console.warn()
    • console.error()
  • crypto OpenSSL bindings.
    • crypto.version The text variant of the version number and the release date.
    • crypto.number OPENSSL_VERSION_NUMBER is a numeric release version identifier.
    • crypto.platform The "Configure" target of the library build in the form "platform: ..." if available or "platform: information not available" otherwise.
    • crypto.dir The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "..."" if available or "OPENSSLDIR: N/A" otherwise.
  • events Many objects in rust.js emit events.
    • events.EventEmitter
      • .on(name, listener)
      • .once(name, listener)
      • .removeAllEventListeners() remove all registered listeners on this emitter.
  • fs File I/O is provided by simple wrappers around standard POSIX functions.
    • fs.rename() rename the file.
    • fs.rmdir() remove the dir.
    • fs.mkdir() create the dir.
    • fs.stat() get the stat of the given pathname.
    • fs.readdir() read the directory.
    • fs.readFile() read the file of the given pathname.
    • fs.writeFile() write the file of the given pathname and bytes/string.
  • os Provides a few basic operating-system related utility functions.
    • fs.tmpdir()
    • fs.homedir()
    • fs.endianness()
    • fs.type()
    • fs.platform()
    • fs.arch()
  • path This module contains utilities for handling and transforming file paths.
    • path.normalize() normalize the path string.
    • path.isAbsolute() return if a path is in absolute.
    • path.dirname() return the directory name of the path.
    • path.basename() return the basename of the path.
    • path.extname() return the ext name.
  • url The URL parser/formatter based on servo/rust-url.
    • url.parse(): parse a url string.
    • url.format(): generate a string by url options.
  • util These functions are in the module 'util'.
    • util.isArray()
    • util.isFunction()
    • util.isBoolean()
    • util.isNull()
    • util.isNullOrUndefined()
    • util.isNumber()
    • util.isString()
    • util.isUndefined()
    • util.isRegExp()
    • util.isObject()
    • util.isDate()
    • util.isError()
    • util.isPrimitive()
    • util.inherits()

Development

Clone the repository

$ git clone [email protected]:yorkie/rust.js.git

Pull submodules

$ git submodule update --init --recursive

Build dependencies

$ ./configure && make

License

MIT

More Repositories

1

react-native-wechat

🚀 WeChat login, share, favorite and payment for React-Native on iOS and Android platforms (QQ: 336021910)
Objective-C
2,912
star
2

tensorflow-nodejs

TensorFlow Node.js provides idiomatic JavaScript language bindings and a high layer API for Node.js users. TensorFlow Node.js provides idiomatic JavaScript language bindings and a high layer API for Node.js users.
JavaScript
578
star
3

me

CV at Github and Notes based on Issues
70
star
4

lv

compile your JavaScript to native code in pure JavaScript
Roff
19
star
5

serve

a tiny server for serving static files and website, no any other runtime required based on mongoose.
C
18
star
6

node-orgmode

The orgmode implementation for Node.js which contains a search engine and a parser written in Parser Combinator
JavaScript
16
star
7

ios-tbb

Thread Building Block for iOS and iOS Simulator
C++
8
star
8

yorkie.github.io

yorkie site
HTML
8
star
9

uv-mongo

async mongo library based on libuv and clibs
C
8
star
10

rust-imap

an imap implementation for rust
Rust
7
star
11

express-model

deprecated project
JavaScript
5
star
12

node-ifconfig-parser

ifconfig text parser
JavaScript
5
star
13

ikanbao.fm

电子报在线阅读第三方平台 based on Express.js
JavaScript
5
star
14

watjs

Write WebAssembly Text Format Files(.wat) in JavaScript
JavaScript
4
star
15

node-ifconfig

ifconfig port for nodejs
JavaScript
3
star
16

stream-slice

slice stream like buffer/string
JavaScript
3
star
17

node-loaderio

loader.io api wrapper for nodejs
JavaScript
3
star
18

node-naoqi

Connects NAOqi robots in Node.js
JavaScript
3
star
19

node-sexp

Creates symboltic-expression builder in JavaScript.
JavaScript
3
star
20

node-gitlog-parser

parse git log stream(Readable)
JavaScript
3
star
21

node-httpmocker

configurable HTTP/s stubbed-tool for nodejs
JavaScript
2
star
22

browser-cli

A html render in your shell
JavaScript
2
star
23

node-bypass

config your bypass of proxy by using `networksetup` tool
JavaScript
2
star
24

node-x509-builder

x509 certificate builder from buffer(tls)
JavaScript
2
star
25

name-your-function

Just rename your anonymous function in ES6.
JavaScript
2
star
26

rsync-ignore

It helps rsync to parse a `.rsyncignore` file for a project like other `.gitignore` and `.npmignore`.
JavaScript
2
star
27

nasm-example

just a example for learning nasm
Assembly
2
star
28

ADBHttpRequest

A XMLHttpRequest re-implementation that based on the ADB transfer
1
star
29

node-get-signal

cross-platform system signal tool for nodejs
JavaScript
1
star
30

JTLS

TLS implementation in pure javascript
JavaScript
1
star
31

node-tls-header

Generating TLS Header in pure javascript.
JavaScript
1
star
32

node-buffer24

node buffer extension: support 24bit operators
JavaScript
1
star
33

node-mongoose-connectionstate

a little gateway to mongoose state
JavaScript
1
star
34

node-mongo-url

mongo url generator for nodejs
JavaScript
1
star
35

process-once.node

The `pthread_once(3)` binding to the Node.js community.
C++
1
star
36

node-rainbow-console

colorize your console for NodeJS
JavaScript
1
star
37

nginx-lang-redirect.lua

The Lua Script for supporting language redirections working with proxy_pass for Nginx/OpenResty
Lua
1
star
38

chrome.sh

Chrome Shortcut for opening url with your Terminal
Shell
1
star
39

FlashDB

A database system for providing a local, fast, convenient accessor, which can query, extend and remove. And it's support Multi-keys.
1
star
40

esprima-to-value

convert an esprima ast object/literal to an real object
JavaScript
1
star
41

node-comongo

mongo coroutinue library for nodejs
JavaScript
1
star
42

node-hash-array

hashify array and get element by its key
JavaScript
1
star
43

node-ext2type

convert extension of the path to the http Content-Type format, like application/xml, application/json.
JavaScript
1
star