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

Feature: Web REPL using Emscripten #138

Merged
merged 16 commits into from
Nov 10, 2021
Merged

Conversation

MathematicalDessert
Copy link
Contributor

@MathematicalDessert MathematicalDessert commented Nov 5, 2021

Closes #177

Based on @zeux's comment , I have started implementing a Web REPL for Luau.

This PR will have the initial base for the REPL (potentially including site design).

@MathematicalDessert
Copy link
Contributor Author

MathematicalDessert commented Nov 6, 2021

I've implemented a small web demo for Luau using Emscripten. The design is nothing special and I'm sure more visually talented people will make it look fancy.
Future:

  • Same thread execution (toggle?)
  • Syntax highlighting for input + rich output
  • Better looking site design
  • Error stack trace (?)

How to use:

  • Build using Emscripten compiler (I used cmake: emcmake cmake <luau directory>, cmake --build <cmake config output dir>)

  • Run webserver in output directory (e.g., python 3 http.server`)

@MathematicalDessert MathematicalDessert marked this pull request as ready for review November 6, 2021 22:38
@MathematicalDessert
Copy link
Contributor Author

With a little more work I've managed to add the demo to the existing docs:

image

docs/_pages/demo.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Left some comments.

CLI/Repl.cpp Outdated Show resolved Hide resolved
CLI/Repl.cpp Outdated Show resolved Hide resolved
CLI/Repl.cpp Outdated Show resolved Hide resolved
CLI/Repl.cpp Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
docs/_includes/repl.html Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CLI/Repl.cpp Outdated Show resolved Hide resolved
CLI/Repl.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Going to merge this a little later today or tomorrow.

@zeux zeux merged commit aec8fbf into luau-lang:master Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add Web REPL using Emscripten
3 participants