Importing psychoscript throws RangeError in Safari (WebKit/JavaScriptCore)

オープン
#100 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@vibdev がすでに取り組んでいます。

2026年11月27日 から。

  • #108 @vibdev による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript, playwright

調査の方向性

Start with dist/runtime/limits.js, where the oversized BigInt shift is calculated at module load. Reproduce with await import("psychoscript") in Playwright's WebKit build and compare the boundary expression with Chromium and Node. Done means the package imports without a RangeError in WebKit while retaining the intended runtime limit and existing behavior elsewhere.

索引モデルが issue の本文から書いたものです。

説明

Environment
  • psychoscript 0.3.0
  • Fails: WebKit 27.2 (Safari 27.2 engine, via Playwright's WebKit build)
  • Works: Chromium 158, Node 24.22
What happens

Importing psychoscript in Safari (or any JavaScriptCore runtime) throws at module load:

RangeError: Out of memory: BigInt generated from this operation is too big
  at module code@.../psychoscript/dist/runtime/limits.js:15:21

so psychoscript can't be used in Safari at all, including iOS browsers.

Minimal repro

Any page that does:

await import("psychoscript");

The same RangeError comes from this expression in Safari's console:

1n << BigInt(1 << 20)        // RangeError in WebKit 27.2; 1048577 bits in Chromium 158 and Node 24
1n << BigInt((1 << 20) - 1)  // works everywhere (1048576 bits)
Expected

psychoscript imports in Safari as it does in Chrome and Node.

主要言語
Rust
スター
470
フォーク
11
平均マージ
4時間 10分
マージ済み PR(30日)
89

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/psychoscript のほかの issue

anomalyco/psychoscript の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。