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 codespaces #31

Merged
merged 11 commits into from
Jan 17, 2023
50 changes: 50 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# OS
ARG VARIANT="ubuntu-22.04"

FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get -y install --no-install-recommends \
curl \
sudo \
wget \
git \
make \
cmake \
clang \
lldb \
lld \
llvm \
rsync \
build-essential \
lsb-release \
pkg-config \
software-properties-common \
autoconf && apt-get clean

ENV PATH=${PATH}:/home/vscode/.local/bin
RUN sudo bash -c 'mkdir -p /home/vscode/.local/bin'
RUN sudo bash -c "chown -R vscode /home/vscode/.local/"
RUN sudo bash -c 'chmod -R a+rXw /home/vscode/.local'

RUN sudo bash -c 'curl https://get.wasmer.io -sSfL | sudo WASMER_DIR=/home/vscode/.local sh'

# to be used by the juvix extension
RUN sudo bash -c 'mkdir -p /home/vscode/.local/juvix'

RUN sudo bash -c 'curl -s https://api.github.com/repos/anoma/juvix-nightly-builds/releases/latest \
| grep -a "browser_download_url.*linux" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget --output-document juvix.tar.gz -qi - \
&& tar xfv juvix.tar.gz --directory=/home/vscode/.local/bin/'

RUN sudo bash -c 'mkdir -p /home/vscode/.local/wasi-sysroot'
RUN sudo bash -c 'curl -s https://api.github.com/repos/WebAssembly/wasi-sdk/releases/tags/wasi-sdk-16 \
| grep -a "browser_download_url.*wasi-sysroot-16.*tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget --output-document wasi-sysroot.tar.gz -qi - \
&& tar xvf wasi-sysroot.tar.gz --directory /home/vscode/.local/wasi-sysroot/'
ENV WASI_SYSROOT_PATH=/home/vscode/.local/wasi-sysroot/
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
"args": {
"USERNAME": "vscode",
"VARIANT": "ubuntu-22.04"
}
},
"runArgs": [
"--privileged"
],
"postCreateCommand":
"bash -c 'curl https://codeload.github.com/anoma/juvix/tar.gz/main | tar -xz --strip=2 juvix-main/examples/ --directory=examples/' ",
"settings": {
"editor.tabSize": 2,
"editor.renderWhitespace": "trailing",
"editor.wordWrap": "wordWrapColumn",
"editor.fontSize": 16,
"editor.minimap.enabled": false,
"editor.hover.delay": 700,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"files.trimTrailingWhitespace": true,
"breadcrumbs.enabled": false,
"extensions.ignoreRecommendations": true,
"terminal.integrated.confirmOnKill": "never",
"juvix-mode.opts": {
"internalBuildDir": "/workspaces/juvix-stdlib/.juvix-build"
},
"juvix-mode.bin.path": "/home/vscode/.local/bin/",
"juvix-mode.input.languages": [
"Juvix",
"JuvixCore"
],
"juvix-mode.reloadReplOnSave": true,
"juvix-mode.typecheckOnChange": true
},
"extensions": [
"Heliax.juvix-mode"
],
"remoteUser": "vscode"
}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/docs/
.juvix-build
.history
milestone
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The Juvix Standard Library

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=455254004)
4 changes: 0 additions & 4 deletions readme.org

This file was deleted.