chore: formatting nits

main
Sean McBride 4 years ago
parent e32339bbc1
commit 5e810df0a1

@ -1,32 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/docker-existing-dockerfile // https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/docker-existing-dockerfile
{ {
"name": "Dockerfile", "name": "Dockerfile",
// Sets the run context to one level up instead of the .devcontainer folder.
// Sets the run context to one level up instead of the .devcontainer folder. "context": "..",
"context": "..", // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "../Dockerfile.x86_64",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. // Set *default* container specific settings.json values on container create.
"dockerFile": "../Dockerfile.x86_64", "settings": {
"terminal.integrated.shell.linux": "bash"
// Set *default* container specific settings.json values on container create. },
"settings": { // Add the IDs of extensions you want installed when the container is created.
"terminal.integrated.shell.linux": null "extensions": [
}, "editorconfig.editorconfig",
"foxundermoon.shell-format",
// Add the IDs of extensions you want installed when the container is created. "timonwong.shellcheck",
"extensions": [ "dtsvet.vscode-wasm",
"editorconfig.editorconfig", "13xforever.language-x86-64-assembly",
"foxundermoon.shell-format", "ms-vscode.cpptools",
"timonwong.shellcheck", "ms-vscode.cpptools-themes",
"dtsvet.vscode-wasm", "jeff-hykin.better-cpp-syntax",
"13xforever.language-x86-64-assembly", "mads-hartmann.bash-ide-vscode"
"ms-vscode.cpptools", ],
"ms-vscode.cpptools-themes", "workspaceMount": "source=${localWorkspaceFolder},target=/sledge,type=bind,consistency=cached",
"jeff-hykin.better-cpp-syntax" "workspaceFolder": "/sledge",
], "postCreateCommand": "make -C /sledge install && make -B -C /sledge/runtime/tests clean all",
"workspaceMount": "source=${localWorkspaceFolder},target=/sledge,type=bind,consistency=cached", "containerUser": "dev",
"workspaceFolder": "/sledge",
"postCreateCommand": "make -C /sledge install && make -B -C /sledge/runtime/tests clean all",
"containerUser": "dev",
} }

@ -23,3 +23,15 @@ ignore = true
[thirdparty/**] [thirdparty/**]
ignore = true ignore = true
[*.json]
indent_style = tab
indent_size = 4
[dockerfile]
indent_style = tab
indent_size = 4
[Dockerfile.*]
indent_style = tab
indent_size = 4

@ -1,19 +1,23 @@
{ {
"configurations": [ "configurations": [
{ {
"name": "Linux", "name": "Linux",
"intelliSenseMode": "clang-x64", "intelliSenseMode": "clang-x64",
"includePath": [ "includePath": [
"/usr/include/", "/usr/include/",
"${workspaceFolder}/runtime/include/", "${workspaceFolder}/runtime/include/",
"${workspaceFolder}/runtime/thirdparty/ck/include/", "${workspaceFolder}/runtime/thirdparty/ck/include/",
"${workspaceFolder}/runtime/thirdparty/http-parser/", "${workspaceFolder}/runtime/thirdparty/http-parser/",
"${workspaceFolder}/runtime/thirdparty/jsmn/" "${workspaceFolder}/runtime/thirdparty/jsmn/"
], ],
"defines": ["USE_MEM_VM", "x86_64", "_GNU_SOURCE"], "defines": [
"cStandard": "c17", "USE_MEM_VM",
"compilerPath": "/usr/bin/clang" "x86_64",
} "_GNU_SOURCE"
], ],
"version": 4 "cStandard": "c17",
} "compilerPath": "/usr/bin/clang"
}
],
"version": 4
}

@ -1,12 +1,12 @@
{ {
"recommendations": [ "recommendations": [
"editorconfig.editorconfig", "editorconfig.editorconfig",
"foxundermoon.shell-format", "foxundermoon.shell-format",
"timonwong.shellcheck", "timonwong.shellcheck",
"dtsvet.vscode-wasm", "dtsvet.vscode-wasm",
"13xforever.language-x86-64-assembly", "13xforever.language-x86-64-assembly",
"ms-vscode.cpptools", "ms-vscode.cpptools",
"ms-vscode.cpptools-themes", "ms-vscode.cpptools-themes",
"jeff-hykin.better-cpp-syntax" "jeff-hykin.better-cpp-syntax"
] ]
} }

102
.vscode/launch.json vendored

@ -1,52 +1,52 @@
{ {
// Use IntelliSense to learn about possible attributes. // Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes. // Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Hyde", "name": "Hyde",
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/runtime/bin/sledgert", "program": "${workspaceFolder}/runtime/bin/sledgert",
"args": [ "args": [
"${workspaceFolder}/runtime/experiments/applications/ocr/hyde/spec.json" "${workspaceFolder}/runtime/experiments/applications/ocr/hyde/spec.json"
], ],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"environment": [], "environment": [],
"externalConsole": false, "externalConsole": false,
"MIMode": "gdb", "MIMode": "gdb",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"setupCommands": [ "setupCommands": [
{ {
"description": "Enable pretty-printing for gdb", "description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing", "text": "-enable-pretty-printing",
"ignoreFailures": true "ignoreFailures": true
} }
] ]
}, },
{ {
"name": "Preemption", "name": "Preemption",
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/runtime/bin/sledgert", "program": "${workspaceFolder}/runtime/bin/sledgert",
"args": [ "args": [
"${workspaceFolder}/runtime/experiments/preemption/spec.json" "${workspaceFolder}/runtime/experiments/preemption/spec.json"
], ],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"environment": [], "environment": [],
"externalConsole": false, "externalConsole": false,
"MIMode": "gdb", "MIMode": "gdb",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"setupCommands": [ "setupCommands": [
{ {
"description": "Enable pretty-printing for gdb", "description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing", "text": "-enable-pretty-printing",
"ignoreFailures": true "ignoreFailures": true
} }
] ]
} }
] ]
} }

@ -1,81 +1,113 @@
{ {
"files.associations": { "files.associations": {
"*.inc": "cpp", "*.inc": "cpp",
"arm_nnexamples_cifar10_parameter.h": "c", "arm_nnexamples_cifar10_parameter.h": "c",
"arm_nnexamples_cifar10_weights.h": "c", "arm_nnexamples_cifar10_weights.h": "c",
"__hash_table": "cpp", "__hash_table": "cpp",
"__split_buffer": "cpp", "__split_buffer": "cpp",
"__tree": "cpp", "__tree": "cpp",
"array": "cpp", "array": "cpp",
"bitset": "cpp", "bitset": "cpp",
"deque": "cpp", "deque": "cpp",
"dynarray": "cpp", "dynarray": "cpp",
"simd": "cpp", "simd": "cpp",
"hash_map": "cpp", "hash_map": "cpp",
"hash_set": "cpp", "hash_set": "cpp",
"initializer_list": "cpp", "initializer_list": "cpp",
"iterator": "cpp", "iterator": "cpp",
"list": "cpp", "list": "cpp",
"map": "cpp", "map": "cpp",
"queue": "cpp", "queue": "cpp",
"random": "cpp", "random": "cpp",
"regex": "cpp", "regex": "cpp",
"set": "cpp", "set": "cpp",
"stack": "cpp", "stack": "cpp",
"string": "cpp", "string": "cpp",
"string_view": "cpp", "string_view": "cpp",
"unordered_map": "cpp", "unordered_map": "cpp",
"unordered_set": "cpp", "unordered_set": "cpp",
"utility": "cpp", "utility": "cpp",
"valarray": "cpp", "valarray": "cpp",
"vector": "cpp", "vector": "cpp",
"__locale": "cpp", "__locale": "cpp",
"__config": "c", "__config": "c",
"*.def": "c", "*.def": "c",
"mman.h": "c", "mman.h": "c",
"types.h": "c", "types.h": "c",
"assert.h": "c", "assert.h": "c",
"fstream": "c", "fstream": "c",
"locale": "c", "locale": "c",
"*.tcc": "c", "*.tcc": "c",
"sandbox.h": "c", "sandbox.h": "c",
"runtime.h": "c", "runtime.h": "c",
"panic.h": "c", "panic.h": "c",
"ucontext.h": "c", "ucontext.h": "c",
"stdlib.h": "c", "stdlib.h": "c",
"pthread.h": "c", "pthread.h": "c",
"signal.h": "c", "signal.h": "c",
"current_sandbox.h": "c", "current_sandbox.h": "c",
"admissions_control.h": "c", "admissions_control.h": "c",
"sigval_t.h": "c", "sigval_t.h": "c",
"__sigval_t.h": "c", "__sigval_t.h": "c",
"sigaction.h": "c", "sigaction.h": "c",
"string.h": "c", "string.h": "c",
"errno.h": "c", "errno.h": "c",
"siginfo_t.h": "c", "siginfo_t.h": "c",
"features.h": "c" "features.h": "c"
}, },
"files.exclude": { "files.exclude": {
"**/.git": true, "**/.git": true,
"**/.svn": true, "**/.svn": true,
"**/.hg": true, "**/.hg": true,
"**/CVS": true, "**/CVS": true,
"**/.DS_Store": true, "**/.DS_Store": true,
"awsm/wasmception": true "awsm/wasmception": true
}, },
"C_Cpp.default.cStandard": "c17", "C_Cpp.default.cStandard": "c17",
"C_Cpp.exclusionPolicy": "checkFilesAndFolders", "C_Cpp.exclusionPolicy": "checkFilesAndFolders",
"C_Cpp.experimentalFeatures": "Enabled", "C_Cpp.experimentalFeatures": "Enabled",
"C_Cpp.files.exclude": { "C_Cpp.files.exclude": {
"awsm/wasmception": true, "awsm/wasmception": true,
"**/.vscode": true "**/.vscode": true
}, },
"shellformat.effectLanguages": [
"shellformat.flag": "-ln=bash -i 0 -bn -ci -sr -kp", "shellscript",
"terminal.integrated.profiles.linux": { "dockerfile",
"bash": { "ignore",
"path": "bash" "gitignore",
} ],
}, "shellformat.path": "/usr/local/bin/shfmt",
"terminal.integrated.shell.linux": "bash" "shellformat.flag": "-ln=bash -i 0 -bn -ci -sr -kp",
"terminal.integrated.shell.linux": "bash",
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[dockerfile]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/.git/**": true,
"**/awsm/target/**": true,
"**/runtime/thirdparty/**": true,
"**/runtime/thirdparty/ck/**": true,
"**/runtime/thirdparty/http-parser/**": true,
"**/runtime/thirdparty/jsmn/**": true,
"**/runtime/thirdparty/dist/**": true,
"*.o": true,
"**/res/**": true,
"**/concurrency/res/**/**": true,
"**/deadline/res/**/**": true,
"**/preemption/res/**/**": true,
}
} }

@ -6,32 +6,32 @@ FROM ubuntu:bionic
# install some basic packages # install some basic packages
RUN apt-get update RUN apt-get update
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
build-essential \ build-essential \
curl \ curl \
git \ git \
cmake \ cmake \
ca-certificates \ ca-certificates \
libssl-dev \ libssl-dev \
pkg-config \ pkg-config \
gcc \ gcc \
g++ \ g++ \
clang-8 \ clang-8 \
clang-tools-8 \ clang-tools-8 \
llvm-8 \ llvm-8 \
llvm-8-dev \ llvm-8-dev \
libc++-dev \ libc++-dev \
libc++abi-dev \ libc++abi-dev \
lld-8 \ lld-8 \
lldb-8 \ lldb-8 \
libclang-8-dev \ libclang-8-dev \
libclang-common-8-dev \ libclang-common-8-dev \
vim \ vim \
binutils-dev \ binutils-dev \
build-essential \ build-essential \
automake \ automake \
libtool \ libtool \
strace \ strace \
less less
RUN rm -rf /var/lib/apt/lists/* RUN rm -rf /var/lib/apt/lists/*
# set to use our installed clang version # set to use our installed clang version

@ -132,11 +132,11 @@ envrun() {
echo "Starting ${SYS_DOC_NAME}" echo "Starting ${SYS_DOC_NAME}"
docker run \ docker run \
--privileged \ --privileged \
--security-opt seccomp:unconfined \ --security-opt seccomp:unconfined \
--name=${SYS_DOC_NAME} \ --name=${SYS_DOC_NAME} \
--detach \ --detach \
--mount type=bind,src="$(cd "$(dirname "${0}")" && pwd -P || exit 1),target=/${SYS_NAME}" \ --mount type=bind,src="$(cd "$(dirname "${0}")" && pwd -P || exit 1),target=/${SYS_NAME}" \
${SYS_DOC_NAMETAG} /bin/sleep 99999999 > /dev/null ${SYS_DOC_NAMETAG} /bin/sleep 99999999 > /dev/null
fi fi
echo "Running shell" echo "Running shell"

Loading…
Cancel
Save