Rust编写的JavaScript引擎,该项目是一个试验性质的项目。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
961 B

[package]
name = "boa_cli"
version = "0.14.0"
edition = "2021"
rust-version = "1.58"
authors = ["boa-dev"]
description = "Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language."
repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "compiler", "lexer", "parser", "js", "cli"]
categories = ["command-line-utilities"]
license = "Unlicense/MIT"
default-run = "boa"
[dependencies]
boa_engine = { path = "../boa_engine", features = ["deser", "console"], version = "0.14.0" }
boa_interner = { path = "../boa_interner", version = "0.14.0" }
Lexer string interning (#1758) This Pull Request is part of #279. It adds a string interner to Boa, which allows many types to not contain heap-allocated strings, and just contain a `NonZeroUsize` instead. This can move types to the stack (hopefully I'll be able to move `Token`, for example, maybe some `Node` types too. Note that the internet is for now only available in the lexer. Next steps (in this PR or future ones) would include also using interning in the parser, and finally in execution. The idea is that strings should be represented with a `Sym` until they are displayed. Talking about display. I have changed the `ParseError` type in order to not contain anything that could contain a `Sym` (basically tokens), which might be a bit faster, but what is important is that we don't depend on the interner when displaying errors. The issue I have now is in order to display tokens. This requires the interner if we want to know identifiers, for example. The issue here is that Rust doesn't allow using a `fmt::Formatter` (only in nightly), which is making my head hurt. Maybe someone of you can find a better way of doing this. Then, about `cursor.expect()`, this is the only place where we don't have the expected token type as a static string, so it's failing to compile. We have the option of changing the type definition of `ParseError` to contain an owned string, but maybe we can avoid this by having a `&'static str` come from a `TokenKind` with the default values, such as "identifier" for an identifier. I wanted for you to think about it and maybe we can just add that and avoid allocations there. Oh, and this depends on the VM-only branch, so that has to be merged before :) Another thing to check: should the interner be in its own module?
3 years ago
rustyline = "9.1.2"
rustyline-derive = "0.6.0"
Bump clap from 3.1.14 to 3.1.15 (#2057) Bumps [clap](https://github.com/clap-rs/clap) from 3.1.14 to 3.1.15. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v3.1.15</h2> <h2>[3.1.15] - 2022-05-02</h2> <h3>Fixes</h3> <ul> <li><em>(error)</em> Render actual usage for unrecognized subcommands</li> <li><em>(multicall)</em> Improve bad command error</li> <li><em>(multicall)</em> Always require a multicall command</li> <li><em>(multicall)</em> Disallow arguments on multicall parent command</li> <li><em>(multicall)</em> More consistent with rest of clap errors</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[3.1.15] - 2022-05-02</h2> <h3>Fixes</h3> <ul> <li><em>(error)</em> Render actual usage for unrecognized subcommands</li> <li><em>(multicall)</em> Improve bad command error</li> <li><em>(multicall)</em> Always require a multicall command</li> <li><em>(multicall)</em> Disallow arguments on multicall parent command</li> <li><em>(multicall)</em> More consistent with rest of clap errors</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/clap-rs/clap/commit/0240ec5493fe158f88071b2988fa0a831a0b1e8d"><code>0240ec5</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/5543315d3b7b0b8fb72734cdadff40748b5acb89"><code>5543315</code></a> docs: Update chaneglog</li> <li><a href="https://github.com/clap-rs/clap/commit/d33812f8a790772c663e9806179b0623ffd52456"><code>d33812f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/clap-rs/clap/issues/3677">#3677</a> from epage/multicall</li> <li><a href="https://github.com/clap-rs/clap/commit/af3b789e4c3211750a80f1da9cf928bb526eb08c"><code>af3b789</code></a> fix(multicall): Consistently skip multicall bin in help</li> <li><a href="https://github.com/clap-rs/clap/commit/8cd59fa4e571a62e03b39bcada25a816ac09d2a3"><code>8cd59fa</code></a> fix(multicall): More consistent whitespace in errors</li> <li><a href="https://github.com/clap-rs/clap/commit/f9fdb99ee8b2423b12664192f98da4ea0dadeb6c"><code>f9fdb99</code></a> fix(multicall): Disallow args on multicall binary</li> <li><a href="https://github.com/clap-rs/clap/commit/ce727f1951fb4f498cc73b72e83852be182aa736"><code>ce727f1</code></a> fix(error): Render actual usage for unrecognized subcommands</li> <li><a href="https://github.com/clap-rs/clap/commit/5cd1a4070b07f250c559495f45d245d861d73ff3"><code>5cd1a40</code></a> fix(multicall): Show subcommands are required</li> <li><a href="https://github.com/clap-rs/clap/commit/414ae57a2ac4447a9c3a30863fed44bcffe80511"><code>414ae57</code></a> fix(multicall): Improve bad multicall binary error</li> <li><a href="https://github.com/clap-rs/clap/commit/86b0ea6ad48c8fbc01ecd64057e3fdeb64315358"><code>86b0ea6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/clap-rs/clap/issues/3675">#3675</a> from epage/repl</li> <li>Additional commits viewable in <a href="https://github.com/clap-rs/clap/compare/v3.1.14...v3.1.15">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=3.1.14&new-version=3.1.15)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
2 years ago
clap = { version = "3.1.15", features = ["derive"] }
Bump serde_json from 1.0.79 to 1.0.80 (#2051) Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.79 to 1.0.80. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/json/commit/585e4c5dc771d55459f2ff860bbe998660db0853"><code>585e4c5</code></a> Release 1.0.80</li> <li><a href="https://github.com/serde-rs/json/commit/52a9c050f5dcc0dc3de4825b131b8ff05219cc82"><code>52a9c05</code></a> Pull miri from miri branch of dtolnay/rust-toolchain</li> <li><a href="https://github.com/serde-rs/json/commit/aff685b8c9d20aa3773d2d4d6753e4b399768af6"><code>aff685b</code></a> Drop unneeded quoting from env variable in workflows yaml</li> <li><a href="https://github.com/serde-rs/json/commit/6995bbf78444af61bcd98749c538222a18d4612f"><code>6995bbf</code></a> Update workflows to actions/checkout@v3</li> <li><a href="https://github.com/serde-rs/json/commit/829175e6069fb16672875f125f6afdd7c6da1dec"><code>829175e</code></a> Fix dev dependencies on serde's derive feature</li> <li><a href="https://github.com/serde-rs/json/commit/2733e635b32fa9c10d1d8ef8c224b6aa405727d3"><code>2733e63</code></a> Rewrap readme to 80 columns</li> <li><a href="https://github.com/serde-rs/json/commit/c5475a32db364b6102d6e3b024912ba0eb5b3116"><code>c5475a3</code></a> Apply readme changes from PR 864 to crate-level rustdoc</li> <li><a href="https://github.com/serde-rs/json/commit/56cf16f90096f250912d533e75e5c1c5e1b773b4"><code>56cf16f</code></a> Merge pull request 864 from novedevo/patch-1</li> <li><a href="https://github.com/serde-rs/json/commit/16b68b06d601f63a5f0368b3711acbe0f0f1223e"><code>16b68b0</code></a> Tweak grammar to improve readability</li> <li>See full diff in <a href="https://github.com/serde-rs/json/compare/v1.0.79...v1.0.80">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.79&new-version=1.0.80)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
2 years ago
serde_json = "1.0.80"
colored = "2.0.0"
Bump regex from 1.5.4 to 1.5.5 (#1915) Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.5.5. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex's changelog</a>.</em></p> <blockquote> <h1>1.5.5 (2022-03-08)</h1> <p>This releases fixes a security bug in the regex compiler. This bug permits a vector for a denial-of-service attack in cases where the regex being compiled is untrusted. There are no known problems where the regex is itself trusted, including in cases of untrusted haystacks.</p> <ul> <li><a href="https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8">SECURITY #GHSA-m5pq-gvj9-9vr8</a>: Fixes a bug in the regex compiler where empty sub-expressions subverted the existing mitigations in place to enforce a size limit on compiled regexes. The Rust Security Response WG published an advisory about this: <a href="https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw">https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rust-lang/regex/commit/d130381b150756ba7e5940efdc6ebdf47f4febc0"><code>d130381</code></a> 1.5.5</li> <li><a href="https://github.com/rust-lang/regex/commit/ae70b41d4f46641dbc45c7a4f87954aea356283e"><code>ae70b41</code></a> security: fix denial-of-service bug in compiler</li> <li><a href="https://github.com/rust-lang/regex/commit/b92ffd5471018419ec48dbdef32757424439f065"><code>b92ffd5</code></a> cargo: use SPDX license format</li> <li><a href="https://github.com/rust-lang/regex/commit/f6e52dafdee305d16d6778e7bfe935bd9a6ae38b"><code>f6e52da</code></a> syntax: fix 'unused' warnings</li> <li><a href="https://github.com/rust-lang/regex/commit/5197f21287344d2994f9cf06758a3ea30f5a26c3"><code>5197f21</code></a> fuzz: do not use inherits in Cargo.toml</li> <li><a href="https://github.com/rust-lang/regex/commit/3662851482327e3642940981298150c93718de3c"><code>3662851</code></a> doc: fix typo</li> <li><a href="https://github.com/rust-lang/regex/commit/63ee6699a27b294774af0154862e5cc35b495ee6"><code>63ee669</code></a> syntax/doc: fix 'their' typo</li> <li><a href="https://github.com/rust-lang/regex/commit/d6bc7a4c3b58e1d618024aaededa722df32fa6e8"><code>d6bc7a4</code></a> readme: remove broken badge</li> <li><a href="https://github.com/rust-lang/regex/commit/bd7466034f8cccc3b0918201d1eb099cc8be3c56"><code>bd74660</code></a> fuzz: try to fix build issue</li> <li><a href="https://github.com/rust-lang/regex/commit/bd0a14231b8848669e0d257ba55526f62756c749"><code>bd0a142</code></a> readme: fix badges</li> <li>Additional commits viewable in <a href="https://github.com/rust-lang/regex/compare/1.5.4...1.5.5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=regex&package-manager=cargo&previous-version=1.5.4&new-version=1.5.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
3 years ago
regex = "1.5.5"
phf = { version = "0.10.1", features = ["macros"] }
[target.x86_64-unknown-linux-gnu.dependencies]
jemallocator = "0.3.2"
[[bin]]
name = "boa"
4 years ago
doc = false
path = "src/main.rs"