Run your JavaScript apps backed by Rust.
Prerequisites:
- Rust 1.10.0+
- Python 2.6 or 2.7
- GNU Make 3.81 or newer
$ ./configure
$ make
rustjs 0.1.0
Yorkie Liu <yorkiefixer@gmail.com>
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
assertThis module is used for writing unit tests for your applications.assert.equal()assert.notEqual()
consoleConsole object.console.log()console.info()console.warn()console.error()
cryptoOpenSSL bindings.crypto.versionThe text variant of the version number and the release date.crypto.numberOPENSSL_VERSION_NUMBER is a numeric release version identifier.crypto.platformThe "Configure" target of the library build in the form "platform: ..." if available or "platform: information not available" otherwise.crypto.dirThe "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "..."" if available or "OPENSSLDIR: N/A" otherwise.
eventsMany objects in rust.js emit events.events.EventEmitter.on(name, listener).once(name, listener).removeAllEventListeners()remove all registered listeners on this emitter.
fsFile 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.
osProvides a few basic operating-system related utility functions.fs.tmpdir()fs.homedir()fs.endianness()fs.type()fs.platform()fs.arch()
pathThis 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.
urlThe URL parser/formatter based on servo/rust-url.url.parse(): parse a url string.url.format(): generate a string by url options.
utilThese 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()
Clone the repository
$ git clone git@github.com:yorkie/rust.js.gitPull submodules
$ git submodule update --init --recursiveBuild dependencies
$ ./configure && makeMIT