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

Add compile jack comand to cli #459

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

happytomatoe
Copy link
Contributor

@happytomatoe happytomatoe commented Sep 16, 2024

As I am not using web-ide jack editor because it's slow, I've decided to add cli command to invoke Jack compiler directly

Screenshot from 2024-09-16 17-03-14

@DavidSouther
Copy link
Collaborator

@happytomatoe thank you so much for this PR! Definitely something we've had as a wishlist item while our effort has been focused on the web IDE. For your purposes, you might also look into a "CLI runner", that provides a CLI or (lightweight) windowed environment for Screen + Keyboard. I'll have a review for you later today. It looks like you can start by running npm run ci locally to ensure your CI will pass, and npm run format ; npm run fix to apply automatic formatting and lint fixes.

@happytomatoe
Copy link
Contributor Author

@DavidSouther Could you elaborate on CLI runner? Currently incli/src/index.tsI see that run command only accepts.tstfiles

@DavidSouther
Copy link
Collaborator

I see that run command only accepts.tstfiles

Yes; this would be an entirely new project. nand2tetris run file.tst would still run a .tst file as expected. This new mode might be nand2tetris exec myprog.hack, where myprog.hack is the final compiled .jack -> vm -> hack binary file. This mode would then have the screen and keyboard interaction. Maybe we should start a new thread to discuss that!

@DavidSouther DavidSouther merged commit b55db92 into nand2tetris:main Sep 17, 2024
1 check passed
@DavidSouther
Copy link
Collaborator

Thank you @happytomatoe for your first PR!

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

Successfully merging this pull request may close these issues.

2 participants