The JavaScript runtime that aims for productivity and ease

Overview

Byte

Byte is a easy and productive runtime for Javascript . It makes making complex programs simple and easy-to-scale with its large and fast Rust API

Aim

The aim for Byte is that modern javascript runtimes are not easy to learn and usually there is a learning curve of about a month to gain knowledge and get comfortable in the software. With Byte, this learning curve is reduced to about a day. With lightning fast IO , Byte will attract users rapidly.

Install

To install, paste the following command inside of your terminal:

curl -fsSL https://raw.githubusercontent.com/byte-js/byte/master/install.sh | sh

Packaging (.deb)

We use cargo-deb to make .deb packages. Read their documentation to build a package locally.

Features

Speed

Byte was implemented on top of Google's V8 Javascript Engine and Rust which is a lethal combination . Byte can perform IO and can perform Command Line Tasks abnormally quickly.

CLIs

Another reason for making Byte was that making CLI's had become very complex in the past and it had to be made simpler. Byte does just that . With in-built function to take input, abort with an error code and getting command-line-arguements it is very easy to make software for the terminal with Byte.

Tasks

As you might have guessed, Byte still needs a lot of stuff and it is not at all ready for production status. That being said, we want more developers to contribute to the development of Byte by creating issues, making pull requests and reveiwing code

For all the tasks that are pending, please check the TODO.md file and if you have completed one of the tasks, please delete that task fro the file so that other people dont have to implement them again.

Documentation

Functions

log()

The log function is used to print text onto the terminal screen , just like the console.log() function

log(text : any)

Example

log("Hello World");
$ cargo run index.js
Hello World
$

input()

The input function takes an input from the terminal . It required one parameter which is the question or the text that has to be displayed onto the screen.

input(ques : any)

let res = input("What is your name ? ");
log(`Your name is ${res}`);
$ cargo run index.js
What is your name ? Japroz
Your name is Japroz
$

exec()

The exec function takes in a command which has to executed in the terminal. The command is not executed in a specific shell, but the shell in which the software is being run. The output of the command is printed to the terminal or an error is printed if the comman could not be executed

exec(command : string)

exec("ls");
$ cargo run index.js
src/
target/
.cargo/
test/
Cargo.toml
Cargo.lock
$

args()

The args returns the command line arguements passed to the program args()

const argv = args();
log(argv);
$ cargo run index.js hello world
[
  '<path_to_index.js>',
  'hello',
  'world'
]
$

'abort()

The process can b stopped with the help of the abort() which can take an optional argument message which is displayed just before the process is aborted

abort(message : any)

log("This is the log function");
const res = input("Is HTML a programming language : ");
if (res == "y") {
  abort("You are upto no good!");
}
log(`Correct. Your answer was : ${res}`);
$ cargo run index.js
Is HTML a programming language : y
You are upto no good!
$

Usage

To build the project , make sure that you have the following installed :

rustup
rustc
cargo

Steps

Firstly, clone the project with the following command

git clone https://github.com/byte-js/byte.git

Then, you will have to change the dircetory of your terminal with the following command

cd byte

Then, to run the project, run

cargo run test/js/index.js

The first time you build the project will take some time because it has to install and build Google's v8 but after that it will run quickly

After that, run the following command with the path to any javascript file that you would like to run:

cargo run <filename>

If you dont have any file, then you can run a file from the test folder with the following command:

cargo run test/js/index.js

Building

Linux/MacOS/Unix

To build the project, run the following commands inside of the terminal:

cargo build --release

This is going to build it for Linux operating systems. The binary will be located in the target/release' folder with the name byte'

Windows

IMPORTANT NOTE

Currently, rusty_v8 does not compiler with rust for Windows, but we will be rolling out the binaries for Windows very soon. You can wait till then, or you can continue with the steps given below and it just might work on your Windows machine.

If you are on windows, make sure you have mingw-w64 installed on your system. After that is installed, run the following commands inside of your terminal inside the project directory:

rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu

After that, the build will be complete. The binary will be located in the target/release' folder with the name byte'

Developer Help

Byte is still in its early stages and we want all the help that we can get. We encourage developers to create PR's and join the organisation so that the software can be improved and made better

You might also like...
swc is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript.
swc is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript.

Make the web (development) faster. SWC (stands for Speedy Web Compiler) is a super-fast TypeScript / JavaScript compiler written in Rust. It's a libra

Guarding 是一个用于 Java、JavaScript、Rust、Golang 等语言的架构守护工具。借助于易于理解的 DSL,来编写守护规则。Guarding is a guardians for code, architecture, layered.

Guarding Guarding is a guardians for code, architecture, layered. Using git hooks and DSL for design guard rules. Usage install cargo install guarding

Javascript wrapper bindings for diamond types

Diamond JS wrapper library This is a javascript / WASM wrapper around diamond types. This code is currently experimental WIP. Do not trust this for an

Node.js bindings to the ripgrep library, for fast file searching in JavaScript without child processes!

ripgrepjs ripgrepjs: Node.js bindings to the ripgrep library, for direct integration with JS programs without spawning an extra subprocess! This proje

The Hassle-Free JavaScript Tool Manager
The Hassle-Free JavaScript Tool Manager

The Hassle-Free JavaScript Tool Manager Fast: Install and run any JS tool quickly and seamlessly! Volta is built in Rust and ships as a snappy static

Low level tooling for WebAssembly in JavaScript using wasm-tools

js-wasm-tools js-wasm-tools compiles some of the API of wasm-tools to JavaScript and WebAssembly via wasm-bindgen. This offers low level tooling for W

Rust bindings for Supabase JavaScript library via WebAssembly.

supabase-js-rs Rust bindings for Supabase JavaScript library via WebAssembly. Usage Add supabase-js-rs to Cargo.toml supabase-js-rs = { version = "0.1

Objective-C Runtime bindings and wrapper for Rust.

Objective-C Runtime bindings and wrapper for Rust. Documentation: http://ssheldon.github.io/rust-objc/objc/ Crate: https://crates.io/crates/objc Messa

Minimal framework to inject the .NET Runtime into a process in Rust

錆の核 sabinokaku Minimal framework to inject the .NET Runtime into a process. Supports Windows and Linux. macOS support is complicated due to SIP, and w

Releases(0.0.2)
Owner
Byte
Byte
Byte
A JavaScript Runtime built with Mozilla's SpiderMonkey Engine and Rust

Spiderfire Spiderfire is a javascript runtime built with Mozilla's SpiderMonkey engine and Rust. Spiderfire aims to disrupt the server-side javascript

Redfire 122 Dec 15, 2022
Diamond is a minimalistic, powerful, and modern Javascript runtime that uses Deno_Core.

Diamond Diamond is a minimalistic, powerful, and modern Javascript runtime that uses Deno_Core. Installation Diamond is currently in beta(not even Alp

Catermelon 4 Aug 30, 2021
Modern JavaScript runtime for Sony PSP, based on rust-psp and QuickJS.

PSP.js Modern JavaScript runtime for Sony PSP, based on rust-psp and QuickJS. ⚠️ Currently in PoC state, unusable for developing JavaScript apps yet.

Yifeng Wang 15 Nov 28, 2022
Livny is a modern JavaScript and TypeScript runtime built on top of Rust

Livny is a modern JavaScript and TypeScript runtime built on top of Rust, Golang and the GraalVM Polyglot infrastructure that can run all of Deno and Node.jS applications. It is fine-tuned for user satisfaction, performance and security.

LivnyJS 1 Mar 2, 2022
A Lean Secure Runtime for JavaScript

Tera tera is a lean secure capability-based runtime for JavaScript. It is primarily designed for multi-tenant serverless environment but has uses in o

Gigamono 7 Oct 7, 2022
Spine runtime for Rust (and wasm!) transpiled from the official C Runtime.

rusty_spine Spine runtime for Rust (and wasm!) transpiled from the official C Runtime. Supports Spine 4.1. [dependencies] rusty_spine = "0.4.0" Onlin

jabu 12 Dec 17, 2022
Call Swift functions from Rust with ease!

swift-rs Call Swift functions from Rust with ease! Setup After adding swift-rs to your project's Cargo.toml, some setup work must be done. Ensure your

null 68 Dec 26, 2022
Create, open, manage your Python projects with ease, a project aimed to make python development experience a little better

Create, open, manage your Python projects with ease, a project aimed to make python development experience a little better

Dhravya Shah 7 Nov 18, 2022
Facilitating high-level interactions between Wasm modules and JavaScript

wasm-bindgen Facilitating high-level interactions between Wasm modules and JavaScript. Guide | API Docs | Contributing | Chat Built with ?? ?? by The

Rust and WebAssembly 5.9k Jan 8, 2023
A simple programming language made for scripting inspired on rust and javascript.

FnXY Programming Language Quick move: CONTRIBUTING | LICENSE What? FnXY is a simple programming language made for scripting inspired on rust and javas

null 2 Nov 27, 2021