Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust 1.56 produces unstable wasm for Safari #7

Open
futursolo opened this issue Oct 23, 2021 · 1 comment
Open

Rust 1.56 produces unstable wasm for Safari #7

futursolo opened this issue Oct 23, 2021 · 1 comment

Comments

@futursolo
Copy link
Owner

The same binary for syntax highlight worker produced under 1.55 and 1.56.

When 1.56 binary is used under Safari, it will generate the following error:

panicked at 'regex string should be pre-tested: InnerError(Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
    \b(?:(pub)\s+)?\b(mod)\s+((?:[\p{L}][_\p{L}\p{N}]*|_[_\p{L}\p{N}]+)\b)\b
                                  ^^^^^
error: Unicode not allowed here
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
))', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/syntect-4.6.0/src/parsing/regex.rs:72:57

This apparently only affects Safari.

I have chosen to downgrade to 1.55 for now as I don't know how to reproduce this error.

@futursolo
Copy link
Owner Author

Some more information:

  • Only 1.56+ is affected
  • Only happens if wasm-opt is used with -O (any optimisation level)
  • Only happens on Safari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant