Crates.io | boa_cli |
lib.rs | boa_cli |
version | |
source | src |
created_at | 2022-09-25 16:35:25.083183 |
updated_at | 2024-12-05 18:07:54.430659 |
description | Boa is a Javascript lexer, parser and compiler written in Rust. Currently, it has support for some of the language. |
homepage | |
repository | https://github.com/boa-dev/boa |
max_upload_size | |
id | 673715 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Boa CLI is Boa
's REPL implementation to execute JavaScript
directly from
your CLI.
boa_cli
can be installed directly via Cargo
.
cargo install boa_cli
Once installed, your good to go!
To execute some JavaScript source code, navigate to the directy of your choosing and type:
boa test.js
Or if you'd like to use Boa's REPL, simply type:
boa
Usage: boa [OPTIONS] [FILE]...
Arguments:
[FILE]... The JavaScript file(s) to be evaluated
Options:
--strict Run in strict mode
-a, --dump-ast [<FORMAT>] Dump the AST to stdout with the given format [possible values: debug, json, json-pretty]
-t, --trace Dump the AST to stdout with the given format
--vi Use vi mode in the REPL
-O, --optimize
--optimizer-statistics
--flowgraph [<FORMAT>] Generate instruction flowgraph. Default is Graphviz [possible values: graphviz, mermaid]
--flowgraph-direction <FORMAT> Specifies the direction of the flowgraph. Default is top-top-bottom [possible values: top-to-bottom, bottom-to-top, left-to-right, right-to-left]
--debug-object Inject debugging object `$boa`
-m, --module Treats the input files as modules
-r, --root <ROOT> Root path from where the module resolver will try to load the modules [default: .]
-h, --help Print help (see more with '--help')
-V, --version Print version
Boa's CLI currently has a variety of features (as listed in Options
).
Features include:
Console
is currently implemented)$boa
debug object with various functionality (see documentation).Have an idea for a feature? Feel free to submit an issue and/or contribute!