Skip to content

Commit

Permalink
demo enable modules and modern import
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstenko committed Dec 23, 2023
1 parent 470cb80 commit 252af39
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ terminal.loadAddon(terminalFitAddon);
window.editor = editor;
window.terminal = terminal;

editor.setValue(`#include <iostream>
int main(void) {
std::cout << "hello world!\\n";
return 0;
editor.setValue(`import std;
int main() {
std::printf("Hello World");
}
`);

Expand Down Expand Up @@ -79,7 +77,7 @@ async function main() {
`, document.body);

const flags = document.getElementById("flags");
flags.value = "-O2 -fexceptions --proxy-to-worker -sEXIT_RUNTIME=1";
flags.value = "-O2 -fexceptions --proxy-to-worker -sEXIT_RUNTIME=1 -std=c++2b -fmodules";

window.split = Split({
onDrag: () => {
Expand Down

0 comments on commit 252af39

Please sign in to comment.