justjs

Crates.iojustjs
lib.rsjustjs
version0.5.2
sourcesrc
created_at2022-12-06 02:46:55.450128
updated_at2023-01-19 02:30:36.473644
descriptionA modern runtime for javascript.
homepagehttps://justjs.dev
repositoryhttps://github.com/exact-rs/just
max_upload_size
id730811
size227,971
Mack (theMackabu)

documentation

README

Just

crates.io

just circle logo

Just is a simple, and modern runtime for JavaScript that uses V8 and is built in Rust.

Features

  • Use your preferred import style. Local, web, package.
  • Secure by default. No file, network, or environment access, unless explicitly enabled.
  • Useful and extensive built-in utilities.
  • Includes a set of standard modules for Just.

Install

Shell (Mac, Linux):

curl -fsSL https://justjs.dev/install.sh | sh

PowerShell (Windows):

irm https://justjs.dev/install.ps1 | iex

Homebrew (Mac):

brew install justjs

Chocolatey (Windows):

choco install justjs

Scoop (Windows):

scoop install justjs

Build and install from source using Cargo:

cargo install justjs --locked

Getting Started

Try running a simple program:

just run https://r.justjs.dev/std/examples/welcome.js

Or a more complex one:

import { cmd } from 'just/sys';
import { random } from 'just/crypto';
import { Database } from 'just/db:sqlite';

const db = new Database('db_name');

db.create('versions', 'id text primary key, version text');
await cmd.spawn('just -v').then((output) => {
	db.insert('versions', { id: random.secure(), version: output });
});

console.json(db.query('versions', "where version = '%s'".format(cmd.exec('just -v'))), true);
db.delete('versions', '');

Just package registry can be located here (api).

You can find a deeper introduction, examples, and environment setup guides in the docs.

The complete API reference is available at the runtime documentation.

Commit count: 176

cargo fmt