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.

23 lines
703 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" }
# BUG: Pump when 0.2.80 releases. See https://github.com/rustwasm/wasm-bindgen/issues/2774
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.5 to 0.2.6 (#1986) Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.2.5 to 0.2.6. <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.6] - 2022-03-28</h2> <h3>Added</h3> <ul> <li>Nintendo 3DS (<code>armv6k-nintendo-3ds</code>) support <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/248">#248</a></li> </ul> <h3>Changed</h3> <ul> <li>Retry <code>open</code> when interrupted <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/252">#252</a></li> </ul> <p><a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/248">#248</a>: <a href="https://github-redirect.dependabot.com/rust-random/getrandom/pull/248">rust-random/getrandom#248</a> <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/252">#252</a>: <a href="https://github-redirect.dependabot.com/rust-random/getrandom/pull/252">rust-random/getrandom#252</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rust-random/getrandom/commit/fcece06dd5dc5580b79a3bc7a6310c0c48b9406f"><code>fcece06</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/255">#255</a> from rust-random/release/v0.2.6</li> <li><a href="https://github.com/rust-random/getrandom/commit/0830ba66be8a5c019fc5ced5747c9d0a023e4d3e"><code>0830ba6</code></a> Disable Solaris CI job</li> <li><a href="https://github.com/rust-random/getrandom/commit/2630158149a1926da374a4433b212af34c5c94bc"><code>2630158</code></a> Release v0.2.6</li> <li><a href="https://github.com/rust-random/getrandom/commit/fcae1d2626bf947943a3270ea946cee46f91cccf"><code>fcae1d2</code></a> libc: retry open when interrupted (<a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/252">#252</a>)</li> <li><a href="https://github.com/rust-random/getrandom/commit/d40ec2c7e4981b64d2964d7d4c99ad6245db526d"><code>d40ec2c</code></a> Add support for the Nintendo 3DS (armv6k-nintendo-3ds) (<a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/248">#248</a>)</li> <li><a href="https://github.com/rust-random/getrandom/commit/157d6f23dc53ea995294646c4f6301116aaa2bfa"><code>157d6f2</code></a> Fix v0.2.5 release date (<a href="https://github-redirect.dependabot.com/rust-random/getrandom/issues/250">#250</a>)</li> <li>See full diff in <a href="https://github.com/rust-random/getrandom/compare/v0.2.5...v0.2.6">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.5&new-version=0.2.6)](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.6", features = ["js"] }
[lib]
crate-type = ["cdylib", "lib"]
name = "boa_wasm"
bench = false