-
Notifications
You must be signed in to change notification settings - Fork 54
feat: allow wasm in nodejs #253
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
Conversation
WalkthroughThe updates to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (4)
packages/torii-wasm/build.sh (1)
6-6
: Consider adding error handling for git clone.While the
set -ex
option will exit on error, it might be useful to provide a more descriptive error message if the clone fails.git clone --depth 1 https://github.com/dojoengine/dojo.c dojo.c || { echo "Failed to clone repository"; exit 1; }packages/torii-wasm/package.json (3)
7-8
: Files specified inmain
andbrowser
entries are missing.The files
./pkg/node/dojo_c.js
and./pkg/web/dojo_c.js
do not exist in the specified locations. Please verify the build process to ensure these files are generated correctly, or check the paths in thepackage.json
for accuracy.
main
:./pkg/node/dojo_c.js
is missing.browser
:./pkg/web/dojo_c.js
is missing.Analysis chain
Verify the
main
andbrowser
entries.Ensure that the paths specified in the
main
andbrowser
entries are correct and that the files exist in the specified locations.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify existence of main and browser entry files. # Test: Check if the specified files exist. test -f ./pkg/node/dojo_c.js && echo "Node.js main file exists." || echo "Node.js main file is missing." test -f ./pkg/web/dojo_c.js && echo "Browser file exists." || echo "Browser file is missing."Length of output: 188
15-22
: Missing Files infiles
ArrayNone of the files listed in the
files
array ofpackages/torii-wasm/package.json
exist in the specified locations. Please verify the build process to ensure these files are correctly generated.
./pkg/web/dojo_c_bg.wasm
is missing../pkg/web/dojo_c.js
is missing../pkg/web/dojo_c_bg.js
is missing../pkg/web/dojo_c.d.ts
is missing../pkg/node/dojo_c_bg.wasm
is missing../pkg/node/dojo_c.js
is missing../pkg/node/dojo_c_bg.js
is missing../pkg/node/dojo_c.d.ts
is missing.Analysis chain
Ensure all files in the
files
array exist.Verify that all the files listed in the
files
array are correctly generated and exist in the specified locations.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify existence of files listed in the files array. # Test: Check if each specified file exists. for file in ./pkg/web/dojo_c_bg.wasm ./pkg/web/dojo_c.js ./pkg/web/dojo_c_bg.js ./pkg/web/dojo_c.d.ts ./pkg/node/dojo_c_bg.wasm ./pkg/node/dojo_c.js ./pkg/node/dojo_c_bg.js ./pkg/node/dojo_c.d.ts; do test -f $file && echo "$file exists." || echo "$file is missing." doneLength of output: 2479
24-25
: Missingmodule
andtypes
files inpackage.json
.The files specified in the
module
andtypes
entries (./pkg/web/dojo_c.js
and./pkg/web/dojo_c.d.ts
) do not exist. Please verify the build process or correct the paths in thepackage.json
.
- Ensure the build process generates these files.
- Check if the paths in
package.json
are correct.Analysis chain
Verify
module
andtypes
entries.Ensure that the paths specified in the
module
andtypes
entries are correct and that the files exist in the specified locations.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify existence of module and types entry files. # Test: Check if the specified files exist. test -f ./pkg/web/dojo_c.js && echo "Module file exists." || echo "Module file is missing." test -f ./pkg/web/dojo_c.d.ts && echo "Types file exists." || echo "Types file is missing."Length of output: 173
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/torii-wasm/build.sh (1 hunks)
- packages/torii-wasm/package.json (1 hunks)
Additional comments not posted (1)
packages/torii-wasm/build.sh (1)
11-14
: Ensure wasm-pack is installed and compatible.Make sure that
wasm-pack
is installed and the version is compatible with your build requirements. Consider adding a version check or installation instructions.
Allows wasm to run in nodejs env
Summary by CodeRabbit
New Features
Improvements