diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 05a154cfb8..2b9bb75504 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update \ curl \ uuid-runtime \ && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /usr/lib/elide \ + && mkdir -p /usr/lib/elide /home/vscode/.elide \ && echo "Installing Elide..." \ && curl -sSL elide.sh | bash -s - --install-dir=/usr/lib/elide \ && ln -s /usr/lib/elide/elide /bin/elide \ diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000000..c2df53f588 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,69 @@ +

+ + Elide + +

+ +## Elide + Codespaces + +This GitHub Codespace comes pre-installed with the latest version of [Elide](https://elide.dev). + +## Stuff to try + +**Your terminal should already be open at the bottom of your screen.** We have already taken care of running the first command, `elide --help`, for you. Here's some more stuff you can try. + +### Basic commands + +**To see runtime info:** +``` +elide info +``` + +**To verify working installation:** +``` +elide selftest +``` + +### JavaScript + +**To run a JavaScript terminal:** +``` +elide shell +``` + +**Encode some JSON:** +```javascript +JSON.stringify({x: 5}) +``` + +**To see `.env` environment:** +```python +JSON.stringify(process.env) +``` + +**Generate a UUID:** +```javascript +crypto.randomUUID()+"" +``` + +**Parse a URL and print the host:** +```javascript +new URL("https://google.com").host +``` + +**To run a JavaScript server:** +``` +elide serve tools/scripts/server.js +``` + +### Python + +**To run a Python terminal:** +``` +elide shell --python +``` + +**To see `.env` environment:** +```python +import os; os.environ +``` diff --git a/tools/.devcontainer/Dockerfile b/.devcontainer/dev/Dockerfile similarity index 100% rename from tools/.devcontainer/Dockerfile rename to .devcontainer/dev/Dockerfile diff --git a/tools/.devcontainer/buildless.yaml b/.devcontainer/dev/buildless.yaml similarity index 100% rename from tools/.devcontainer/buildless.yaml rename to .devcontainer/dev/buildless.yaml diff --git a/tools/.devcontainer/devcontainer.json b/.devcontainer/dev/devcontainer.json similarity index 98% rename from tools/.devcontainer/devcontainer.json rename to .devcontainer/dev/devcontainer.json index e794fa6602..33baaa9718 100644 --- a/tools/.devcontainer/devcontainer.json +++ b/.devcontainer/dev/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "elide", + "name": "Elide: Dev (Engineering Team)", "build": { "dockerfile": "Dockerfile" }, diff --git a/tools/.devcontainer/init.gradle.kts b/.devcontainer/dev/init.gradle.kts similarity index 100% rename from tools/.devcontainer/init.gradle.kts rename to .devcontainer/dev/init.gradle.kts diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b4511c425c..ccc054f57c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,39 +1,48 @@ { -"name": "Elide", -"build": { - "dockerfile": "Dockerfile", -}, -"runArgs": ["--init", "--privileged"], -"overrideCommand": false, -"features": { - "ghcr.io/devcontainers/features/git:1": {}, - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/go:1": {"version": "1.20"}, - "ghcr.io/devcontainers/features/sshd:1": {"version": "latest"}, - "ghcr.io/devcontainers/features/docker-from-docker:1": {} -}, -"customizations": { - "vscode": { - "settings": { - "netbeans.jdkhome": "/usr/lib/gvm", - "java.completion.enabled": true, - "java.debug.settings.enableRunDebugCodeLens": true, - "java.test.editor.enableShortcuts": true + "name": "Elide", + "build": { + "dockerfile": "Dockerfile" + }, + "runArgs": ["--init", "--privileged"], + "postAttachCommand": "echo 'ELIDE_CODESPACE=true' > .env && touch package.json && code .devcontainer/README.md && clear && elide --help", + "overrideCommand": false, + "features": { + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers/features/docker-from-docker:1": {} + }, + "customizations": { + "codespaces": { + "openFiles": [ + ".devcontainer/README.md" + ] }, - "extensions": [ - "asf.apache-netbeans-java", - "mathiasfrohlich.kotlin", - "github.codespaces", - "github.copilot", - "ms-azuretools.vscode-docker", - "ms-vscode-remote.remote-containers", - "ms-vscode.vscode-typescript-tslint-plugin", - "redhat.vscode-yaml", - "sourcegraph.sourcegraph", - "oracle-labs-graalvm.graalvm", - "oracle-labs-graalvm.graalvm-pack", - "oracle-labs-graalvm.dashboard" - ], + "vscode": { + "settings": { + "java.completion.enabled": true, + "java.debug.settings.enableRunDebugCodeLens": true, + "java.test.editor.enableShortcuts": true, + "explorer.autoReveal": "focusNoScroll", + "terminal.integrated.gpuAcceleration": "on", + "terminal.integrated.enableImages": true, + "terminal.integrated.customGlyphs": true, + "workbench.editorAssociations": { + "*.md": "vscode.markdown.preview.editor" + } + }, + "extensions": [ + "asf.apache-netbeans-java", + "mathiasfrohlich.kotlin", + "github.codespaces", + "github.copilot", + "ms-azuretools.vscode-docker", + "ms-vscode-remote.remote-containers", + "ms-vscode.vscode-typescript-tslint-plugin", + "redhat.vscode-yaml", + "sourcegraph.sourcegraph", + "oracle-labs-graalvm.graalvm", + "oracle-labs-graalvm.graalvm-pack", + "oracle-labs-graalvm.dashboard" + ] + } } } -} diff --git a/README.md b/README.md index 40779528f2..900d003309 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@

- - - - - + + Elide

@@ -35,7 +32,7 @@ Elide is a cloud-first polyglot runtime for developing fast web applications. It > [!IMPORTANT] > Elide is still in alpha, some features are not fully supported and others may fail on certain environments. -## Using the runtime binaries +## Installation You can install the runtime by running: @@ -45,6 +42,22 @@ curl -sSL --tlsv1.2 elide.sh | bash -s - After installation, you can run `elide help` or `elide info` to see more information. +## Other ways to try Elide + +You can also use Elide in a container, or in a GitHub Codespace. + +### Using Elide via Docker + +``` +docker run --platform linux/amd64 --rm -it ghcr.io/elide-dev/elide --help +``` + +### Using Elide via GitHub Codespaces + +We provide a [GitHub Codespace](https://github.com/features/codespaces) with Elide pre-installed. You can click below to try it out, right from your browser: + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/elide-dev/elide?devcontainer_path=.devcontainer%2Fdevcontainer.json) + ## Features The Elide CLI supports JavaScript out of the box, and includes experimental support for Python, while more languages such as Ruby are planned for future releases.