Comments (6)
Good call-out! I don't have a windows computer, but I'll get started porting the bash scripts over to node and see if I can get a PR out by EOD. I'm currently at Wasmcon, so it may take longer than I'd like
from watlings.
Let me know if there are still issues on windows for now. I've migrated the bash scripts to node, but I don't have a windows machine of my own right now to verify there aren't any other issues.
from watlings.
Hi, thanks for responding! I tried the patch, but the problem with npm start 001_hello
and npm run test
in JeffersGlass's comment appeared. I have no idea about the reason currently.
from watlings.
I'm not sure why the spawn
behaves erroneously on Windows, and I changed it a little.
Also, according to nodejs/node#37845, the filePath is to be acquired by fileURLToPath
. I changed getWastParser.mjs
like,
...
var path = new URL(filePath, import.meta.url).pathname;
const fileName = path.match(/\/([^\/]+)\.wat$/)[1];
const wasmPath = fileURLToPath(new URL(`../../.cache/${fileName}.wasm`, import.meta.url))
path = fileURLToPath(new URL(filePath, import.meta.url))
return new Promise((res, rej) => {
spawn('node', ['node_modules/wabt/bin/wat2wasm', path, '-o', wasmPath], { stdio:'inherit' })
...
, and it compiles 001 successfully. Note that there are backslashes after fileURLToPath
on Windows, and I don't want to change the regex part, so I keep the first pathname.
from watlings.
Thanks for the comment! Has the latest commit fixed the issues?
from watlings.
Seems good. It compiles after npm run solve 001_hello
and the two tests passed. I have only looked at that puzzle for now, but I suppose others are also fine. (Probably GitHub Actions can help test out other cases on all platforms.)
I think providing a npm run solve all
and catching the error during npm run build
when some puzzles are not done will be better (or even the watch mode like rustlings), but that is out of the scope of this issue.
Thanks for your work!
from watlings.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watlings.