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.

22 lines
612 B

[package]
name = "boa_wasm"
version = "0.14.0"
edition = "2021"
rust-version = "1.58"
authors = ["boa-dev"]
description = "WASM package for the Boa JavaScript engine."
repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "compiler", "lexer", "parser", "js"]
categories = ["parser-implementations", "wasm", "compilers"]
license = "Unlicense/MIT"
[dependencies]
boa_engine = { path = "../boa_engine", features = ["console"], 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
wasm-bindgen = "=0.2.78"
Bump getrandom from 0.2.4 to 0.2.5 (#1863) Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.2.4 to 0.2.5. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md">getrandom's changelog</a>.</em></p> <blockquote> <h2>[0.2.5] - 2022-02-22</h2> <h3>Added</h3> <ul> <li>ESP-IDF targets (<code>*‑espidf</code>) support <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/245">#245</a></li> </ul> <h3>Fixed</h3> <ul> <li>Webpack warning caused by dynamic require <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/234">#234</a></li> <li>Error checking on iOS for <code>SecRandomCopyBytes</code> <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/244">#244</a></li> </ul> <p><a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/234">#234</a>: <a href="https://github-redirect.dependabot.com/rust-random/getrandom/pull/234">rust-random/getrandom#234</a> <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/244">#244</a>: <a href="https://github-redirect.dependabot.com/rust-random/getrandom/pull/244">rust-random/getrandom#244</a> <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/245">#245</a>: <a href="https://github-redirect.dependabot.com/rust-random/getrandom/pull/245">rust-random/getrandom#245</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rust-random/getrandom/commit/cd3a987b9b2070925f49aaffdf709fa6fbf276ab"><code>cd3a987</code></a> Release v0.2.5 (<a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/247">#247</a>)</li> <li><a href="https://github.com/rust-random/getrandom/commit/cf02327ac9d93ef46435c86214abd708c540f7d8"><code>cf02327</code></a> Enable support for espidf (esp32 family of microcontrollers) (<a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/245">#245</a>)</li> <li><a href="https://github.com/rust-random/getrandom/commit/e1a9c9e74068d29bb4158d7282e398591da69811"><code>e1a9c9e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/246">#246</a> from rust-random/cross_fix</li> <li><a href="https://github.com/rust-random/getrandom/commit/f49f083412457057ad18e2bbb79306f00801d8cf"><code>f49f083</code></a> fix cross tests</li> <li><a href="https://github.com/rust-random/getrandom/commit/21e03e8056cf60881e62184e68c38ad5b1c250a0"><code>21e03e8</code></a> ios: Fix Error checking for SecRandomCopyBytes (<a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/244">#244</a>)</li> <li><a href="https://github.com/rust-random/getrandom/commit/e6e7dd604899cb075f99aa7f8e9f6fef6a17098f"><code>e6e7dd6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/234">#234</a> from mjhanninen/fix-webpack-dynamic-require-error</li> <li><a href="https://github.com/rust-random/getrandom/commit/8fad7c5ab4014ac755e6f95fb2bdeef0f674faa2"><code>8fad7c5</code></a> js: Add comment explaining why we do this hack</li> <li><a href="https://github.com/rust-random/getrandom/commit/8372c165afcda48aade40750943eefcf12a483f6"><code>8372c16</code></a> Fix Webpack warning caused by dynamic require</li> <li>See full diff in <a href="https://github.com/rust-random/getrandom/compare/v0.2.4...v0.2.5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=getrandom&package-manager=cargo&previous-version=0.2.4&new-version=0.2.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
getrandom = { version = "0.2.5", features = ["js"] }
[lib]
crate-type = ["cdylib", "lib"]
name = "boa_wasm"
bench = false