Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0140aadaf | ||
|
|
35a69f42bd |
No files matched your search
@@ -1,11 +1 @@
|
||||
IndentWidth: 3
|
||||
BinPackArguments: true
|
||||
BinPackParameters: false
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
PenaltyReturnTypeOnItsOwnLine: 140
|
||||
ReflowComments: false
|
||||
---
|
||||
Language: Proto
|
||||
IndentWidth: 2
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-format": {
|
||||
"version": "5.1.225507",
|
||||
"commands": [
|
||||
"dotnet-format"
|
||||
]
|
||||
},
|
||||
"fable": {
|
||||
"version": "4.0.6",
|
||||
"commands": [
|
||||
"fable"
|
||||
]
|
||||
},
|
||||
"fantomas": {
|
||||
"version": "5.2.2",
|
||||
"commands": [
|
||||
"fantomas"
|
||||
]
|
||||
},
|
||||
"fake-cli": {
|
||||
"version": "6.0.0",
|
||||
"commands": [
|
||||
"fake"
|
||||
]
|
||||
},
|
||||
"dotnet-t4": {
|
||||
"version": "3.0.0",
|
||||
"commands": [
|
||||
"t4"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Note installations that take a while (more than 10s)
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y ca-certificates
|
||||
RUN apt-get install -y ccache
|
||||
RUN apt-get install -y curl
|
||||
RUN apt-get install -y fish
|
||||
RUN apt-get install -y gdb
|
||||
# git-all: ~250s
|
||||
RUN apt-get install -y git-all
|
||||
RUN apt-get install -y gnupg
|
||||
# liblttng-ust-dev: ~30s
|
||||
RUN apt-get install -y liblttng-ust-dev
|
||||
RUN apt-get install -y libssh2-1-dev
|
||||
RUN apt-get install -y locales
|
||||
RUN apt-get install -y ninja-build
|
||||
# openssh-server: ~40s
|
||||
RUN apt-get install -y openssh-server
|
||||
RUN apt-get install -y pkg-config
|
||||
RUN apt-get install -y software-properties-common
|
||||
RUN apt-get install -y sudo
|
||||
RUN apt-get install -y tzdata
|
||||
RUN apt-get install -y vim
|
||||
RUN apt-get install -y zip
|
||||
|
||||
# Python: ~30s
|
||||
RUN apt-get install -y \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
&& python3 -m pip install --upgrade pip
|
||||
|
||||
# GCC
|
||||
ARG gcc_major=13
|
||||
RUN \
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y g++-$gcc_major
|
||||
|
||||
# Clang
|
||||
ARG clang_major=17
|
||||
RUN \
|
||||
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key 2> /dev/null \
|
||||
| gpg --dearmor - \
|
||||
| tee /usr/share/keyrings/llvm-snapshot.gpg > /dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-$clang_major main" \
|
||||
| tee -a "/etc/apt/sources.list.d/llvm.list" \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y \
|
||||
clang-$clang_major \
|
||||
clang-format-$clang_major \
|
||||
clangd-$clang_major
|
||||
|
||||
# CMake
|
||||
RUN \
|
||||
curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc 2> /dev/null \
|
||||
| gpg --dearmor - \
|
||||
| tee /usr/share/keyrings/kitware-archive-keyring.gpg > /dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" \
|
||||
| tee /etc/apt/sources.list.d/kitware.list > /dev/null \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y cmake
|
||||
|
||||
# Dotnet
|
||||
RUN apt-get update && apt-get install -y dotnet7
|
||||
|
||||
# Node
|
||||
ARG node_major=18
|
||||
RUN mkdir -p /etc/apt/keyrings \
|
||||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
|
||||
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_major.x nodistro main" \
|
||||
| tee /etc/apt/sources.list.d/nodesource.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y nodejs
|
||||
|
||||
# Emumba (deps)
|
||||
RUN apt-get update && apt-get -y install rapidjson-dev
|
||||
# Emumba
|
||||
COPY emumba /emumba
|
||||
RUN dpkg -i /emumba/emumba-deribit-connector-3.3.1-Linux.LICENSE_DISABLED.deb \
|
||||
&& rm -r /emumba
|
||||
|
||||
# Pcap
|
||||
RUN apt-get update && apt-get install -y libpcap0.8-dev
|
||||
|
||||
# Databento (deps)
|
||||
RUN apt-get update && apt-get -y install libzstd-dev
|
||||
|
||||
# Docker in Docker
|
||||
RUN apt-get update && apt-get install -y \
|
||||
docker.io \
|
||||
docker-compose \
|
||||
docker-compose-v2
|
||||
|
||||
# Set up default executables (update-alternatives)
|
||||
RUN \
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$clang_major 100; \
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$clang_major 100; \
|
||||
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-$clang_major 100; \
|
||||
update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-$clang_major 100; \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$gcc_major 100; \
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-$gcc_major 100
|
||||
|
||||
# Add compiler symlinks for ccache
|
||||
RUN \
|
||||
ln -s /usr/bin/ccache /usr/local/bin/clang; \
|
||||
ln -s /usr/bin/ccache /usr/local/bin/clang++; \
|
||||
ln -s /usr/bin/ccache /usr/local/bin/clang-$clang_major; \
|
||||
ln -s /usr/bin/ccache /usr/local/bin/clang++-$clang_major; \
|
||||
ln -s /usr/bin/ccache /usr/local/bin/gcc; \
|
||||
ln -s /usr/bin/ccache /usr/local/bin/g++
|
||||
|
||||
RUN locale-gen en_US.UTF-8
|
||||
|
||||
ARG docker_user="bts"
|
||||
ARG docker_uid="1000"
|
||||
ARG docker_pass="bts"
|
||||
|
||||
RUN \
|
||||
groupadd -g "$docker_uid" "$docker_user" \
|
||||
&& useradd \
|
||||
-m \
|
||||
-u "$docker_uid" \
|
||||
-g "$docker_uid" \
|
||||
-G sudo \
|
||||
--password "$(openssl passwd -1 "$docker_pass")" \
|
||||
"$docker_user"
|
||||
|
||||
RUN usermod -aG docker "$docker_user"
|
||||
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"dockerFile": "Dockerfile",
|
||||
// Creates local dir to mount to HOME in docker
|
||||
"initializeCommand": "mkdir -p ${localEnv:HOME}/.bts/devcontainer-mounts/${devcontainerId}",
|
||||
"hostRequirements": {
|
||||
"memory": "4gb",
|
||||
"storage": "6gb"
|
||||
},
|
||||
"postCreateCommand": "/home/bts/spark/docker/sparkd/dev/devcontainer_post_create.sh",
|
||||
"containerUser": "bts",
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/bts/spark,type=bind",
|
||||
"workspaceFolder": "/home/bts/spark",
|
||||
"updateRemoteUserUID": true,
|
||||
"shutdownAction": "none",
|
||||
// Note: If running multiple containers on the same host, each must use a
|
||||
// unique set of ports. Usually we just add 1000 to each port as needed. For
|
||||
// example, if 8000-8003 is taken, go with 9000-9003, then 10000-10003, etc.
|
||||
"runArgs": [
|
||||
"--shm-size",
|
||||
"2gb",
|
||||
"--network",
|
||||
"host"
|
||||
],
|
||||
"mounts": [
|
||||
"source=${localEnv:HOME}/.bts/devcontainer-mounts/${devcontainerId},target=/home/bts,type=bind",
|
||||
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
|
||||
],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"clangd.arguments": [
|
||||
"--compile-commands-dir=${workspaceFolder}/build/clang/debug"
|
||||
]
|
||||
},
|
||||
"extensions": [
|
||||
"eamodio.gitlens",
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"ms-vscode.cmake-tools",
|
||||
"ms-vscode.cpptools"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
this_dir="$(realpath "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")"
|
||||
sudo dpkg -i "$this_dir/emumba-deribit-connector-3.3.1-Linux.LICENSE_DISABLED.deb"
|
||||
@@ -1,265 +0,0 @@
|
||||
# Remove the line below if you want to inherit .editorconfig settings from higher directories
|
||||
root = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
|
||||
#### Core EditorConfig Options ####
|
||||
|
||||
# Indentation and spacing
|
||||
indent_size = 3
|
||||
indent_style = space
|
||||
tab_width = 3
|
||||
|
||||
# New line preferences
|
||||
end_of_line = crlf
|
||||
insert_final_newline = true
|
||||
|
||||
#### .NET Coding Conventions ####
|
||||
|
||||
# Organize usings
|
||||
dotnet_separate_import_directive_groups = true
|
||||
dotnet_sort_system_directives_first = false
|
||||
file_header_template = unset
|
||||
|
||||
# this. and Me. preferences
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_prefer_compound_assignment = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
||||
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||
|
||||
# Field preferences
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
|
||||
# Parameter preferences
|
||||
dotnet_code_quality_unused_parameters = all:suggestion
|
||||
|
||||
# Suppression preferences
|
||||
dotnet_remove_unnecessary_suppression_exclusions = none
|
||||
|
||||
#### C# Coding Conventions ####
|
||||
|
||||
# var preferences
|
||||
csharp_style_var_elsewhere = false:silent
|
||||
csharp_style_var_for_built_in_types = false:silent
|
||||
csharp_style_var_when_type_is_apparent = false:silent
|
||||
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_lambdas = true:silent
|
||||
csharp_style_expression_bodied_local_functions = false:silent
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_prefer_not_pattern = true:suggestion
|
||||
csharp_style_prefer_pattern_matching = true:silent
|
||||
csharp_style_prefer_switch_expression = true:suggestion
|
||||
|
||||
# Null-checking preferences
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
|
||||
# Modifier preferences
|
||||
csharp_prefer_static_local_function = true:suggestion
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
|
||||
|
||||
# Code-block preferences
|
||||
csharp_prefer_braces = true:silent
|
||||
csharp_prefer_simple_using_statement = true:suggestion
|
||||
|
||||
# Expression-level preferences
|
||||
csharp_prefer_simple_default_expression = true:suggestion
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
csharp_style_pattern_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_prefer_index_operator = true:suggestion
|
||||
csharp_style_prefer_range_operator = true:suggestion
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
|
||||
|
||||
# 'using' directive preferences
|
||||
csharp_using_directive_placement = inside_namespace:silent
|
||||
|
||||
#### C# Formatting Rules ####
|
||||
|
||||
# New line preferences
|
||||
csharp_new_line_before_catch = false
|
||||
csharp_new_line_before_else = false
|
||||
csharp_new_line_before_finally = false
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_open_brace = none
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
|
||||
# Indentation preferences
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_case_contents_when_block = true
|
||||
csharp_indent_labels = one_less_than_current
|
||||
csharp_indent_switch_labels = true
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_after_comma = true
|
||||
csharp_space_after_dot = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_after_semicolon_in_for_statement = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_around_declaration_statements = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_before_comma = false
|
||||
csharp_space_before_dot = false
|
||||
csharp_space_before_open_square_brackets = false
|
||||
csharp_space_before_semicolon_in_for_statement = false
|
||||
csharp_space_between_empty_square_brackets = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_preserve_single_line_statements = true
|
||||
|
||||
#### Naming styles ####
|
||||
|
||||
# Naming rules
|
||||
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Symbol specifications
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
# user types
|
||||
dotnet_naming_symbols.user_types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.user_types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.user_types.required_modifiers =
|
||||
|
||||
# non_field_members
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
|
||||
# public symbols
|
||||
dotnet_naming_symbols.public_symbols.applicable_kinds = property,method,field,event,delegate
|
||||
dotnet_naming_symbols.public_symbols.applicable_accessibilities = public,internal
|
||||
|
||||
# parameters
|
||||
dotnet_naming_symbols.parameters.applicable_kinds = parameter
|
||||
dotnet_naming_symbols.parameters.applicable_accessibilities = public,internal,protected,private,protected_internal,private_internal
|
||||
|
||||
# private symbols
|
||||
dotnet_naming_symbols.private_symbols.applicable_kinds = property,method,field,event,delegate
|
||||
dotnet_naming_symbols.private_symbols.applicable_accessibilities = protected,private
|
||||
|
||||
# local symbols
|
||||
dotnet_naming_symbols.local_symbols.applicable_kinds = local
|
||||
|
||||
# parameter symbols
|
||||
dotnet_naming_symbols.parameter_symbols.applicable_kinds = parameter
|
||||
|
||||
# Naming styles
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.camel_case.required_prefix =
|
||||
dotnet_naming_style.camel_case.required_suffix =
|
||||
dotnet_naming_style.camel_case.word_separator =
|
||||
dotnet_naming_style.camel_case.capitalization = camel_case
|
||||
|
||||
dotnet_naming_style.user_types.required_prefix =
|
||||
dotnet_naming_style.user_types.required_suffix =
|
||||
dotnet_naming_style.user_types.word_separator =
|
||||
dotnet_naming_style.user_types.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.interface.required_prefix = I
|
||||
dotnet_naming_style.interface.required_suffix =
|
||||
dotnet_naming_style.interface.word_separator =
|
||||
dotnet_naming_style.interface.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.local.capitalization = camel_case
|
||||
|
||||
dotnet_naming_style.parameter.capitalization = camel_case
|
||||
|
||||
# rules
|
||||
dotnet_naming_rule.user_types.symbols = user_types
|
||||
dotnet_naming_rule.user_types.style = user_types
|
||||
dotnet_naming_rule.user_types.severity = suggestion
|
||||
|
||||
dotnet_naming_rule.interfaces.symbols = interface
|
||||
dotnet_naming_rule.interfaces.style = interface_style
|
||||
dotnet_naming_rule.interfaces.severity = suggestion
|
||||
|
||||
dotnet_naming_rule.public_members.symbols = public_symbols
|
||||
dotnet_naming_rule.public_members.style = pascal_case
|
||||
dotnet_naming_rule.public_members.severity = suggestion
|
||||
|
||||
dotnet_naming_rule.private_members.symbols = private_symbols
|
||||
dotnet_naming_rule.private_members.style = camel_case
|
||||
dotnet_naming_rule.private_members.severity = suggestion
|
||||
|
||||
dotnet_naming_rule.variables_are_camel_case.severity = suggestion
|
||||
dotnet_naming_rule.variables_are_camel_case.symbols = local_symbols
|
||||
dotnet_naming_rule.variables_are_camel_case.style = local
|
||||
|
||||
dotnet_naming_rule.parameters.symbols = parameter_symbols
|
||||
dotnet_naming_rule.parameters.style = parameter
|
||||
dotnet_naming_rule.parameters.severity = suggestion
|
||||
@@ -1,81 +0,0 @@
|
||||
# This file defines the global default configuration for docker deployments.
|
||||
# It is tracked in source control. For temporary modifications, please create
|
||||
# a separate file called ".env.local" (it's in .gitignore, so won't be tracked).
|
||||
# If a variable is defined in both files, the value in .env.local will be used.
|
||||
#
|
||||
# About the deployment procedure:
|
||||
# We use Docker Compose to build images and launch containers for various services
|
||||
# that make up our software suite:
|
||||
# - sparkd
|
||||
# - pubsub
|
||||
# - md-publisher
|
||||
# - webapp (DSQA on the web)
|
||||
# - api-server (websocket based)
|
||||
# From inside a devcontainer, you can launch all services in separate containers
|
||||
# on your machine by running:
|
||||
#
|
||||
# tools/deploy.sh
|
||||
#
|
||||
# This script builds release versions for each service, packaged (generally) in
|
||||
# self-contained directories. Next, it runs a few "docker compose" commands to
|
||||
# build docker images loaded with the self-contained binaries from the previous
|
||||
# step, and start containers with those images to run each service. To view the
|
||||
# commands that deploy.sh runs internally (without actually running them), run:
|
||||
#
|
||||
# tools/deploy.sh --dry-run
|
||||
#
|
||||
# For additional information/help, run:
|
||||
#
|
||||
# tools/deploy.sh --help
|
||||
#
|
||||
|
||||
### Sparkd ###
|
||||
# The internal image for sparkd to use. For more info, view:
|
||||
# src/app_sparkd/Dockerfile
|
||||
SPARKD__IMAGE=sparkd
|
||||
# The 'spark.conf' for this service to use
|
||||
SPARKD__CONF_FILE=src/app_sparkd/spark.conf
|
||||
# To run replay md, put recorded md files in SPARKD__MD_RECORDING_DIR, and use:
|
||||
# SPARKD__IMAGE=sparkd_md_replay
|
||||
# SPARKD__CONF_FILE=src/app_sparkd/spark.local.conf
|
||||
# (configure which md to replay in the new SPARKD__CONF_FILE)
|
||||
SPARKD__MD_RECORDING_DIR=.md_recording
|
||||
SPARKD__SOURCE_DIR=install/sparkd-release-gcc
|
||||
SPARKD__CONFIG_PORT=8000
|
||||
SPARKD__QUICKBUS_PORT=8001
|
||||
SPARKD__SIM_FIX_PORT=8002
|
||||
|
||||
### Pubsub ###
|
||||
# The 'spark.conf' for this service to use
|
||||
PUBSUB__CONF_FILE=src/DataStreamSuite/PubSubServer/spark.conf
|
||||
PUBSUB__CS_SOURCE_DIR=build/Release/bin/net7.0/linux-x64/publish
|
||||
PUBSUB__CPP_SOURCE_DIR=install/data-stream-suite-linux
|
||||
# The appsettings to load at runtime. Expects a file named:
|
||||
# src/DataStreamSuite/PubSub/appsettings.${PUBSUB__DOTNET_ENVIRONMENT}.json
|
||||
PUBSUB__DOTNET_ENVIRONMENT=Staging
|
||||
|
||||
### Md Publisher ###
|
||||
# The 'spark.conf' for this service to use
|
||||
MD_PUBLISHER__CONF_FILE=src/DataStreamSuite/DataStreamPublisher/spark.conf
|
||||
MD_PUBLISHER__SOURCE_DIR=build/Release/bin/net7.0/linux-x64/publish
|
||||
# Determines which appsettings to load at runtime. Expects a file named:
|
||||
# src/DataStreamSuite/DataStreamPublisher/appsettings.${MD_PUBLISHER__DOTNET_ENVIRONMENT}.json
|
||||
MD_PUBLISHER__DOTNET_ENVIRONMENT=MarketData
|
||||
|
||||
### Webapp (DSQA on the web) ###
|
||||
# The 'spark.conf' for this service to use
|
||||
WEBAPP__CONF_FILE=src/client/spark_api_server/spark.conf
|
||||
WEBAPP__SOURCE_DIR=build/Release/bin/net7.0/linux-x64/publish
|
||||
WEBAPP__WEB_ROOT=build/Bts.DataStreamWebApp.Client/production/dist
|
||||
# Determines which appsettings to load at runtime. Expects a file named:
|
||||
# src/DataStreamSuite/Bts.DataStreamWebApp.Server/appsettings.${WEBAPP__ASPNETCORE_ENVIRONMENT}.json
|
||||
WEBAPP__ASPNETCORE_ENVIRONMENT=Staging
|
||||
|
||||
### Api Server ###
|
||||
# The 'spark.conf' for this service to use
|
||||
API_SERVER__CONF_FILE=src/client/spark_api_server/spark.conf
|
||||
API_SERVER__CS_SOURCE_DIR=build/Release/bin/net7.0/linux-x64/publish
|
||||
API_SERVER__CPP_SOURCE_DIR=install/spark-api-server-linux
|
||||
# Determines which appsettings to load at runtime. Expects a file named:
|
||||
# src/client/spark_api_server/appsettings.${API_SERVER__ASPNETCORE_ENVIRONMENT}.json
|
||||
API_SERVER__ASPNETCORE_ENVIRONMENT=Staging
|
||||
@@ -1,4 +0,0 @@
|
||||
*.cmd text=auto eol=crlf
|
||||
*.cs text=auto eol=crlf
|
||||
*.sh text=auto eol=lf
|
||||
*.py text=auto eol=lf
|
||||
@@ -1,16 +1,11 @@
|
||||
nohup.out
|
||||
build/**
|
||||
install/**
|
||||
.build_proxy/
|
||||
build/
|
||||
cmake-build-debug/
|
||||
.cache/
|
||||
.ipynb_checkpoints/
|
||||
.idea/
|
||||
.dir-locals.el
|
||||
*.pyc
|
||||
**.vscode/*
|
||||
!.vscode/launch.json
|
||||
!.vscode/tasks.json
|
||||
.vscode/*
|
||||
!.vscode/*.json
|
||||
.vs
|
||||
obj/
|
||||
*.csproj.user
|
||||
@@ -22,13 +17,10 @@ vcxproj.user
|
||||
src/client/spark/Properties/launchSettings.json
|
||||
compile_commands.json
|
||||
.cquery_cached_index/
|
||||
.cache/*
|
||||
.clangd/*
|
||||
src/client/sparkcmd/Properties/launchSettings.json
|
||||
node_modules
|
||||
paket-files
|
||||
project.lock.json
|
||||
src/.clang-format
|
||||
src/server/sparkd/orderman/perf_analysis/data
|
||||
src/server/sparkd/orderman/perf_analysis/logs/
|
||||
src/server/sparkd/orderman/perf_analysis/trace_data/
|
||||
@@ -42,23 +34,3 @@ trace_data/
|
||||
/doc/user/public/*
|
||||
.ionide/*
|
||||
/.ignore
|
||||
*.rej
|
||||
.clangd/
|
||||
*CMakeDeps.cmake
|
||||
/sniper.ipynb
|
||||
/src/.clang-format
|
||||
/src/server/sparkd/cmds/spartan/analysis/.ipynb_checkpoints
|
||||
/src/server/sparkd/cmds/spartan/analysis/data
|
||||
.tmp/
|
||||
.venv*/
|
||||
.cache/
|
||||
/src/Spark.Admin.WebApp/tsconfig.*.g.json
|
||||
/src/Spark.Admin.WebApp/src/bin/
|
||||
**/CMakeDeps.cmake
|
||||
**/CMakeDeps_win.cmake
|
||||
.devcontainer/
|
||||
*.Generated.cs
|
||||
*.lst
|
||||
src/app_sparkd/spark.local.conf
|
||||
.env.local
|
||||
.md_recording
|
||||
@@ -1,6 +1,9 @@
|
||||
[submodule "externals"]
|
||||
path = externals
|
||||
url = https://bitbucket.org/bluetradesys/externals.git
|
||||
[submodule "vcpkg"]
|
||||
path = vcpkg
|
||||
url = https://github.com/microsoft/vcpkg.git
|
||||
url = git@bitbucket.org:bluetradesys/externals.git
|
||||
[submodule "docker/linux"]
|
||||
path = docker/linux
|
||||
url = git@bitbucket.org:bluetradesys/linux_docker.git
|
||||
[submodule "docker/windows"]
|
||||
path = docker/windows
|
||||
url = git@bitbucket.org:bluetradesys/windows_docker.git
|
||||
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "Windows",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include"
|
||||
],
|
||||
"defines": [
|
||||
"__linux__",
|
||||
"__x86_64__"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/*"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "WindowsQuick",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include"
|
||||
],
|
||||
"defines": [
|
||||
"__linux__",
|
||||
"__x86_64__"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceRoot}/src"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": "${workspaceRoot}/.vscode/browse.vc.db"
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
@@ -1,369 +1,371 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach"
|
||||
},
|
||||
{
|
||||
"name": "Api Server",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "",
|
||||
"windows": {
|
||||
"preLaunchTask": "Build Api Server (Debug)",
|
||||
"program": "spark_api_server.exe",
|
||||
"args": [
|
||||
"run",
|
||||
],
|
||||
"cwd": "build/Debug/bin/net7.0",
|
||||
},
|
||||
"linux": {
|
||||
"preLaunchTask": "Build Api Server (Debug)",
|
||||
"program": "spark_api_server",
|
||||
"args": [
|
||||
"run",
|
||||
],
|
||||
"cwd": "build/Debug/bin/net7.0",
|
||||
},
|
||||
"env": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "Api Server (Skip Build)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "",
|
||||
"windows": {
|
||||
"program": "spark_api_server.exe",
|
||||
"args": [
|
||||
"run",
|
||||
],
|
||||
"cwd": "build/Debug/bin/net7.0",
|
||||
},
|
||||
"linux": {
|
||||
"program": "spark_api_server",
|
||||
"args": [
|
||||
"run",
|
||||
],
|
||||
"cwd": "build/Debug/bin/net7.0",
|
||||
},
|
||||
"env": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "Bts.DataStreamWebApp.Server",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Build DataStream (Debug)",
|
||||
"program": "${workspaceFolder}/build/Debug/bin/net7.0/Bts.DataStreamWebApp.Server.dll",
|
||||
"cwd": "${workspaceFolder}/build/Debug/bin/net7.0",
|
||||
"env": {
|
||||
"ASPNETCORE_HTTP_PORT": "8080",
|
||||
"ASPNETCORE_HTTPS_PORT": "8443",
|
||||
"ASPNETCORE_ENVIRONMENT": "${input:dataStreamWebAppServerEnvironment}",
|
||||
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy",
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Bts.DataStreamWebApp.Server (Skip Build)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/Debug/bin/net7.0/Bts.DataStreamWebApp.Server.dll",
|
||||
"cwd": "${workspaceFolder}/build/Debug/bin/net7.0",
|
||||
"env": {
|
||||
"ASPNETCORE_HTTP_PORT": "8080",
|
||||
"ASPNETCORE_HTTPS_PORT": "8443",
|
||||
"ASPNETCORE_ENVIRONMENT": "${input:dataStreamWebAppServerEnvironment}",
|
||||
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy",
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "DataStreamPublisher",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Build DataStream (Debug)",
|
||||
"program": "",
|
||||
"linux": {
|
||||
"program": "DataStreamPublisher",
|
||||
},
|
||||
"windows": {
|
||||
"program": "DataStreamPublisher.exe",
|
||||
},
|
||||
"env": {
|
||||
"DOTNET_ENVIRONMENT": "${input:dataStreamPublisherEnvironment}",
|
||||
},
|
||||
"cwd": "${workspaceFolder}/build/Debug/bin/net7.0",
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "DataStreamPublisher (Skip Build)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "",
|
||||
"linux": {
|
||||
"program": "DataStreamPublisher",
|
||||
},
|
||||
"windows": {
|
||||
"program": "DataStreamPublisher.exe",
|
||||
},
|
||||
"env": {
|
||||
"DOTNET_ENVIRONMENT": "${input:dataStreamPublisherEnvironment}",
|
||||
},
|
||||
"cwd": "${workspaceFolder}/build/Debug/bin/net7.0",
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/sparkd-debug-clang/server/sparkd",
|
||||
"args": ["run"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/sparkd-debug-clang/server",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
},
|
||||
{
|
||||
"name": "DataStreamQueryAnalyzer",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Build DataStreamQueryAnalyzer (Debug)",
|
||||
"program": "",
|
||||
"windows": {
|
||||
"program": "DataStreamQueryAnalyzer.exe",
|
||||
"args": [
|
||||
"--config",
|
||||
"${workspaceFolder}/src/DataStreamSuite/DataStreamQueryAnalyzer/Configurations/DataStreamQueryAnalyzer.json"
|
||||
],
|
||||
"cwd": "build/Debug/bin/net7.0-windows",
|
||||
"env": {
|
||||
"PYTHON_EXE": "${workspaceFolder}/.venv/Scripts/python.exe"
|
||||
},
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal",
|
||||
},
|
||||
{
|
||||
"name": "PubSubServer",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Build DataStream (Debug)",
|
||||
"program": "",
|
||||
"linux": {
|
||||
"program": "PubSubServer",
|
||||
},
|
||||
"windows": {
|
||||
"program": "PubSubServer.exe",
|
||||
},
|
||||
"cwd": "build/Debug/bin/net7.0",
|
||||
"env": {
|
||||
"DOTNET_ENVIRONMENT": "${input:pubSubServerEnvironment}",
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "PubSubServer (Skip Build)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "",
|
||||
"linux": {
|
||||
"program": "PubSubServer",
|
||||
},
|
||||
"windows": {
|
||||
"program": "PubSubServer.exe",
|
||||
},
|
||||
"cwd": "build/Debug/bin/net7.0",
|
||||
"env": {
|
||||
"DOTNET_ENVIRONMENT": "${input:pubSubServerEnvironment}",
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "Spark",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "",
|
||||
"windows": {
|
||||
"preLaunchTask": "Build Spark (Debug)",
|
||||
"program": "Spark.exe",
|
||||
"args": [
|
||||
"--sparkd",
|
||||
"http://127.0.0.1:8000/config"
|
||||
],
|
||||
"cwd": "build/Debug/bin/net7.0-windows",
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "Spark (Parameterized)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Build Spark (Debug)",
|
||||
"program": "",
|
||||
"windows": {
|
||||
"program": "Spark.exe",
|
||||
"args": [
|
||||
"--sparkd",
|
||||
"${input:sparkConfigServer}"
|
||||
],
|
||||
"cwd": "build/Debug/bin/net7.0-windows",
|
||||
},
|
||||
"stopAtEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "Sparkd",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Build Sparkd (Debug | Clang)",
|
||||
"program": "",
|
||||
"linux": {
|
||||
"program": "${workspaceFolder}/build/sparkd-debug-clang/src/app_sparkd/sparkd",
|
||||
},
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/build/sparkd-debug-clang/src/app_sparkd",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Sparkd (Skip Build)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "",
|
||||
"linux": {
|
||||
"program": "${workspaceFolder}/build/sparkd-debug-clang/src/app_sparkd/sparkd",
|
||||
},
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/build/sparkd-debug-clang/src/app_sparkd",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Sparkd Web (Skip Build)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "",
|
||||
"linux": {
|
||||
"program": "${workspaceFolder}/build/sparkd-debug-clang/src/app_sparkd/sparkd",
|
||||
},
|
||||
"args": [
|
||||
"web"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/build/sparkd-debug-clang/src/app_sparkd",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "dataStreamPublisherEnvironment",
|
||||
"type": "pickString",
|
||||
"description": "Publisher Configuration",
|
||||
"options": [
|
||||
"Development",
|
||||
"MarketData",
|
||||
"Production",
|
||||
"ProductionAws",
|
||||
"Staging",
|
||||
],
|
||||
"default": "MarketDataPublisher",
|
||||
},
|
||||
{
|
||||
"id": "pubSubServerEnvironment",
|
||||
"type": "pickString",
|
||||
"description": "PubSub Configuration",
|
||||
"options": [
|
||||
"Development",
|
||||
"EchoServer",
|
||||
"Production",
|
||||
"ProductionAws",
|
||||
"Staging",
|
||||
],
|
||||
"default": "Development",
|
||||
},
|
||||
{
|
||||
"id": "dataStreamWebAppServerEnvironment",
|
||||
"type": "pickString",
|
||||
"description": "DataStream WebApp Environment",
|
||||
"options": [
|
||||
"Development",
|
||||
"Production",
|
||||
"ProductionAws",
|
||||
"Staging",
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sparkConfigServer",
|
||||
"type": "promptString",
|
||||
"description": "Config Server URL",
|
||||
"default": "http://localhost:8000/config",
|
||||
},
|
||||
{
|
||||
"id": "isSparkApiEnabled",
|
||||
"type": "pickString",
|
||||
"description": "Enable Spark Api (connect to sparkd)",
|
||||
"options": [
|
||||
"True",
|
||||
"False",
|
||||
],
|
||||
"default": "True",
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "SparkVM Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/ninja_debug/server/sparkd",
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Skip STL",
|
||||
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "LD LIBRARY",
|
||||
"text": "set env LD_LIBRARY_PATH=.",
|
||||
"ignoreFailures": false
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/ninja_debug/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceRoot}/build/ninja_debug/src/server/sparkd",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Client Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/spark.exe",
|
||||
"args": [],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "SDK Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/spark_sdk.exe",
|
||||
"args": [
|
||||
"md",
|
||||
"GLBX",
|
||||
"Future",
|
||||
"CL",
|
||||
"CLZ9",
|
||||
"--user=bts",
|
||||
"--pass="
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Excel Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "C:/Program Files/Microsoft Office/Office14/EXCEL.EXE",
|
||||
"args": [
|
||||
"${workspaceRoot}/build/Debug/bin/net471/spark_excel-addin64-packed.xll"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Client Tests",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
|
||||
"args": [
|
||||
"test",
|
||||
"ApiUpdateTests"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Client Attach",
|
||||
"type": "clr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickProcess}"
|
||||
},
|
||||
{
|
||||
"name": "Spreader Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/ninja_debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[spreader]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Admin Service Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[admin_service]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Limiter Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[limiter]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MD Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/ninja_debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[algo]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Skip STL",
|
||||
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SparkVM attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"MIMode": "gdb",
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Python",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"stopOnEntry": false,
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"program": "${file}",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {},
|
||||
"envFile": "${workspaceRoot}/.env",
|
||||
"args": [
|
||||
"DEBUG"
|
||||
],
|
||||
"debugOptions": [
|
||||
"WaitOnAbnormalExit",
|
||||
"WaitOnNormalExit",
|
||||
"RedirectOutput"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Remote Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"pipeTransport": {
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/home/bts/vsdbg/vsdbg",
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"quoteArgs": true
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
},
|
||||
"justMyCode": true
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Remote Launch",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "/usr/bin/dotnet",
|
||||
"args": [
|
||||
"sparkcmd.dll",
|
||||
"test",
|
||||
"test_join_create_and_takeout_market"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/server",
|
||||
"pipeTransport": {
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/home/bts/vsdbg/vsdbg",
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"quoteArgs": true
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
},
|
||||
"justMyCode": false
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"utility": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"list": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"vector": "cpp",
|
||||
"xhash": "cpp",
|
||||
"xstring": "cpp",
|
||||
"system_error": "cpp",
|
||||
"array": "cpp",
|
||||
"string_view": "cpp"
|
||||
"xutility": "cpp",
|
||||
"*.ipp": "cpp"
|
||||
}
|
||||
}
|
||||
@@ -1,117 +1,66 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(spark)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
if(WIN32)
|
||||
set(platform "windows")
|
||||
else()
|
||||
set(platform "linux")
|
||||
endif()
|
||||
|
||||
set(
|
||||
EXTERNALS_ROOT
|
||||
"${CMAKE_SOURCE_DIR}/externals/${platform}"
|
||||
CACHE
|
||||
STRING
|
||||
"External dependencies root folder (should contain folders: lib, bin, include")
|
||||
|
||||
# SHARED_MEMORY_PREFIX serves as a kind of namespace so multiple applications
|
||||
# can run simultaneously without fighting over the same shm files (e.g., sparkd,
|
||||
# api server, etc.).
|
||||
set(SHARED_MEMORY_PREFIX "\${BTS_SHARED_MEMORY_PREFIX}" CACHE STRING "Prefix to use when creating shared memory files")
|
||||
set(EXTERNALS_BIN "${EXTERNALS_ROOT}/bin")
|
||||
set(EXTERNALS_INCLUDE "${EXTERNALS_ROOT}/include")
|
||||
set(EXTERNALS_LIB "${EXTERNALS_ROOT}/lib/$<CONFIG>")
|
||||
set(BUILD_DOCS OFF CACHE BOOL "Build documentation")
|
||||
set(BUILD_SDK OFF CACHE BOOL "Build the sdk")
|
||||
set(EXPORT_MD_CONSUMER OFF CACHE BOOL "Export (extern) C functions for MD consumer interop")
|
||||
if (WIN32)
|
||||
set(BUILD_SPARKD OFF CACHE BOOL "Build sparkd")
|
||||
set(BUILD_ADMIN_WEB_APP OFF CACHE BOOL "Build the Admin WebApp")
|
||||
else()
|
||||
set(BUILD_SPARKD ON CACHE BOOL "Build sparkd")
|
||||
set(BUILD_ADMIN_WEB_APP ON CACHE BOOL "Build the Admin WebApp")
|
||||
endif()
|
||||
set (platform "windows")
|
||||
else ()
|
||||
set (platform "linux")
|
||||
endif ()
|
||||
|
||||
add_compile_definitions(SHARED_MEMORY_PREFIX="${SHARED_MEMORY_PREFIX}")
|
||||
if(DEFINED APP_DATA_DIR)
|
||||
add_compile_definitions(APP_DATA_DIR="${APP_DATA_DIR}")
|
||||
endif()
|
||||
add_compile_definitions(EXPORT_MD_CONSUMER="${EXPORT_MD_CONSUMER}")
|
||||
set (EXTERNALS_ROOT "${CMAKE_SOURCE_DIR}/externals/${platform}")
|
||||
set (SPARK_PYTHON "${EXTERNALS_ROOT}/python")
|
||||
set (SPARK_BIN "${EXTERNALS_ROOT}/bin")
|
||||
set (SPARK_INCLUDE "${EXTERNALS_ROOT}/include")
|
||||
set (SPARK_LIB "${EXTERNALS_ROOT}/lib/${CMAKE_BUILD_TYPE}")
|
||||
|
||||
if(BUILD_SPARKD)
|
||||
# Note: All macros that begin w/ 'CCAPI' are ccapi's macros (defined and/or
|
||||
# read by their code). We override some below.
|
||||
add_compile_definitions(SPARK_ENABLE_CCAPI)
|
||||
include_directories (BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
|
||||
link_directories (${SPARK_LIB})
|
||||
|
||||
# This allows us to override hardcoded exchange-urls with ones read from
|
||||
# config (i.e., resolved at runtime rather than compile-time)
|
||||
add_compile_definitions(CCAPI_EXPOSE_INTERNAL)
|
||||
if (WIN32)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
||||
/MP \
|
||||
/WX /wd4251 /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 \
|
||||
/DCURL_STATICLIB \
|
||||
/D_WINSOCK_DEPRECATED_NO_WARNINGS \
|
||||
/D__TBB_NO_IMPLICIT_LINKAGE \
|
||||
/DBOOST_ALL_NO_LIB \
|
||||
/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600")
|
||||
|
||||
# Enable ccapi services
|
||||
add_compile_definitions(CCAPI_ENABLE_SERVICE_MARKET_DATA)
|
||||
add_compile_definitions(CCAPI_ENABLE_SERVICE_EXECUTION_MANAGEMENT)
|
||||
# Enable ccapi exchanges
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_BINANCE)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_BINANCE_COIN_FUTURES)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_BINANCE_US)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_BINANCE_USDS_FUTURES)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_COINBASE)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_DERIBIT)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_OKX)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} /MT")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF /LTCG")
|
||||
|
||||
set(CCAPI_LOG_LEVEL
|
||||
"Warn"
|
||||
CACHE STRING "<Fatal|Error|Warn|Info|Debug|Trace> Log level for ccapi")
|
||||
string(TOUPPER "${CCAPI_LOG_LEVEL}" _ccapi_log_level_upper)
|
||||
add_compile_definitions("CCAPI_ENABLE_LOG_${_ccapi_log_level_upper}")
|
||||
add_subdirectory(src/lib)
|
||||
else ()
|
||||
# so that sparkd looks for libspark.so in its directory
|
||||
set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set (CMAKE_INSTALL_RPATH ".")
|
||||
|
||||
# ** Binance **
|
||||
add_compile_definitions(CCAPI_BINANCE_URL_REST_BASE="https://api.binance.com")
|
||||
add_compile_definitions(BINANCE_INSTRUMENTS_PATH="/api/v3/exchangeInfo")
|
||||
add_compile_definitions(BINANCE_PRICE_STATS_PATH="/api/v3/ticker/24hr")
|
||||
|
||||
# ** Binance US **
|
||||
add_compile_definitions(BINANCE_US_INSTRUMENTS_PATH="/api/v3/exchangeInfo")
|
||||
add_compile_definitions(BINANCE_US_PRICE_STATS_PATH="/api/v3/ticker/24hr")
|
||||
|
||||
# ** Binance USDS Futures **
|
||||
add_compile_definitions(CCAPI_BINANCE_USDS_FUTURES_URL_REST_BASE="https://dapi.binance.com")
|
||||
add_compile_definitions(BINANCE_USDS_FUTURES_INSTRUMENTS_PATH="/dapi/v1/exchangeInfo")
|
||||
add_compile_definitions(BINANCE_USDS_FUTURES_PRICE_STATS_PATH="/dapi/v1/ticker/24hr")
|
||||
|
||||
# ** Deribit **
|
||||
add_compile_definitions(DERIBIT_INSTRUMENT_PATH="/api/v2/public/get_instrument")
|
||||
add_compile_definitions(DERIBIT_INSTRUMENTS_PATH="/api/v2/public/get_instruments")
|
||||
add_compile_definitions(DERIBIT_COMBOS_PATH="/api/v2/public/get_combos")
|
||||
add_compile_definitions(DERIBIT_TICKER_PATH="/api/v2/public/ticker")
|
||||
add_compile_definitions(DERIBIT_CURRENCIES_METHOD="public/get_currencies")
|
||||
add_compile_definitions(DERIBIT_INSTRUMENT_METHOD="public/get_instrument")
|
||||
add_compile_definitions(DERIBIT_INSTRUMENTS_METHOD="public/get_instruments")
|
||||
add_compile_definitions(DERIBIT_COMBO_DETAILS_METHOD="public/get_combo_details")
|
||||
add_compile_definitions(DERIBIT_COMBOS_METHOD="public/get_combos")
|
||||
|
||||
# ** Okx **
|
||||
add_compile_definitions(OKX_INSTRUMENTS_PATH="/api/v5/public/instruments")
|
||||
add_compile_definitions(OKX_UNDERLYING_PATH="/api/v5/public/underlying")
|
||||
endif()
|
||||
|
||||
# subdirs
|
||||
add_subdirectory(src/lib_system)
|
||||
add_subdirectory(src/lib_domain)
|
||||
add_subdirectory(src/lib_http)
|
||||
if (BUILD_SPARKD)
|
||||
add_subdirectory(src/lib_python_md)
|
||||
add_subdirectory(src/app_sparkd)
|
||||
add_subdirectory(src/data_files)
|
||||
endif()
|
||||
add_subdirectory(src/lib_spark)
|
||||
if (BUILD_ADMIN_WEB_APP)
|
||||
add_subdirectory(src/Spark.Admin.WebApp)
|
||||
endif()
|
||||
if(BUILD_DOCS)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} \
|
||||
-fPIC -Wall -pedantic -Wextra -Werror \
|
||||
-Wno-missing-braces -Wno-ignored-qualifiers \
|
||||
--std=c++17 -fdiagnostics-color")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -DNDEBUG -O3")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wno-undef")
|
||||
add_subdirectory(src/server/sparkd)
|
||||
add_subdirectory(src/lib)
|
||||
add_subdirectory(src/web)
|
||||
add_subdirectory(doc/user)
|
||||
endif()
|
||||
if(BUILD_SDK)
|
||||
add_subdirectory(src/sdk)
|
||||
add_subdirectory(src/data_files)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/src/server/sparkd/sparkd ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/web ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/data_files ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/src/lib/libspark.so ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libOnixS.IceImpactMulticastPriceFeedHandlerCpp.so.3.13.0.0 ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libACE-5.7.5.so ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins
|
||||
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/sdk/examples/order_plugin_example.so ${CMAKE_BINARY_DIR}/server/plugins/
|
||||
COMMENT "Creating server runtime layout"
|
||||
DEPENDS sparkd data_files_dir)
|
||||
|
||||
add_custom_target(server_layout ALL DEPENDS ${CMAKE_BINARY_DIR}/server)
|
||||
endif()
|
||||
@@ -1,419 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 23,
|
||||
"patch": 0
|
||||
},
|
||||
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "spark",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"environment": {
|
||||
"SPARK_CMAKE_CXX_FLAGS": "/MP /WX /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 /bigobj /EHsc /DCURL_STATICLIB /D_WINSOCK_DEPRECATED_NO_WARNINGS /D__TBB_NO_IMPLICIT_LINKAGE /DBOOST_ALL_NO_LIB /std:c++20 /D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_CXX_FLAGS": "$env{SPARK_CMAKE_CXX_FLAGS}",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "$env{SPARK_CMAKE_CXX_FLAGS} /MTd",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "$env{SPARK_CMAKE_CXX_FLAGS} /MT",
|
||||
"CMAKE_CXX_STANDARD": "20",
|
||||
"CMAKE_SHARED_LINKER_FLAGS_DEBUG": "/DEBUG",
|
||||
"CMAKE_SHARED_LINKER_FLAGS_RELEASE": "/OPT:REF /OPT:ICF /LTCG",
|
||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||
"EXTERNALS_ROOT": "${sourceDir}/externals/windows",
|
||||
"CONFIG_DEFAULTS_PATH": "spark/config/profiles/default/*.conf",
|
||||
"DOTNET_BINARY_DIR": "${sourceDir}/build/$<CONFIG>/bin/net7.0;${sourceDir}/build/$<CONFIG>/bin/net7.0-windows",
|
||||
"EXPORT_MD_CONSUMER": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"platform": "",
|
||||
"CMAKE_CXX_STANDARD": "20",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}",
|
||||
"CMAKE_PREFIX_PATH": "${sourceDir}/cmake/;${sourceDir}/.venv/lib/python3.10/site-packages/pybind11/share/cmake/pybind11",
|
||||
"CMAKE_EXE_LINKER_FLAGS": "-Wno-undef",
|
||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||
"EXTERNALS_ROOT": "${sourceDir}/externals/linux",
|
||||
"BUILD_SDK": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"BUILD_ADMIN_WEB_APP": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-debug",
|
||||
"inherits": "sparkd",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CCAPI_LOG_LEVEL": "Info",
|
||||
"CONFIG_DEFAULTS_PATH": "spark/config/profiles/md_dev/*.conf;spark/config/profiles/default/*.conf"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-release",
|
||||
"inherits": "sparkd",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CCAPI_LOG_LEVEL": "Warn",
|
||||
"CONFIG_DEFAULTS_PATH": "spark/config/profiles/md_prod/*.conf;spark/config/profiles/default/*.conf"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-debug-clang",
|
||||
"inherits": "sparkd-debug",
|
||||
"displayName": "Sparkd (Debug | Clang)",
|
||||
"description": "Debug build compiled w/ clang",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-g -fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++20 -fdiagnostics-color -DDEBUG"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-debug-gcc",
|
||||
"inherits": "sparkd-debug",
|
||||
"displayName": "Sparkd (Debug | Gcc)",
|
||||
"description": "Debug build compiled w/ gcc",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "gcc",
|
||||
"CMAKE_CXX_COMPILER": "g++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-g -fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++20 -fdiagnostics-color -Wno-stringop-overread -DDEBUG"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-release-clang",
|
||||
"inherits": "sparkd-release",
|
||||
"displayName": "Sparkd (Release | Clang)",
|
||||
"description": "Release build compiled w/ clang",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++20 -fdiagnostics-color -fno-omit-frame-pointer -DNDEBUG -O3"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-release-gcc",
|
||||
"inherits": "sparkd-release",
|
||||
"displayName": "Sparkd (Release | Gcc)",
|
||||
"description": "Release build compiled w/ gcc",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "gcc",
|
||||
"CMAKE_CXX_COMPILER": "g++",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers -Wno-stringop-overflow --std=c++20 -fdiagnostics-color -Wno-stringop-overread -Wno-maybe-uninitialized -fno-omit-frame-pointer -DNDEBUG -O3"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-windows",
|
||||
"inherits": "spark",
|
||||
"displayName": "Spark Api Server (Windows)"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-linux",
|
||||
"inherits": "sparkd",
|
||||
"displayName": "Spark Api Server (Linux)",
|
||||
"generator": "Ninja Multi-Config",
|
||||
"cacheVariables": {
|
||||
"BUILD_ADMIN_WEB_APP": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"BUILD_SPARKD": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-g -fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++20 -fdiagnostics-color -DDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++20 -fdiagnostics-color -fno-omit-frame-pointer -DNDEBUG -O3",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CONFIG_DEFAULTS_PATH": "spark/config/profiles/default/*.conf",
|
||||
"DOTNET_BINARY_DIR": "${sourceDir}/build/$<CONFIG>/bin/net7.0",
|
||||
"EXPORT_MD_CONSUMER": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-publish",
|
||||
"inherits": "sparkd-release-gcc",
|
||||
"displayName": "Publish",
|
||||
"description": "Production build compiled w/ gcc and ready to ship"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-ccapi-diag",
|
||||
"inherits": "sparkd-debug-clang",
|
||||
"displayName": "Debug (ccapi diag)",
|
||||
"description": "Debug build w/ ccapi log level 'Trace'",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"CCAPI_LOG_LEVEL": "Trace"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "data-stream-suite-windows",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"inherits": "spark",
|
||||
"displayName": "Data Stream Suite (Windows)",
|
||||
"description": "Data Stream utils ported over from Edge",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"CONFIG_DEFAULTS_PATH": "spark/config/profiles/default/*.conf;spark/config/profiles/data_stream/*.conf",
|
||||
"DOTNET_BINARY_DIR": "${sourceDir}/build/$<CONFIG>/bin/net7.0;${sourceDir}/build/$<CONFIG>/bin/net7.0-windows"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "data-stream-suite-linux",
|
||||
"displayName": "Data Stream Suite (Linux)",
|
||||
"description": "Data Stream utils ported over from Edge",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"inherits": "sparkd",
|
||||
"generator": "Ninja Multi-Config",
|
||||
"cacheVariables": {
|
||||
"BUILD_ADMIN_WEB_APP": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"BUILD_SDK": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"BUILD_SPARKD": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-g -fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++20 -fdiagnostics-color -DDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++20 -fdiagnostics-color -fno-omit-frame-pointer -DNDEBUG -O3",
|
||||
"CONFIG_DEFAULTS_PATH": "spark/config/profiles/default/*.conf;spark/config/profiles/data_stream/*.conf",
|
||||
"DOTNET_BINARY_DIR": "${sourceDir}/build/$<CONFIG>/bin/net7.0;${sourceDir}/build/$<CONFIG>/bin/net8.0",
|
||||
"EXPORT_MD_CONSUMER": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "spark",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"hidden": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-debug",
|
||||
"displayName": "Spark (Debug)",
|
||||
"inherits": "spark",
|
||||
"configurePreset": "spark",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-release",
|
||||
"displayName": "Spark (Release)",
|
||||
"inherits": "spark",
|
||||
"configurePreset": "spark",
|
||||
"configuration": "Release"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"hidden": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-debug-clang",
|
||||
"configurePreset": "sparkd-debug-clang",
|
||||
"displayName": "Sparkd (Debug | Clang)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-debug-clang-j6",
|
||||
"configurePreset": "sparkd-debug-clang",
|
||||
"displayName": "Sparkd (Debug | Clang | jobs=6)",
|
||||
"inherits": "sparkd",
|
||||
"jobs": 6
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-debug-gcc",
|
||||
"configurePreset": "sparkd-debug-gcc",
|
||||
"displayName": "Sparkd (Debug | Gcc)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-release-clang",
|
||||
"configurePreset": "sparkd-release-clang",
|
||||
"displayName": "Sparkd (Release | Clang)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-release-gcc",
|
||||
"configurePreset": "sparkd-release-gcc",
|
||||
"displayName": "Sparkd (Release | Gcc)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-windows",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"hidden": true,
|
||||
"configurePreset": "spark-api-server-windows"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-windows-debug",
|
||||
"displayName": "Spark Api Server (Windows | Debug)",
|
||||
"inherits": "spark-api-server-windows",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-windows-release",
|
||||
"displayName": "Spark Api Server (Windows | Release)",
|
||||
"inherits": "spark-api-server-windows",
|
||||
"configuration": "Release"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-linux",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"hidden": true,
|
||||
"configurePreset": "spark-api-server-linux"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-linux-debug",
|
||||
"inherits": "spark-api-server-linux",
|
||||
"displayName": "Spark Api Server (Linux | Debug)",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-api-server-linux-release",
|
||||
"inherits": "spark-api-server-linux",
|
||||
"displayName": "Spark Api Server (Linux | Release)",
|
||||
"configuration": "Release"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-publish",
|
||||
"configurePreset": "sparkd-publish",
|
||||
"displayName": "Publish",
|
||||
"inherits": "sparkd",
|
||||
"targets": "install"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-ccapi-diag",
|
||||
"configurePreset": "sparkd-ccapi-diag",
|
||||
"displayName": "Debug (ccapi diag)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "data-stream-suite-windows-debug",
|
||||
"displayName": "Data Stream Suite (Windows | Debug)",
|
||||
"configurePreset": "data-stream-suite-windows",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "data-stream-suite-windows-release",
|
||||
"displayName": "Data Stream Suite (Windows | Release)",
|
||||
"configurePreset": "data-stream-suite-windows",
|
||||
"configuration": "Release"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "data-stream-suite-linux-debug",
|
||||
"displayName": "Data Stream Suite (Linux | Debug)",
|
||||
"configurePreset": "data-stream-suite-linux",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "data-stream-suite-linux-release",
|
||||
"displayName": "Data Stream Suite (Linux | Release)",
|
||||
"configurePreset": "data-stream-suite-linux",
|
||||
"configuration": "Release"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32922.545
|
||||
MinimumVisualStudioVersion = 15.0.26124.0
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_api", "src\client\spark_api\spark_api.csproj", "{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_core", "src\client\spark_core\spark_core.csproj", "{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_websocket", "src\client\spark_websocket\spark_websocket.csproj", "{3201359D-C071-4089-9EDE-B04D759F1508}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_api_server", "src\client\spark_api_server\spark_api_server.csproj", "{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "spark_test", "src\client\spark_test\spark_test.csproj", "{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spark.Console", "src\client\Spark.Console\Spark.Console.csproj", "{89D666E6-B500-498F-B026-4D167F68ADFC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bts.Net", "src\DataStreamSuite\Bts.Net\Bts.Net.csproj", "{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStreamCore", "src\DataStreamSuite\DataStreamCore\DataStreamCore.csproj", "{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStream", "src\DataStreamSuite\DataStream\DataStream.csproj", "{05995ED5-650A-4955-9DFC-3242B737E77A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedStreams", "src\DataStreamSuite\SharedStreams\SharedStreams.csproj", "{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PubSub", "src\DataStreamSuite\PubSub\PubSub.csproj", "{EFA9F78D-083E-457A-BABB-9386C88C32C0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
MinSizeRel|x64 = MinSizeRel|x64
|
||||
Release|x64 = Release|x64
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Debug|x64.Build.0 = Debug|x64
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Release|x64.ActiveCfg = Release|x64
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Release|x64.Build.0 = Release|x64
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Debug|x64.Build.0 = Debug|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Release|x64.ActiveCfg = Release|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Release|x64.Build.0 = Release|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.Debug|x64.Build.0 = Debug|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.MinSizeRel|x64.ActiveCfg = Debug|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.MinSizeRel|x64.Build.0 = Debug|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.Release|x64.ActiveCfg = Release|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.Release|x64.Build.0 = Release|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{3201359D-C071-4089-9EDE-B04D759F1508}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.Debug|x64.Build.0 = Debug|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.MinSizeRel|x64.ActiveCfg = Debug|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.MinSizeRel|x64.Build.0 = Debug|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.Release|x64.ActiveCfg = Release|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.Release|x64.Build.0 = Release|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{2B8C5D01-FF78-4BFA-B332-5E430586DAF9}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.Debug|x64.Build.0 = Debug|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.MinSizeRel|x64.ActiveCfg = Debug|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.MinSizeRel|x64.Build.0 = Debug|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.Release|x64.ActiveCfg = Release|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.Release|x64.Build.0 = Release|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.RelWithDebInfo|x64.ActiveCfg = Debug|x64
|
||||
{EFC9FC4D-E92B-4C6D-9B97-26D38EAA118D}.RelWithDebInfo|x64.Build.0 = Debug|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.Debug|x64.Build.0 = Debug|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.MinSizeRel|x64.ActiveCfg = Debug|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.MinSizeRel|x64.Build.0 = Debug|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.Release|x64.ActiveCfg = Release|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.Release|x64.Build.0 = Release|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.RelWithDebInfo|x64.ActiveCfg = Debug|x64
|
||||
{89D666E6-B500-498F-B026-4D167F68ADFC}.RelWithDebInfo|x64.Build.0 = Debug|x64
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
||||
{CCDCB00A-CABF-4D82-8A5F-33EEC8ACE51D}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
||||
{CB62D5D2-3495-4488-BFBC-7C7A3725A1EE}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
||||
{05995ED5-650A-4955-9DFC-3242B737E77A}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
||||
{A8B861DE-E098-4291-98EE-76AA0F5F5A7B}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
|
||||
{EFA9F78D-083E-457A-BABB-9386C88C32C0}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {422D1620-0166-4C26-9A81-CA8A2EB1AB58}
|
||||
EndGlobalSection
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,7 +0,0 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
macro(export_to_parent)
|
||||
foreach(var IN ITEMS ${ARGN})
|
||||
set(${var} ${${var}} PARENT_SCOPE)
|
||||
endforeach()
|
||||
endmacro()
|
||||
@@ -1,142 +0,0 @@
|
||||
include_guard(DIRECTORY)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/ExportToParent.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/InstallBasic.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/ProtobufGenerateCpp.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/SetFirstDefined.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/safe_dep_glob.cmake)
|
||||
|
||||
function(init_library)
|
||||
set(_options SHARED STATIC)
|
||||
set(_one_value_args
|
||||
NAME
|
||||
SOURCE_DIR
|
||||
INCLUDE_DIR
|
||||
)
|
||||
set(_multi_value_args)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
if (_ARGS_SHARED AND _ARGS_STATIC)
|
||||
message(FATAL_ERROR "Invalid args passed to init_library: cannot specify STATIC and SHARED")
|
||||
endif()
|
||||
set_first_defined(_name _ARGS_NAME PROJECT_NAME)
|
||||
set_first_defined(_source_dir _ARGS_SOURCE_DIR _name)
|
||||
set_first_defined(_include_dir _ARGS_INCLUDE_DIR _source_dir)
|
||||
|
||||
# Cpp sources
|
||||
file(
|
||||
GLOB_RECURSE ${_name}_SOURCES
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${_source_dir}/*.cpp
|
||||
)
|
||||
# Note: cpp files inside 'tests' dir(s) are considered tests.
|
||||
# Remove tests from main sources, and add them to test sources
|
||||
foreach(item ${${_name}_SOURCES})
|
||||
if(${item} MATCHES "tests/.*\.cpp$")
|
||||
list(APPEND ${_name}_TEST_SOURCES ${item})
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(item ${${_name}_TEST_SOURCES})
|
||||
list(REMOVE_ITEM ${_name}_SOURCES ${item})
|
||||
endforeach()
|
||||
|
||||
# Proto sources
|
||||
file(
|
||||
GLOB_RECURSE ${_name}_PROTO_SOURCES
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${_source_dir}/protobufs/*.proto
|
||||
)
|
||||
update_deps_file("${${_name}_PROTO_SOURCES};")
|
||||
protobuf_generate_cpp(
|
||||
CXX_SOURCES ${_name}_CXX_PROTO_SOURCES
|
||||
CXX_HEADERS ${_name}_CXX_PROTO_HEADERS
|
||||
CXX_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PROTO_INCLUDE_DIRS
|
||||
${EXTERNALS_INCLUDE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PROTO_SOURCES
|
||||
${${_name}_PROTO_SOURCES}
|
||||
)
|
||||
|
||||
export_to_parent(
|
||||
${_name}_SOURCES
|
||||
${_name}_TEST_SOURCES
|
||||
${_name}_PROTO_SOURCES
|
||||
${_name}_CXX_PROTO_SOURCES
|
||||
${_name}_CXX_PROTO_HEADERS
|
||||
)
|
||||
|
||||
# Add main lib
|
||||
if (_ARGS_STATIC)
|
||||
add_library(${_name} STATIC ${${_name}_SOURCES} ${${_name}_CXX_PROTO_SOURCES})
|
||||
elseif(_ARGS_SHARED)
|
||||
add_library(${_name} SHARED ${${_name}_SOURCES} ${${_name}_CXX_PROTO_SOURCES})
|
||||
else()
|
||||
add_library(${_name} ${${_name}_SOURCES} ${${_name}_CXX_PROTO_SOURCES})
|
||||
endif()
|
||||
target_include_directories(
|
||||
${_name}
|
||||
SYSTEM
|
||||
BEFORE
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${EXTERNALS_ROOT}/include>
|
||||
$<BUILD_INTERFACE:${EXTERNALS_ROOT}/include/zlib>
|
||||
)
|
||||
target_include_directories(
|
||||
${_name}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
# Include protos (if any)
|
||||
if (${_name}_PROTO_SOURCES)
|
||||
target_include_directories(
|
||||
${_name}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
)
|
||||
endif()
|
||||
target_link_directories(
|
||||
${_name}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${EXTERNALS_ROOT}/lib/$<CONFIG>>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}>
|
||||
)
|
||||
# Install main lib
|
||||
foreach(_hdr ${${_name}_CXX_PROTO_HEADERS})
|
||||
file(RELATIVE_PATH _relative_path ${CMAKE_CURRENT_BINARY_DIR} ${_hdr})
|
||||
install(FILES ${_hdr} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${_relative_path})
|
||||
endforeach()
|
||||
install_basic(
|
||||
NAME ${_name}
|
||||
INCLUDE_DIR ${_include_dir}
|
||||
)
|
||||
|
||||
# Add tests executable (if there are any)
|
||||
if (${_name}_TEST_SOURCES AND NOT WIN32)
|
||||
add_executable(${_name}-tests ${${_name}_TEST_SOURCES})
|
||||
|
||||
get_target_property(_lib_type ${_name} TYPE)
|
||||
if (_lib_type STREQUAL "SHARED_LIBRARY")
|
||||
# Set RPATH so the tests exe knows where to find the shared lib.
|
||||
set_target_properties(
|
||||
${_name}-tests
|
||||
PROPERTIES
|
||||
BUILD_RPATH "$ORIGIN"
|
||||
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Link main lib
|
||||
target_link_directories(
|
||||
${_name}-tests
|
||||
PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}>
|
||||
)
|
||||
target_link_libraries(${_name}-tests PRIVATE ${_name})
|
||||
|
||||
# Catch2
|
||||
find_package(Catch2 CONFIG REQUIRED COMPONENTS Catch2WithMain)
|
||||
target_link_libraries(${_name}-tests PRIVATE Catch2::Catch2WithMain)
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -1,39 +0,0 @@
|
||||
include_guard(DIRECTORY)
|
||||
include(GNUInstallDirs)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/PackBasic.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/SetFirstDefined.cmake)
|
||||
|
||||
function(install_basic)
|
||||
set(_options)
|
||||
set(_one_value_args NAME INCLUDE_DIR)
|
||||
set(_multi_value_args)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
set_first_defined(_name _ARGS_NAME PROJECT_NAME)
|
||||
set_first_defined(_include_dir _ARGS_INCLUDE_DIR _name)
|
||||
|
||||
file(
|
||||
GLOB_RECURSE ${_name}_HEADERS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${_include_dir}/*.h)
|
||||
|
||||
target_sources(${_name}
|
||||
PUBLIC
|
||||
FILE_SET HEADERS FILES ${${_name}_HEADERS})
|
||||
|
||||
install(
|
||||
TARGETS ${_name}
|
||||
EXPORT ${_name}Targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
install(
|
||||
EXPORT ${_name}Targets
|
||||
FILE ${_name}Targets.cmake
|
||||
NAMESPACE ${_name}::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${_name})
|
||||
|
||||
pack_basic()
|
||||
endfunction()
|
||||
@@ -1,44 +0,0 @@
|
||||
include_guard(DIRECTORY)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/SetFirstDefined.cmake)
|
||||
|
||||
function(pack_basic)
|
||||
set(_options)
|
||||
set(_one_value_args NAME)
|
||||
set(_multi_value_args)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
set_first_defined(_name _ARGS_NAME PROJECT_NAME)
|
||||
|
||||
find_package(Git QUIET)
|
||||
|
||||
if(GIT_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE PROJECT_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT GIT_FOUND OR PROJECT_VERSION STREQUAL "")
|
||||
set(PROJECT_VERSION "0.0.0")
|
||||
endif()
|
||||
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${_name}ConfigVersion.cmake"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
|
||||
configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${_name}Config.cmake"
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${_name}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${_name}Config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${_name}ConfigVersion.cmake"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${_name})
|
||||
endfunction()
|
||||
@@ -1,12 +0,0 @@
|
||||
function(print_list var)
|
||||
set(CMAKE_MESSAGE_INDENT "")
|
||||
set(_var_str "")
|
||||
foreach(item IN LISTS ${var})
|
||||
set(_var_str "${_var_str}\n ${item}")
|
||||
endforeach()
|
||||
if ("${ARGN}" STREQUAL "VERBOSE")
|
||||
message(VERBOSE "***${var}:${_var_str}")
|
||||
else()
|
||||
message("***${var}:${_var_str}")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -1,80 +0,0 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(protobuf_generate_cpp)
|
||||
set(_options)
|
||||
set(_one_value_args
|
||||
CXX_SOURCES
|
||||
CXX_HEADERS
|
||||
CXX_OUT_DIR
|
||||
PROTOC
|
||||
)
|
||||
set(_multi_value_args
|
||||
PROTO_INCLUDE_DIRS
|
||||
PROTO_SOURCES
|
||||
)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
|
||||
if (NOT DEFINED _ARGS_PROTOC)
|
||||
if (WIN32)
|
||||
set(_ARGS_PROTOC "${EXTERNALS_BIN}/protoc.exe")
|
||||
else()
|
||||
set(_ARGS_PROTOC "${EXTERNALS_BIN}/protoc")
|
||||
endif()
|
||||
endif()
|
||||
set(${_ARGS_CXX_SOURCES})
|
||||
set(${_ARGS_CXX_HEADERS})
|
||||
|
||||
set(_proto_include_cli_args)
|
||||
foreach(_dir ${_ARGS_PROTO_INCLUDE_DIRS})
|
||||
list(APPEND _proto_include_cli_args -I ${_dir})
|
||||
endforeach()
|
||||
|
||||
foreach(_fil ${_ARGS_PROTO_SOURCES})
|
||||
get_filename_component(_abs_fil ${_fil} ABSOLUTE)
|
||||
get_filename_component(_fil_we ${_fil} NAME_WE)
|
||||
get_filename_component(_fil_dir ${_fil} DIRECTORY)
|
||||
if(_fil_dir)
|
||||
set(_fil_we "${_fil_dir}/${_fil_we}")
|
||||
endif()
|
||||
list(APPEND ${_ARGS_CXX_SOURCES} "${_ARGS_CXX_OUT_DIR}/${_fil_we}.pb.cc")
|
||||
list(APPEND ${_ARGS_CXX_HEADERS} "${_ARGS_CXX_OUT_DIR}/${_fil_we}.pb.h")
|
||||
message(STATUS "add_custom_command for ${_fil} -> ${_ARGS_CXX_OUT_DIR}/${_fil_we}.pb.h")
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
"${_ARGS_CXX_OUT_DIR}/${_fil_we}.pb.cc"
|
||||
"${_ARGS_CXX_OUT_DIR}/${_fil_we}.pb.h"
|
||||
COMMAND
|
||||
${_ARGS_PROTOC}
|
||||
ARGS
|
||||
--cpp_out=${_ARGS_CXX_OUT_DIR} ${_proto_include_cli_args} ${_fil}
|
||||
DEPENDS ${_abs_fil}
|
||||
COMMENT "Running C++ protocol buffer compiler on ${_fil}"
|
||||
VERBATIM
|
||||
)
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(
|
||||
${${_ARGS_CXX_SOURCES}}
|
||||
${${_ARGS_CXX_HEADERS}}
|
||||
PROPERTIES
|
||||
GENERATED TRUE
|
||||
)
|
||||
|
||||
# remove some warnings from protobuf generated files
|
||||
if(WIN32)
|
||||
set_source_files_properties(
|
||||
${${_ARGS_CXX_SOURCES}}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "/wd4309 /wd4838"
|
||||
)
|
||||
else()
|
||||
set_source_files_properties(
|
||||
${${_ARGS_CXX_SOURCES}}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-unused-parameter -Wno-effc++ -Wno-pedantic -Wno-sign-compare -Wno-uninitialized"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(${_ARGS_CXX_SOURCES} ${${_ARGS_CXX_SOURCES}} PARENT_SCOPE)
|
||||
set(${_ARGS_CXX_HEADERS} ${${_ARGS_CXX_HEADERS}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -1,58 +0,0 @@
|
||||
function(protobuf_generate_cpp_config)
|
||||
set(_options)
|
||||
set(_one_value_args
|
||||
PROTO_SOURCES_HEADER
|
||||
PROTO_DEFAULTS_HEADER
|
||||
)
|
||||
set(_multi_value_args
|
||||
PROTO_SOURCES
|
||||
PROTO_DEFAULTS
|
||||
)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
|
||||
# Configure the 'config_proto_files' header. It provides an array of strings populated with the
|
||||
# files in PROTO_SOURCES. At runtime, we use this array to generate a special 'config' proto
|
||||
# message with fields for each message defined in said files. A global instance of this 'config'
|
||||
# proto is then constructed, and populated with [compile-time] defaults, and [runtime] overrides
|
||||
# (i.e., in spark.conf). Calls to `bts::config::get<T>()` retrieve the value from the field
|
||||
# associated with type `T` in this global instance.
|
||||
message(STATUS "PROTO_SOURCES: ${_ARGS_PROTO_SOURCES}")
|
||||
message(STATUS "PROTO_SOURCES_HEADER: ${_ARGS_PROTO_SOURCES_HEADER}")
|
||||
message(STATUS "PROTO_DEFAULTS_HEADER: ${_ARGS_PROTO_DEFAULTS_HEADER}")
|
||||
if (_ARGS_PROTO_SOURCES_HEADER)
|
||||
set(PROTO_SOURCES)
|
||||
set(PROTO_SOURCES_CXX_ARRAY_ITEMS "")
|
||||
foreach(_proto_path ${_ARGS_PROTO_SOURCES})
|
||||
list(APPEND PROTO_SOURCES ${_proto_path})
|
||||
string(APPEND PROTO_SOURCES_CXX_ARRAY_ITEMS "\"${_proto_path}\",\n")
|
||||
endforeach()
|
||||
list(LENGTH PROTO_SOURCES PROTO_SOURCES_LENGTH)
|
||||
message(STATUS "CONFIGURING PROTO_SOURCES_HEADER): ${_ARGS_PROTO_SOURCES_HEADER}")
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/config_proto_files.h.in ${_ARGS_PROTO_SOURCES_HEADER})
|
||||
endif()
|
||||
|
||||
# Generate static defaults. Ideally, this would be a single string, but we use an array because
|
||||
# the compiler complains if the string is longer than 65k.
|
||||
set(_cfg_defaults_str "inline const char * config_static_defaults[] = { ")
|
||||
|
||||
foreach(_cfg_file_path ${_ARGS_PROTO_DEFAULTS})
|
||||
file(READ ${_cfg_file_path} _cfg_file_content)
|
||||
string(REPLACE "\"" "\\\"" _cfg_file_content_escaped ${_cfg_file_content})
|
||||
string(REPLACE "\n" ";" _cfg_lines ${_cfg_file_content_escaped})
|
||||
|
||||
foreach(_line ${_cfg_lines})
|
||||
string(APPEND _cfg_defaults_str "\n \"${_line}\",")
|
||||
endforeach(_line)
|
||||
endforeach(_cfg_file_path)
|
||||
|
||||
string(APPEND _cfg_defaults_str "};")
|
||||
set(_old_cfg_defaults_str "")
|
||||
|
||||
if(EXISTS ${_ARGS_PROTO_DEFAULTS_HEADER})
|
||||
file(READ ${_ARGS_PROTO_DEFAULTS_HEADER} _old_cfg_defaults_str)
|
||||
endif()
|
||||
|
||||
if(NOT _cfg_defaults_str STREQUAL _old_cfg_defaults_str)
|
||||
file(WRITE "${_ARGS_PROTO_DEFAULTS_HEADER}" "${_cfg_defaults_str}")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -1,49 +0,0 @@
|
||||
include_guard(DIRECTORY)
|
||||
|
||||
function(protobuf_generate_fs)
|
||||
set(_options)
|
||||
set(_one_value_args TARGET_NAME OUT_DIR PROTOC)
|
||||
set(_multi_value_args PROTO_INCLUDE_DIRS PROTO_SOURCES)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
|
||||
if (NOT DEFINED _ARGS_TARGET_NAME)
|
||||
set(_ARGS_TARGET_NAME "${PROJECT_NAME}_generate_fs_protos")
|
||||
endif()
|
||||
if (NOT DEFINED _ARGS_PROTOC)
|
||||
set(_ARGS_PROTOC "${EXTERNALS_BIN}/protoc")
|
||||
endif()
|
||||
|
||||
set(_proto_include_cli_args)
|
||||
foreach(_dir ${_ARGS_PROTO_INCLUDE_DIRS})
|
||||
list(APPEND _proto_include_cli_args -I ${_dir})
|
||||
endforeach()
|
||||
|
||||
set(_outputs)
|
||||
foreach(_proto_source ${_ARGS_PROTO_SOURCES})
|
||||
# get_filename_component(_abs_proto_source ${_proto_source} ABSOLUTE)
|
||||
get_filename_component(_proto_source_we ${_proto_source} NAME_WE)
|
||||
# get_filename_component(_proto_source_dir ${_proto_source} DIRECTORY)
|
||||
list(APPEND _outputs ${_ARGS_OUT_DIR}/${_proto_source_we}.fable.fs)
|
||||
endforeach()
|
||||
|
||||
set(_venv_exec ${CMAKE_SOURCE_DIR}/tools/venv_exec.sh)
|
||||
set(_plugin_py ${CMAKE_SOURCE_DIR}/src/lib_spark/spark/api/service_compiler/plugin.py)
|
||||
set(_template_fs ${CMAKE_SOURCE_DIR}/src/lib_spark/spark/api/service_compiler/templates/fs/fable.fs)
|
||||
add_custom_command(
|
||||
OUTPUT ${_outputs}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${_venv_exec}
|
||||
${_ARGS_PROTOC}
|
||||
--plugin=protoc-gen-service=${_plugin_py}
|
||||
--service_out=lang=fs,strip_out_path=1:${_ARGS_OUT_DIR}
|
||||
${_proto_include_cli_args}
|
||||
${_ARGS_PROTO_SOURCES}
|
||||
DEPENDS
|
||||
${_venv_exec}
|
||||
${_plugin_py}
|
||||
${_template_fs}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json
|
||||
${_ARGS_PROTO_SOURCES}
|
||||
)
|
||||
add_custom_target(${_ARGS_TARGET_NAME} ALL DEPENDS "${_outputs}")
|
||||
endfunction()
|
||||
@@ -1,33 +0,0 @@
|
||||
include_guard(DIRECTORY)
|
||||
|
||||
function(protobuf_generate_js)
|
||||
set(_options)
|
||||
set(_one_value_args TARGET_NAME OUTPUT)
|
||||
set(_multi_value_args PROTO_INCLUDE_DIRS PROTO_SOURCES)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
|
||||
if (NOT DEFINED _ARGS_TARGET_NAME)
|
||||
set(_ARGS_TARGET_NAME "${PROJECT_NAME}_generate_js_protos")
|
||||
endif()
|
||||
|
||||
set(_proto_include_cli_args)
|
||||
foreach(_dir ${_ARGS_PROTO_INCLUDE_DIRS})
|
||||
list(APPEND _proto_include_cli_args -p ${_dir})
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${_ARGS_OUTPUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND npx
|
||||
--no-install pbjs
|
||||
-t json-module
|
||||
-w commonjs
|
||||
-o ${_ARGS_OUTPUT}
|
||||
${_proto_include_cli_args}
|
||||
${_ARGS_PROTO_SOURCES}
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json
|
||||
${_ARGS_PROTO_SOURCES}
|
||||
)
|
||||
add_custom_target(${_ARGS_TARGET_NAME} ALL DEPENDS ${_ARGS_OUTPUT})
|
||||
endfunction()
|
||||
@@ -1,10 +0,0 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
macro(set_first_defined RESULT)
|
||||
foreach(_arg ${ARGN})
|
||||
if (DEFINED ${_arg})
|
||||
set(${RESULT} ${${_arg}})
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
@@ -1,49 +0,0 @@
|
||||
include_guard(DIRECTORY)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/TernaryOperator.cmake)
|
||||
|
||||
function(sym_link_dir)
|
||||
set(_options)
|
||||
set(_one_value_args TARGET_NAME SOURCE DEST COMMENT)
|
||||
set(_multi_value_args)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
add_custom_command(
|
||||
OUTPUT ${_ARGS_DEST}
|
||||
COMMAND ln ARGS -sf ${_ARGS_SOURCE} ${_ARGS_DEST}
|
||||
)
|
||||
set_ternary(_comment _ARGS_COMMENT "${_ARGS_COMMENT}" "linking dir ${_ARGS_SOURCE} -> ${_ARGS_DEST}")
|
||||
add_custom_target(
|
||||
${_ARGS_TARGET_NAME} ALL
|
||||
DEPENDS ${_ARGS_DEST}
|
||||
COMMENT "${_comment}"
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(sym_link_file)
|
||||
set(_options)
|
||||
set(_one_value_args SOURCE DEST INSTALL_DEST)
|
||||
set(_multi_value_args)
|
||||
cmake_parse_arguments(_ARGS "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN})
|
||||
file(
|
||||
CREATE_LINK
|
||||
${_ARGS_SOURCE}
|
||||
${_ARGS_DEST}
|
||||
SYMBOLIC
|
||||
)
|
||||
if (DEFINED _ARGS_INSTALL_DEST)
|
||||
install(
|
||||
FILES
|
||||
${_ARGS_SOURCE}
|
||||
DESTINATION ${_ARGS_INSTALL_DEST}
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(sym_link_local_lib LIB_NAME)
|
||||
set(_lib_file_name "${CMAKE_SHARED_LIBRARY_PREFIX}${LIB_NAME}.so")
|
||||
file(
|
||||
CREATE_LINK
|
||||
"${CMAKE_BINARY_DIR}/src/lib_${LIB_NAME}/${_lib_file_name}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${_lib_file_name}"
|
||||
SYMBOLIC
|
||||
)
|
||||
endfunction()
|
||||
@@ -1,9 +0,0 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
macro(set_ternary RESULT CONDITION TRUE_VALUE FALSE_VALUE)
|
||||
if(${CONDITION})
|
||||
set(${RESULT} ${TRUE_VALUE})
|
||||
else()
|
||||
set(${RESULT} ${FALSE_VALUE})
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace bts::@PROJECT_NAME@::protobufs {
|
||||
|
||||
inline std::array<const char *, @PROTO_SOURCES_LENGTH@> config_proto_files = {
|
||||
@PROTO_SOURCES_CXX_ARRAY_ITEMS@
|
||||
};
|
||||
|
||||
} // namespace bts::@PROJECT_NAME@::protobufs
|
||||
@@ -1,32 +0,0 @@
|
||||
# inspired by https://stackoverflow.com/questions/1027247/specify-source-files-globally-with-glob
|
||||
|
||||
# Compare the new contents with the existing file, if it exists and is the same we don't want to
|
||||
# trigger a make by changing its timestamp.
|
||||
function(update_file path content)
|
||||
set(old_content "")
|
||||
if(EXISTS "${path}")
|
||||
file(READ "${path}" old_content)
|
||||
endif()
|
||||
if(NOT old_content STREQUAL content)
|
||||
file(WRITE "${path}" "${content}")
|
||||
endif()
|
||||
endfunction(update_file)
|
||||
|
||||
# Creates a file called CMakeDeps.cmake next to your CMakeLists.txt with the list of dependencies in
|
||||
# it - this file should be treated as part of CMakeLists.txt (source controlled, etc.).
|
||||
function(update_deps_file deps)
|
||||
if(WIN32)
|
||||
set(deps_file "CMakeDeps_win.cmake")
|
||||
else()
|
||||
set(deps_file "CMakeDeps.cmake")
|
||||
endif()
|
||||
|
||||
# Normalize the list so it's the same on every machine
|
||||
list(REMOVE_DUPLICATES deps)
|
||||
list(SORT deps)
|
||||
# Update the deps file
|
||||
set(content "set(sources ${deps})")
|
||||
update_file(${deps_file} "${content}")
|
||||
# Include the file so it's tracked as a generation dependency we don't need the content.
|
||||
include(${deps_file})
|
||||
endfunction(update_deps_file)
|
||||
@@ -1,24 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# Explicitly set policy to convert relative paths to absolute (although this is a default policy,
|
||||
# setting it explicitly prevents a compile-warning)
|
||||
cmake_policy(SET CMP0076 NEW)
|
||||
|
||||
# add protos to the library to facilitate source_group
|
||||
target_sources(spark PUBLIC ${Config_Protos} ${NonConfig_Protos} ${Service_Protos})
|
||||
|
||||
function(assign_source_group)
|
||||
foreach(_source IN ITEMS ${ARGN})
|
||||
if(IS_ABSOLUTE "${_source}")
|
||||
file(RELATIVE_PATH _source_rel "${CMAKE_CURRENT_SOURCE_DIR}" "${_source}")
|
||||
else()
|
||||
set(_source_rel "${_source}")
|
||||
endif()
|
||||
get_filename_component(_source_path "${_source_rel}" PATH)
|
||||
string(REPLACE "/" "\\" _source_path_msvc "${_source_path}")
|
||||
source_group("${_source_path_msvc}" FILES "${_source}")
|
||||
set(SOURCE_FILES "${_source}")
|
||||
endforeach()
|
||||
endfunction(assign_source_group)
|
||||
|
||||
assign_source_group(${SparkLib_Sources} ${Config_Protos} ${NonConfig_Protos} ${Service_Protos})
|
||||
@@ -1,51 +0,0 @@
|
||||
services:
|
||||
sparkd:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
context: ./sparkd
|
||||
command: [ "./sparkd", "run" ]
|
||||
ports: [ "8000:8000", "8001:8001", "8002:8002" ]
|
||||
|
||||
pubsub:
|
||||
build:
|
||||
dockerfile: pubsub.Dockerfile
|
||||
context: ./DataStream
|
||||
command: [ "./PubSubServer" ]
|
||||
environment:
|
||||
- DOTNET_ENVIRONMENT=Production
|
||||
ports:
|
||||
- 22019:22019
|
||||
|
||||
md-publisher:
|
||||
build:
|
||||
dockerfile: md-publisher.Dockerfile
|
||||
context: ./DataStream
|
||||
depends_on:
|
||||
- pubsub
|
||||
- sparkd
|
||||
command:
|
||||
[
|
||||
"dockerize",
|
||||
"-wait",
|
||||
"tcp://pubsub:22019",
|
||||
"-wait",
|
||||
"tcp://sparkd:8000",
|
||||
"-timeout",
|
||||
"10s",
|
||||
"./DataStreamPublisher"
|
||||
]
|
||||
environment:
|
||||
- DOTNET_ENVIRONMENT=MarketData
|
||||
|
||||
webapp:
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 8443:8443
|
||||
build:
|
||||
dockerfile: webapp.Dockerfile
|
||||
context: ./DataStream
|
||||
command: [ "./Bts.DataStreamWebApp.Server" ]
|
||||
environment:
|
||||
- ASPNETCORE_HTTP_PORT=8080
|
||||
- ASPNETCORE_HTTPS_PORT=8443
|
||||
- ASPNETCORE_ENVIRONMENT=Staging
|
||||
@@ -1,79 +0,0 @@
|
||||
services:
|
||||
sparkd:
|
||||
build:
|
||||
dockerfile: src/app_sparkd/Dockerfile
|
||||
args:
|
||||
- IMAGE=${SPARKD__IMAGE}
|
||||
- SOURCE_DIR=${SPARKD__SOURCE_DIR}
|
||||
- CONF_FILE=${SPARKD__CONF_FILE}
|
||||
- MD_RECORDING_DIR=${SPARKD__MD_RECORDING_DIR}
|
||||
command: [ "./sparkd", "run" ]
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "8001:8001"
|
||||
- "8002:8002"
|
||||
|
||||
pubsub:
|
||||
environment:
|
||||
- DOTNET_ENVIRONMENT=${PUBSUB__DOTNET_ENVIRONMENT}
|
||||
build:
|
||||
dockerfile: src/DataStreamSuite/PubSubServer/Dockerfile
|
||||
args:
|
||||
- CS_SOURCE_DIR=${PUBSUB__CS_SOURCE_DIR}
|
||||
- CPP_SOURCE_DIR=${PUBSUB__CPP_SOURCE_DIR}
|
||||
- CONF_FILE=${PUBSUB__CONF_FILE}
|
||||
ports:
|
||||
- "22019:22019"
|
||||
command: [ "./PubSubServer" ]
|
||||
|
||||
md-publisher:
|
||||
build:
|
||||
dockerfile: src/DataStreamSuite/DataStreamPublisher/Dockerfile
|
||||
args:
|
||||
- SOURCE_DIR=${MD_PUBLISHER__SOURCE_DIR}
|
||||
- CONF_FILE=${MD_PUBLISHER__CONF_FILE}
|
||||
depends_on:
|
||||
- pubsub
|
||||
- sparkd
|
||||
command: [ "dockerize", "-wait", "tcp://pubsub:22019", "-wait", "tcp://sparkd:8000", "-timeout", "10s", "./DataStreamPublisher" ]
|
||||
environment:
|
||||
- DOTNET_ENVIRONMENT=${MD_PUBLISHER__DOTNET_ENVIRONMENT}
|
||||
|
||||
webapp:
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8443:8443"
|
||||
build:
|
||||
dockerfile: src/DataStreamSuite/Bts.DataStreamWebApp.Server/Dockerfile
|
||||
args:
|
||||
- SOURCE_DIR=${WEBAPP__SOURCE_DIR}
|
||||
- WEB_ROOT=${WEBAPP__WEB_ROOT}
|
||||
- CONF_FILE=${WEBAPP__CONF_FILE}
|
||||
command: [ "./Bts.DataStreamWebApp.Server" ]
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=${WEBAPP__ASPNETCORE_ENVIRONMENT}
|
||||
|
||||
api-server:
|
||||
depends_on:
|
||||
- sparkd
|
||||
ports:
|
||||
- 8008:8008
|
||||
- 9443:9443
|
||||
build:
|
||||
dockerfile: src/client/spark_api_server/Dockerfile
|
||||
command: [ "dockerize", "-wait", "tcp://sparkd:8000", "-timeout", "10s", "./spark_api_server", "run" ]
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=${API_SERVER__ASPNETCORE_ENVIRONMENT}
|
||||
|
||||
sparkd-ping-test:
|
||||
depends_on:
|
||||
- sparkd
|
||||
profiles:
|
||||
- ping-test
|
||||
build:
|
||||
context: .
|
||||
dockerfile_inline: |
|
||||
FROM bluetradingsystems/linux_dotnet7
|
||||
USER "root"
|
||||
RUN apt-get update && apt-get -y install iputils-ping
|
||||
command: [ "ping", "sparkd" ]
|
||||
@@ -1,224 +0,0 @@
|
||||
[cmake]: https://cmake.org/
|
||||
[cmake ext]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
|
||||
[cmake presets]: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
|
||||
[cpp ext]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
|
||||
[clangd ext]: https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
|
||||
[dotnet]: https://dotnet.microsoft.com/en-us/download/dotnet
|
||||
[ninja build]: https://ninja-build.org/
|
||||
[ninja generator]: https://cmake.org/cmake/help/latest/generator/Ninja.html
|
||||
[ninja multi-config generator]: https://cmake.org/cmake/help/latest/generator/Ninja%20Multi-Config.html
|
||||
[python]: https://www.python.org/
|
||||
[py venv]: https://docs.python.org/3/library/venv.html
|
||||
[visual studio]: https://visualstudio.microsoft.com/
|
||||
[visual studio generator]: https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2017%202022.html
|
||||
|
||||
# C++ Intellisense for Spark on Windows (VS Code)
|
||||
**Steps**
|
||||
1. Install the **[C++ extension][cpp ext]**
|
||||
2. Install the **[CMake extension][cmake ext]**
|
||||
3. Copy `c_cpp_properties.json` from this folder to `$workspaceFolder/.vscode/`
|
||||
4. In the VS Code Command Palette, run **CMake: Select Configure Preset**, then
|
||||
select '**spark**' from the dropdown
|
||||
|
||||
**Notes**
|
||||
* Intellisense won't work for generated files/types until you build libspark
|
||||
|
||||
# C++ Intellisense for Sparkd on Linux (VS Code)
|
||||
1. Install the **[CMake extension][cmake ext]**
|
||||
2. Install the **[Clangd extension][clangd ext]**
|
||||
3. (Optional) Install the **[C++ extension][cpp ext]** (*needed for debugging,
|
||||
but intellisense should work without it*).
|
||||
4. If the **[C++ extension][cpp ext]** is installed, disable its intellisense in
|
||||
your workspace settings (*Clangd intellisense is better*)
|
||||
```
|
||||
"C_Cpp.intelliSenseEngine": "disabled"
|
||||
```
|
||||
5. In the VS Code Command Palette, run **CMake: Select Configure Preset**, then select the
|
||||
**[preset][cmake presets]** you wish to build from the dropdown
|
||||
* *The **Clang** presets may work best with the **Clangd** extension*
|
||||
* *Intellisense won't work for generated files/types until you build libspark*
|
||||
|
||||
# Build Spark on Windows
|
||||
### Dependencies
|
||||
* **[CMake][cmake]** (version >= 3.23)
|
||||
* **[Python][python]** (version >= 3.9)
|
||||
* **[Visual Studio][visual studio]** (2022)
|
||||
* **[Dotnet][dotnet]** (sdk version >= 7.0.0)
|
||||
|
||||
### References
|
||||
* **[CMakePresets][cmake presets]**
|
||||
* **[Visual Studio 17 2022 (CMake generator)][visual studio generator]**
|
||||
* **[Python Virtual Environment][py venv]**
|
||||
|
||||
### Notes
|
||||
* *Run commands from the repo root dir unless otherwise noted*
|
||||
|
||||
1. Set up the **[Python virtual environment][py venv]**<br>
|
||||
```
|
||||
# Create the virtual environment
|
||||
python3 -m venv .venv
|
||||
|
||||
# Activate the virtual environment
|
||||
.venv\bin\activate.bat
|
||||
|
||||
# Update pip
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
# Install packages
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
2. Build
|
||||
* *Run commands in python virtual environment*
|
||||
```
|
||||
# Configure
|
||||
cmake --preset spark
|
||||
|
||||
# Build Debug
|
||||
cmake --build --preset spark-debug
|
||||
dotnet build spark_client.sln --configuration Debug
|
||||
|
||||
# Build Release
|
||||
cmake --build --preset spark-release
|
||||
dotnet build spark_client.sln --configuration Release
|
||||
```
|
||||
|
||||
# Build Sparkd on Linux
|
||||
### **Dependencies**
|
||||
* **[CMake][cmake]** (version >= 3.23)
|
||||
* **[Ninja Build][ninja build]**
|
||||
* **[Python][python]** (version >= 3.9)
|
||||
|
||||
### **References**
|
||||
* **[CMakePresets][cmake presets]**
|
||||
* **[Ninja (CMake generator)][ninja generator]**
|
||||
* **[Python Virtual Environment][py venv]**
|
||||
* **[Devcontainer](devcontainer)**
|
||||
|
||||
### Prerequisites
|
||||
* Open repository in a VS Code [Devcontainer](../docker/sparkd/dev/README.md), or
|
||||
create your own [docker container](../docker/sparkd/dev/README.md) in which to build
|
||||
|
||||
### Notes
|
||||
* *Run commands from the repo root dir unless otherwise noted*<br>
|
||||
|
||||
1. Set up the **[Python virtual environment][py venv]**
|
||||
```
|
||||
# Create the virtual environment
|
||||
python3 -m venv .venv
|
||||
|
||||
# Activate the virtual environment
|
||||
. .venv/bin/activate
|
||||
|
||||
# Update pip
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
# Install packages
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
2. Build
|
||||
* *Run commands in python virtual environment*
|
||||
```
|
||||
# Configure clang debug
|
||||
cmake --preset sparkd-clang-debug
|
||||
|
||||
# Build clang debug
|
||||
cmake --build --preset spark-clang-debug
|
||||
|
||||
# Configure gcc release
|
||||
cmake --build --preset sparkd-gcc-release
|
||||
|
||||
# Build gcc release
|
||||
cmake --build --preset sparkd-gcc-release
|
||||
```
|
||||
|
||||
# Build Spark Api Server on Windows
|
||||
### **Dependencies**
|
||||
* **[CMake][cmake]** (version >= 3.23)
|
||||
* **[Python][python]** (version >= 3.9)
|
||||
* **[Visual Studio][visual studio]** (version)
|
||||
* **[Dotnet][dotnet]** (sdk version >= 7.0.0)
|
||||
|
||||
### **References**
|
||||
* **[CMakePresets][cmake presets]**
|
||||
* **[Visual Studio 17 2022 (CMake generator)][visual studio generator]**
|
||||
* **[Python Virtual Environment][py venv]**
|
||||
|
||||
### Notes
|
||||
* *Run commands from the repo root dir unless otherwise noted*
|
||||
|
||||
1. Set up the **[Python Virtual Environment][py venv]**
|
||||
```
|
||||
# Create the virtual environment
|
||||
python3 -m venv .venv
|
||||
|
||||
# Activate the virtual environment
|
||||
.venv\bin\activate.bat
|
||||
|
||||
# Update pip
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
# Install packages
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
2. Build
|
||||
* *Run in python virtual environment*
|
||||
```
|
||||
# Configure
|
||||
cmake --preset spark-api-server-windows
|
||||
|
||||
# Build debug
|
||||
cmake --build --preset spark-api-server-windows-debug
|
||||
dotnet build Spark.Api.Server.sln --configuration Debug
|
||||
|
||||
# Build release
|
||||
cmake --build --preset spark-api-server-windows-release
|
||||
dotnet build Spark.Api.Server.sln --configuration Release
|
||||
```
|
||||
|
||||
# Build Spark Api Server on Linux
|
||||
### **Dependencies**
|
||||
* **[CMake][cmake]** (version >= 3.23)
|
||||
* **[Ninja Build][ninja build]**
|
||||
* **[Python][python]** (version >= 3.9)
|
||||
* **[Dotnet][dotnet]** (sdk version >= 7.0.0)
|
||||
|
||||
### **References**
|
||||
* **[CMakePresets][cmake presets]**
|
||||
* **[Ninja Multi-Config (CMake generator)][ninja multi-config generator]**
|
||||
* **[Python Virtual Environment][py venv]**
|
||||
|
||||
### Prerequisites
|
||||
* Open repository in a VS Code [Devcontainer](../docker/sparkd/dev/README.md), or
|
||||
create your own [docker container](../docker/sparkd/dev/README.md) in which to build
|
||||
|
||||
### Notes
|
||||
* *Run commands from the repo root dir unless otherwise noted*
|
||||
|
||||
1. Set up the **[Python Virtual Environment][py venv]**
|
||||
```
|
||||
# Create the virtual environment
|
||||
python3 -m venv .venv
|
||||
|
||||
# Activate the virtual environment
|
||||
. .venv/bin/activate
|
||||
|
||||
# Update pip
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
# Install packages
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
2. Build
|
||||
* *Run in python virtual environment*
|
||||
```
|
||||
# Configure
|
||||
cmake --preset spark-api-server-linux
|
||||
|
||||
# Build debug
|
||||
cmake --build --preset spark-api-server-linux-debug
|
||||
dotnet build Spark.Api.Server.sln --configuration Debug
|
||||
|
||||
# Build release
|
||||
cmake --build --preset spark-api-server-linux-release
|
||||
dotnet build Spark.Api.Server.sln --configuration Release
|
||||
```
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Windows",
|
||||
"intelliSenseMode": "windows-msvc-x64",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/src/",
|
||||
"${workspaceFolder}/build/src/",
|
||||
"${workspaceFolder}/externals/windows/include/"
|
||||
],
|
||||
"defines": ["_WIN32", "__x86_64__"],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true
|
||||
},
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17",
|
||||
"configurationProvider": "ms-vscode.cmake-tools",
|
||||
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe",
|
||||
"mergeConfigurations": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"FormattingOptions": {
|
||||
"NewLine": "\n",
|
||||
"UseTabs": false,
|
||||
"TabSize": 3,
|
||||
"IndentationSize": 3,
|
||||
"SpacingAfterMethodDeclarationName": false,
|
||||
"SpaceWithinMethodDeclarationParenthesis": false,
|
||||
"SpaceBetweenEmptyMethodDeclarationParentheses": false,
|
||||
"SpaceAfterMethodCallName": false,
|
||||
"SpaceWithinMethodCallParentheses": false,
|
||||
"SpaceBetweenEmptyMethodCallParentheses": false,
|
||||
"SpaceAfterControlFlowStatementKeyword": true,
|
||||
"SpaceWithinExpressionParentheses": false,
|
||||
"SpaceWithinCastParentheses": false,
|
||||
"SpaceWithinOtherParentheses": false,
|
||||
"SpaceAfterCast": false,
|
||||
"SpacesIgnoreAroundVariableDeclaration": false,
|
||||
"SpaceBeforeOpenSquareBracket": false,
|
||||
"SpaceBetweenEmptySquareBrackets": false,
|
||||
"SpaceWithinSquareBrackets": false,
|
||||
"SpaceAfterColonInBaseTypeDeclaration": true,
|
||||
"SpaceAfterComma": true,
|
||||
"SpaceAfterDot": false,
|
||||
"SpaceAfterSemicolonsInForStatement": true,
|
||||
"SpaceBeforeColonInBaseTypeDeclaration": true,
|
||||
"SpaceBeforeComma": false,
|
||||
"SpaceBeforeDot": false,
|
||||
"SpaceBeforeSemicolonsInForStatement": false,
|
||||
"SpacingAroundBinaryOperator": "single",
|
||||
"IndentBraces": false,
|
||||
"IndentBlock": true,
|
||||
"IndentSwitchSection": true,
|
||||
"IndentSwitchCaseSection": true,
|
||||
"LabelPositioning": "oneLess",
|
||||
"WrappingPreserveSingleLine": true,
|
||||
"WrappingKeepStatementsOnSingleLine": true,
|
||||
"NewLinesForBracesInTypes": false,
|
||||
"NewLinesForBracesInMethods": false,
|
||||
"NewLinesForBracesInProperties": false,
|
||||
"NewLinesForBracesInAccessors": false,
|
||||
"NewLinesForBracesInAnonymousMethods": false,
|
||||
"NewLinesForBracesInControlBlocks": false,
|
||||
"NewLinesForBracesInAnonymousTypes": false,
|
||||
"NewLinesForBracesInObjectCollectionArrayInitializers": false,
|
||||
"NewLinesForBracesInLambdaExpressionBody": false,
|
||||
"NewLineForElse": false,
|
||||
"NewLineForCatch": false,
|
||||
"NewLineForFinally": false,
|
||||
"NewLineForMembersInObjectInit": true,
|
||||
"NewLineForMembersInAnonymousTypes": true,
|
||||
"NewLineForClausesInQuery": true
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
FROM spark-crypto_18.04
|
||||
|
||||
RUN \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& apt-get install -y \
|
||||
htop \
|
||||
locales \
|
||||
source-highlight \
|
||||
powerline \
|
||||
fonts-powerline
|
||||
|
||||
|
||||
# Hide these in the .docker directory to avoid conflicts with existing repos on
|
||||
# this computer (in case a parent dir, such as $HOME, is mounted inside a
|
||||
# container)
|
||||
ARG repo_root="/home/john/Documents/repos/.docker"
|
||||
|
||||
# Create dirs for public/private repos
|
||||
USER john
|
||||
RUN \
|
||||
mkdir -p $repo_root/public \
|
||||
&& mkdir -p $repo_root/private
|
||||
|
||||
|
||||
## Get latest fish (build from source)
|
||||
# 1) get build deps
|
||||
USER root
|
||||
RUN \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& apt-get install -y software-properties-common
|
||||
RUN \
|
||||
apt-add-repository ppa:fish-shell/release-3 \
|
||||
&& sed -i "s/^# deb/deb/g" /etc/apt/sources.list
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get build-dep -y fish
|
||||
|
||||
|
||||
# 2) Clone repo
|
||||
USER john
|
||||
RUN \
|
||||
cd $repo_root/public \
|
||||
&& git clone https://github.com/fish-shell/fish-shell.git
|
||||
|
||||
RUN \
|
||||
cd $repo_root/public/fish-shell \
|
||||
&& mkdir build \
|
||||
&& cd build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCS=0 .. \
|
||||
&& cmake --build .
|
||||
|
||||
# Switch to root, rather than running inline w/ sudo cmd, to avoid having to
|
||||
# enter a password
|
||||
USER root
|
||||
RUN \
|
||||
cd $repo_root/public/fish-shell/build \
|
||||
&& make install
|
||||
USER john
|
||||
|
||||
|
||||
## Get oh-my-fish
|
||||
RUN \
|
||||
cd $repo_root/public \
|
||||
&& git clone https://github.com/oh-my-fish/oh-my-fish.git
|
||||
|
||||
RUN \
|
||||
cd $repo_root/public/oh-my-fish \
|
||||
&& ./bin/install --noninteractive --yes
|
||||
|
||||
|
||||
## Get my fish config
|
||||
RUN \
|
||||
cd $repo_root/private \
|
||||
&& git clone https://github.com/johncolvin-og/myfishconfig
|
||||
|
||||
RUN \
|
||||
cd $repo_root/private/myfishconfig \
|
||||
&& cp src/config.fish /home/john/.config/fish/ \
|
||||
&& cp src/aliases.fish /home/john/.config/fish/ \
|
||||
&& cp -r src/functions /home/john/.config/fish/ \
|
||||
&& cp -r src/themes/johncolvin /home/john/.local/share/omf/themes/ \
|
||||
&& fish --command "omf theme johncolvin"
|
||||
|
||||
|
||||
## Get my bash config (back up existing)
|
||||
RUN \
|
||||
cd $repo_root/private \
|
||||
&& git clone https://github.com/johncolvin-og/mybashconfig \
|
||||
&& cd mybashconfig \
|
||||
&& cp src/* /home/john/
|
||||
|
||||
|
||||
# Get vim files/tools
|
||||
USER root
|
||||
RUN \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& apt-get install -y curl
|
||||
USER john
|
||||
RUN curl -fLo home/john/.vim/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
|
||||
|
||||
# Some fonts look sketchy if the language isn't set to english:
|
||||
# * The powerline git glyphs in the fish prompt are all displayed as question
|
||||
# marks.
|
||||
#
|
||||
# * The shell confuses the position of the cursor, so characters are left
|
||||
# around when they should have been cleared, and the cursor's home position
|
||||
# is pushed one or two places to the right.
|
||||
#
|
||||
# * Most likely, the bad cursor position is caused by some dependencies the
|
||||
# interpretation of escape sequences have on the language setting. At this
|
||||
# point I don't even care anymore (literally took 8 hours to figure this
|
||||
# out). I just know this shit is needed to make the prompt work correctly.
|
||||
USER root
|
||||
RUN locale-gen "en_US.UTF-8"
|
||||
USER john
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
RUN fc-cache -vf
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set this_dir (realpath (dirname (status -f)))
|
||||
set image_working_dir (realpath "$this_dir/../..")
|
||||
|
||||
set image_name $argv[1]
|
||||
if test (count $argv) -eq 0
|
||||
set image_name_cmd "$this_dir/docker_image_name.fish"
|
||||
set image_name (eval $image_name_cmd)
|
||||
end
|
||||
|
||||
docker build \
|
||||
-f "$this_dir/Dockerfile" \
|
||||
-t "$image_name" \
|
||||
"$image_working_dir"
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
if test (count $argv) -gt 0
|
||||
echo $argv
|
||||
exit 0
|
||||
end
|
||||
|
||||
set image_name_cmd (realpath (dirname (status -f)))"/docker_image_name.fish"
|
||||
set image_name (eval $image_name_cmd)
|
||||
echo $image_name
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
echo "$USER""s_"(basename (git rev-parse --show-toplevel))"-dev"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set inst_name $argv[1]
|
||||
if test (count $argv) -eq 0
|
||||
set script_dir (realpath (dirname (status -f)))
|
||||
set inst_name (eval $script_dir"/docker_container_name.fish")
|
||||
end
|
||||
|
||||
set working_dir (realpath (pwd))
|
||||
echo $inst_name
|
||||
docker exec -w $working_dir -it "$inst_name" bash
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
function print_help_and_exit
|
||||
echo "\
|
||||
Usage: setup_builds.sh [OPTIONS] compiler build-type
|
||||
|
||||
Positionals:
|
||||
gcc Compile with gcc
|
||||
clang Compile with clang
|
||||
debug Build debug
|
||||
release Build release
|
||||
|
||||
Options:
|
||||
--compiler <clang|gcc> Specify the compiler
|
||||
--type <debug|release> Specify the type of build
|
||||
-f,--force Overwrite existing build directories
|
||||
-h,--help Print this help message and exit
|
||||
|
||||
"
|
||||
exit $argv[1]
|
||||
end
|
||||
|
||||
function assert_dir
|
||||
if test ! -d "$argv[1]"
|
||||
if test -n "$argv[2]"
|
||||
echo "Invalid variable "$argv[2]": '"$argv[1]"' is not a directory"
|
||||
else
|
||||
echo "'"$argv[1]"' is not a directory"
|
||||
end
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
||||
# common variables
|
||||
|
||||
set tools_path (realpath (dirname (status -f)))
|
||||
set spartan_path_cmd $tools_path/spartan_path.fish
|
||||
set repo_root (eval $spartan_path_cmd "repo-root")
|
||||
set build_root "$repo_root"/"build"
|
||||
mkdir -p "$build_root"
|
||||
|
||||
# Initialize the build directory. Expected arguments: <compiler>, <build_type>
|
||||
# Note: this method assumes the variables 'repot_root' and 'build_root' have
|
||||
# already been properly initialized
|
||||
function setup_build
|
||||
assert_dir $repo_root
|
||||
assert_dir $build_root
|
||||
set compiler "$argv[1]"
|
||||
set c_compiler (which cc)
|
||||
set build_type "$argv[2]"
|
||||
|
||||
if test \( -z "$build_type" \) -o \( \( "$build_type" != debug \) -a \( "$build_type" != release \) \)
|
||||
print_help_and_exit 1
|
||||
end
|
||||
|
||||
if test "$build_type" = debug
|
||||
set build_type_arg Debug
|
||||
if test "$compiler" = gcc
|
||||
set compiler_arg "/usr/lib/ccache/g++"
|
||||
else
|
||||
# set compiler_arg "/usr/lib/ccache/clang++"
|
||||
set compiler_arg "clang++"
|
||||
set c_compiler (which clang)
|
||||
end
|
||||
else if test "$build_type" = release
|
||||
set build_type_arg Release
|
||||
if test "$compiler" = gcc
|
||||
set compiler_arg "g++"
|
||||
else
|
||||
set compiler_arg "clang++"
|
||||
end
|
||||
end
|
||||
|
||||
if test \( -z "$compiler" \) -o \( \( "$compiler" != gcc \) -a \( "$compiler" != clang \) \)
|
||||
print_help_and_exit 1
|
||||
end
|
||||
|
||||
set build_dest $build_root"/"$compiler"/"$build_type
|
||||
|
||||
echo "Set up build: "$compiler" "$build_type
|
||||
|
||||
if test \( -z "$force" \) -a \( -d $build_dest \)
|
||||
echo "The build directory '"$build_dest"' already exists (use -f to overwrite)"
|
||||
return 1
|
||||
end
|
||||
|
||||
rm -rf "$build_dest"
|
||||
mkdir -p "$build_dest"
|
||||
cd "$build_dest"
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=$build_type_arg -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_C_COMPILER=$c_compiler -DCMAKE_CXX_COMPILER=$compiler_arg $repo_root
|
||||
end
|
||||
|
||||
# The while loop below removes arguments (via shift) as it parses them.
|
||||
# Additional information that needs to be extracted from the arguments must be
|
||||
# done so before the loop is executed.
|
||||
|
||||
set i 1
|
||||
while test $i -le (count $argv)
|
||||
switch $argv[$i]
|
||||
case --compiler
|
||||
set i (math "$i + 1")
|
||||
set compiler $argv[$i]
|
||||
case clang
|
||||
set compiler clang
|
||||
case gcc
|
||||
set compiler gcc
|
||||
case --type
|
||||
set i (math "$i + 1")
|
||||
set build_type $argv[$i]
|
||||
case release
|
||||
set build_type release
|
||||
case debug
|
||||
set build_type debug
|
||||
case -f
|
||||
set force 1
|
||||
case --force
|
||||
set force 1
|
||||
case -h
|
||||
print_help_and_exit 0
|
||||
case --help
|
||||
print_help_and_exit 0
|
||||
case '*'
|
||||
print_help_and_exit 1
|
||||
end
|
||||
set i (math "$i + 1")
|
||||
end
|
||||
|
||||
echo "compiler in "$compiler
|
||||
echo "build type in "$build_type
|
||||
if test -n "$compiler"
|
||||
if test -n "$build_type"
|
||||
setup_build $compiler $build_type
|
||||
else
|
||||
# all builds for the specified compiler
|
||||
setup_build $compiler debug
|
||||
setup_build $compiler release
|
||||
end
|
||||
else if test -n "$build_type"
|
||||
# all builds for the specified build type
|
||||
setup_build gcc $build_type
|
||||
setup_build clang $build_type
|
||||
else
|
||||
# all builds
|
||||
setup_build gcc debug
|
||||
setup_build gcc release
|
||||
setup_build clang debug
|
||||
setup_build clang release
|
||||
end
|
||||
@@ -1,153 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
function print_help_and_exit
|
||||
echo "\
|
||||
Usage: setup_builds.sh [OPTIONS] compiler build-type
|
||||
|
||||
Positionals:
|
||||
gcc Compile with gcc
|
||||
clang Compile with clang
|
||||
debug Build debug
|
||||
release Build release
|
||||
|
||||
Options:
|
||||
--compiler <clang|gcc> Specify the compiler
|
||||
--type <debug|release> Specify the type of build
|
||||
-f,--force Overwrite existing build directories
|
||||
-h,--help Print this help message and exit
|
||||
|
||||
"
|
||||
exit $argv[1]
|
||||
end
|
||||
|
||||
function assert_dir
|
||||
if test ! -d "$argv[1]"
|
||||
if test -n "$argv[2]"
|
||||
echo "Invalid variable "$argv[2]": '"$argv[1]"' is not a directory"
|
||||
else
|
||||
echo "'"$argv[1]"' is not a directory"
|
||||
end
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
||||
# common variables
|
||||
|
||||
#set tools_path (readlink -f (pwd))
|
||||
#set tools_path (cd (dirname (status --current-filename)); and pwd)
|
||||
set tools_path (realpath (dirname (status -f)))
|
||||
set spartan_path_cmd $tools_path/spartan_path.fish
|
||||
set repo_root (eval $spartan_path_cmd "repo-root")
|
||||
# Don't call 'spartan_path_cmd "build"' bc it returns specific build path
|
||||
# (i.e., for a particular compiler/build type), not the root build path
|
||||
# set build_root (eval $spartan_path_cmd "build")
|
||||
set build_root "$repo_root"/"build"
|
||||
mkdir -p "$build_root"
|
||||
|
||||
# Initialize the build directory. Expected arguments: <compiler>, <build_type>
|
||||
# Note: this method assumes the variables 'repot_root' and 'build_root' have
|
||||
# already been properly initialized
|
||||
function setup_build
|
||||
assert_dir $repo_root
|
||||
assert_dir $build_root
|
||||
set compiler "$argv[1]"
|
||||
set build_type "$argv[2]"
|
||||
|
||||
if test \( -z "$build_type" \) -o \( \( "$build_type" != "debug" \) -a \( "$build_type" != "release" \) \)
|
||||
print_help_and_exit 1
|
||||
end
|
||||
|
||||
if test "$build_type" = "debug"
|
||||
set build_type_arg "Debug"
|
||||
if test "$compiler" = "gcc"
|
||||
set compiler_arg "/usr/lib/ccache/g++"
|
||||
else
|
||||
set compiler_arg "/usr/lib/ccache/clang++"
|
||||
end
|
||||
else if test "$build_type" = "release"
|
||||
set build_type_arg "Release"
|
||||
if test "$compiler" = "gcc"
|
||||
set compiler_arg "g++"
|
||||
else
|
||||
set compiler_arg "clang++"
|
||||
end
|
||||
end
|
||||
|
||||
if test \( -z "$compiler" \) -o \( \( "$compiler" != "gcc" \) -a \( "$compiler" != "clang" \) \)
|
||||
print_help_and_exit 1
|
||||
end
|
||||
|
||||
set build_dest $build_root"/"$compiler"/"$build_type
|
||||
set conan_dest $repo_root"/conan/"$compiler"_"$build_type
|
||||
|
||||
echo "Set up build: "$compiler" "$build_type
|
||||
|
||||
if test \( -z "$force" \) -a \( -d $build_dest \)
|
||||
echo "The build directory '"$build_dest"' already exists (use -f to overwrite)"
|
||||
return 1
|
||||
end
|
||||
|
||||
rm -rf "$build_dest"
|
||||
mkdir -p "$build_dest"
|
||||
mkdir -p "$conan_dest"
|
||||
cd "$build_dest"
|
||||
conan install --build missing --profile $conan_dest $repo_root
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=$build_type_arg -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=$compiler_arg $repo_root
|
||||
end
|
||||
|
||||
# The while loop below removes arguments (via shift) as it parses them.
|
||||
# Additional information that needs to be extracted from the arguments must be
|
||||
# done so before the loop is executed.
|
||||
|
||||
set i 1
|
||||
while test $i -le (count $argv)
|
||||
switch $argv[$i]
|
||||
case '--compiler'
|
||||
set i (math "$i + 1")
|
||||
set compiler $argv[$i]
|
||||
case 'clang'
|
||||
set compiler 'clang'
|
||||
case 'gcc'
|
||||
set compiler 'gcc'
|
||||
case '--type'
|
||||
set i (math "$i + 1")
|
||||
set build_type $argv[$i]
|
||||
case 'release'
|
||||
set build_type 'release'
|
||||
case 'debug'
|
||||
set build_type 'debug'
|
||||
case '-f'
|
||||
set force 1
|
||||
case '--force'
|
||||
set force 1
|
||||
case '-h'
|
||||
print_help_and_exit 0
|
||||
case '--help'
|
||||
print_help_and_exit 0
|
||||
case '*'
|
||||
print_help_and_exit 1
|
||||
end
|
||||
set i (math "$i + 1")
|
||||
end
|
||||
|
||||
echo "compiler in "$compiler
|
||||
echo "build type in "$build_type
|
||||
if test -n "$compiler"
|
||||
if test -n "$build_type"
|
||||
setup_build $compiler $build_type
|
||||
else
|
||||
# all builds for the specified compiler
|
||||
setup_build $compiler "debug"
|
||||
setup_build $compiler "release"
|
||||
end
|
||||
else if test -n "$build_type"
|
||||
# all builds for the specified build type
|
||||
setup_build "gcc" $build_type
|
||||
setup_build "clang" $build_type
|
||||
else
|
||||
# all builds
|
||||
setup_build "gcc" "debug"
|
||||
setup_build "gcc" "release"
|
||||
setup_build "clang" "debug"
|
||||
setup_build "clang" "release"
|
||||
end
|
||||
@@ -1,92 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
#basename (git rev-parse --show-toplevel)
|
||||
|
||||
function print_help_and_exit
|
||||
echo "\
|
||||
Print paths to core parts of the repository
|
||||
Usage: sparkd_path.sh SUBCOMMAND
|
||||
|
||||
Subcommands:
|
||||
build Print build path
|
||||
repo-root Print repo root path
|
||||
|
||||
"
|
||||
exit $argv[1]
|
||||
end
|
||||
|
||||
function print_build_help_and_exit
|
||||
echo "\
|
||||
Print build path
|
||||
Usage: sparkd_path.sh build [OPTIONS] compiler build-type
|
||||
|
||||
Positionals:
|
||||
gcc Print gcc build path
|
||||
clang Print clang build path
|
||||
debug Print debug build path
|
||||
release Print release build path
|
||||
|
||||
Options:
|
||||
--compiler <clang|gcc> Specify the compiler
|
||||
--type <debug|release> Specify the type of build
|
||||
-h,--help Print this help message and exit
|
||||
|
||||
"
|
||||
exit $argv[1]
|
||||
end
|
||||
|
||||
function print_repo_root
|
||||
git rev-parse --show-toplevel
|
||||
end
|
||||
|
||||
function run_repo_root
|
||||
print_repo_root
|
||||
end
|
||||
|
||||
function run_build
|
||||
set compiler "gcc"
|
||||
set build_type "release"
|
||||
set i 1
|
||||
while test $i -lt (count $argv)
|
||||
switch $argv[$i]
|
||||
case '--compiler'
|
||||
set i (math "$i + 1")
|
||||
set compiler $argv[$i]
|
||||
case 'clang'
|
||||
set compiler 'clang'
|
||||
case 'gcc'
|
||||
set compiler 'gcc'
|
||||
case '--type'
|
||||
set i (math "$i + 1")
|
||||
set build_type $argv[$i]
|
||||
case 'release'
|
||||
set build_type 'release'
|
||||
case 'debug'
|
||||
set build_type 'debug'
|
||||
'-h'
|
||||
print_build_help_and_exit 0
|
||||
'--help'
|
||||
print_build_help_and_exit 0
|
||||
'*'
|
||||
print_build_help_and_exit 1
|
||||
end
|
||||
set i (math "$i + 1")
|
||||
end
|
||||
if test \( $compiler = "clang" \) -o \( $compiler = "gcc" \)
|
||||
set comp_path $compiler
|
||||
else
|
||||
print_build_help_and_exit 1
|
||||
end
|
||||
set src_root (print_repo_root)
|
||||
set build_root (readlink -f "$src_root""/build")
|
||||
set build_dest $build_root"/"$compiler"/"$build_type
|
||||
echo $build_dest
|
||||
end
|
||||
|
||||
if test "$argv[1]" = "repo-root"
|
||||
print_repo_root $argv[2..-1]
|
||||
else if test "$argv[1]" = "build"
|
||||
run_build $argv[2..-1]
|
||||
else
|
||||
print_help_and_exit 1
|
||||
end
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set image_name $argv[1]
|
||||
set cont_name $argv[2]
|
||||
|
||||
if test (count $argv) -lt 2
|
||||
if test (count $argv) -lt 1
|
||||
set image_name_cmd (realpath (dirname (status -f)))"/docker_image_name.fish"
|
||||
set image_name (eval $image_name_cmd)
|
||||
end
|
||||
set cont_name_cmd (realpath (dirname (status -f)))"/docker_container_name.fish "$image_name
|
||||
set cont_name (eval $cont_name_cmd)
|
||||
end
|
||||
|
||||
set working_dir (realpath (pwd))
|
||||
|
||||
set home_path /home/john
|
||||
set repo_path (git rev-parse --show-toplevel)
|
||||
set repo_path_out /home/john/Documents/repos/bts/(basename $repo_path)
|
||||
set working_dir $repo_path_out
|
||||
|
||||
echo "starting docker instance '"$cont_name"' (image '"$image_name"')"
|
||||
echo "working dir "$working_dir
|
||||
|
||||
docker run \
|
||||
--rm \
|
||||
--net host \
|
||||
-h (hostname) \
|
||||
-e "TZ=America/New_York" \
|
||||
--cap-add=SYS_PTRACE \
|
||||
--security-opt seccomp=unconfined \
|
||||
--name $cont_name \
|
||||
-v $repo_path:$repo_path_out \
|
||||
-u (id -u $USER) \
|
||||
-w $working_dir \
|
||||
--shm-size=4024m \
|
||||
-t \
|
||||
-i \
|
||||
-d \
|
||||
-e DISPLAY="$DISPLAY" \
|
||||
"$image_name" \
|
||||
bash
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/src",
|
||||
"${workspaceRoot}/externals/linux/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/src",
|
||||
"${workspaceRoot}/externals/linux/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17",
|
||||
"compileCommands": "${workspaceFolder}/build/ninja_debug/compile_commands.json"
|
||||
},
|
||||
{
|
||||
"name": "Windows",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include"
|
||||
],
|
||||
"defines": [
|
||||
"__linux__",
|
||||
"__x86_64__"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/*"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "WindowsQuick",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include"
|
||||
],
|
||||
"defines": [
|
||||
"__linux__",
|
||||
"__x86_64__"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceRoot}/src"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": "${workspaceRoot}/.vscode/browse.vc.db"
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
@@ -1,513 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Spark Local",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"run",
|
||||
"test",
|
||||
"-a",
|
||||
"OutrightVanillaOrder"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceRoot}/build/gcc/debug/server/",
|
||||
"environment": [
|
||||
{
|
||||
"name": "TZ",
|
||||
"value": "America/Chicago"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SparkVM Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"-a",
|
||||
"[ilink3]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Skip STL",
|
||||
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "LD LIBRARY",
|
||||
"text": "set env LD_LIBRARY_PATH=.",
|
||||
"ignoreFailures": false
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceRoot}/build/gcc/debug/src/server/sparkd",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Client Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/spark.exe",
|
||||
"args": [],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "SDK Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/spark_sdk.exe",
|
||||
"args": [
|
||||
"md",
|
||||
"GLBX",
|
||||
"Future",
|
||||
"CL",
|
||||
"CLZ9",
|
||||
"--user=bts",
|
||||
"--pass="
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Excel Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "C:/Program Files/Microsoft Office/Office14/EXCEL.EXE",
|
||||
"args": [
|
||||
"${workspaceRoot}/build/Debug/bin/net471/spark_excel-addin64-packed.xll"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Client Tests",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
|
||||
"args": [
|
||||
"test",
|
||||
"ApiUpdateTests"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Client Attach",
|
||||
"type": "clr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickProcess}"
|
||||
},
|
||||
{
|
||||
"name": "Spreader Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[spreader]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MD Synthetic Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[md][synthetic]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Spartan Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[spartan_md]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Matcher Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[matcher]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Admin Service Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/src/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[admin_service]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/src/server/sparkd/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Limiter Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/src/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[limiter]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/src/server/sparkd/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MD Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[algo]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Skip STL",
|
||||
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SparkVM attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "/home/bts/spark/build/gcc/debug/src/server/sparkd/sparkd",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"MIMode": "gdb",
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Python",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"stopOnEntry": false,
|
||||
"python": "${command:python.interpreterPath}",
|
||||
"program": "${file}",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {},
|
||||
"envFile": "${workspaceRoot}/.env",
|
||||
"args": [
|
||||
"DEBUG"
|
||||
],
|
||||
"debugOptions": [
|
||||
"WaitOnAbnormalExit",
|
||||
"WaitOnNormalExit",
|
||||
"RedirectOutput"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Remote Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"pipeTransport": {
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/home/bts/vsdbg/vsdbg",
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"quoteArgs": true
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
},
|
||||
"justMyCode": true
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Remote Launch",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "/usr/bin/dotnet",
|
||||
"args": [
|
||||
"sparkcmd.dll",
|
||||
"test",
|
||||
"test_join_create_and_takeout_market"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server",
|
||||
"pipeTransport": {
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/home/bts/vsdbg/vsdbg",
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"quoteArgs": true
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
},
|
||||
"justMyCode": false
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -1,941 +0,0 @@
|
||||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"type": "dark",
|
||||
"colors": {
|
||||
"activityBar.background": "#111111",
|
||||
"activityBar.border": "#111111",
|
||||
"activityBar.foreground": "#888888",
|
||||
"activityBarBadge.background": "#88cc44",
|
||||
"activityBarBadge.foreground": "#222222",
|
||||
"badge.background": "#88cc44",
|
||||
"badge.foreground": "#222222",
|
||||
"button.background": "#333333",
|
||||
"button.foreground": "#888888",
|
||||
"button.hoverBackground": "#222222",
|
||||
"debugExceptionWidget.background": "#333333",
|
||||
"debugExceptionWidget.border": "#222222",
|
||||
"debugToolBar.background": "#111111",
|
||||
"diffEditor.insertedTextBackground": "#ffdd440c",
|
||||
"diffEditor.insertedTextBorder": "#ffdd44",
|
||||
"diffEditor.removedTextBackground": "#88bbff0c",
|
||||
"diffEditor.removedTextBorder": "#88bbff",
|
||||
"dropdown.background": "#222222",
|
||||
"dropdown.border": "#222222",
|
||||
"dropdown.foreground": "#888888",
|
||||
"editor.background": "#222222",
|
||||
"editor.findMatchBackground": "#44446655",
|
||||
"editor.findMatchHighlightBackground": "#444466aa",
|
||||
"editor.foreground": "#ffffff",
|
||||
"editor.hoverHighlightBackground": "#44446655",
|
||||
"editor.inactiveSelectionBackground": "#44446655",
|
||||
"editor.lineHighlightBackground": "#00000066",
|
||||
"editor.lineHighlightBorder": "#00000000",
|
||||
"editor.rangeHighlightBackground": "#333333",
|
||||
"editor.selectionBackground": "#444466",
|
||||
"editor.selectionHighlightBackground": "#44446655",
|
||||
"editor.wordHighlightBackground": "#44446655",
|
||||
"editor.wordHighlightStrongBackground": "#44446655",
|
||||
"editorBracketMatch.background": "#222222",
|
||||
"editorBracketMatch.border": "#666666",
|
||||
"editorCodeLens.foreground": "#666666",
|
||||
"editorCursor.foreground": "#ffffff",
|
||||
"editorError.foreground": "#ee5500",
|
||||
"editorGroup.border": "#111111",
|
||||
"editorGroup.dropBackground": "#111111bb",
|
||||
"editorGroupHeader.noTabsBackground": "#111111",
|
||||
"editorGroupHeader.tabsBackground": "#111111",
|
||||
"editorGroupHeader.tabsBorder": "#222222",
|
||||
"editorGutter.addedBackground": "#ffdd44",
|
||||
"editorGutter.background": "#222222",
|
||||
"editorGutter.deletedBackground": "#88bbff",
|
||||
"editorGutter.modifiedBackground": "#88bbff",
|
||||
"editorHoverWidget.background": "#333333",
|
||||
"editorHoverWidget.border": "#222222",
|
||||
"editorIndentGuide.background": "#333333",
|
||||
"editorLineNumber.foreground": "#555555",
|
||||
"editorLink.activeForeground": "#bba0ff",
|
||||
"editorMarkerNavigation.background": "#333333",
|
||||
"editorMarkerNavigationError.background": "#88bbff",
|
||||
"editorMarkerNavigationWarning.background": "#88bbff",
|
||||
"editorOverviewRuler.addedForeground": "#ffdd44",
|
||||
"editorOverviewRuler.border": "#222222",
|
||||
"editorOverviewRuler.currentContentForeground": "#333333",
|
||||
"editorOverviewRuler.deletedForeground": "#88bbff",
|
||||
"editorOverviewRuler.errorForeground": "#88bbff",
|
||||
"editorOverviewRuler.findMatchForeground": "#555555",
|
||||
"editorOverviewRuler.incomingContentForeground": "#333333",
|
||||
"editorOverviewRuler.infoForeground": "#bba0ff",
|
||||
"editorOverviewRuler.modifiedForeground": "#88bbff",
|
||||
"editorOverviewRuler.rangeHighlightForeground": "#333333",
|
||||
"editorOverviewRuler.selectionHighlightForeground": "#555555",
|
||||
"editorOverviewRuler.warningForeground": "#88bbff",
|
||||
"editorOverviewRuler.wordHighlightForeground": "#333333",
|
||||
"editorOverviewRuler.wordHighlightStrongForeground": "#555555",
|
||||
"editorRuler.foreground": "#ffffff",
|
||||
"editorSuggestWidget.background": "#333333",
|
||||
"editorSuggestWidget.border": "#333333",
|
||||
"editorSuggestWidget.foreground": "#888888",
|
||||
"editorSuggestWidget.highlightForeground": "#ffffff",
|
||||
"editorSuggestWidget.selectedBackground": "#666666",
|
||||
"editorWarning.border": "#00000000",
|
||||
"editorWarning.foreground": "#88bbff",
|
||||
"editorWhitespace.foreground": "#333333",
|
||||
"editorWidget.background": "#333333",
|
||||
"editorWidget.border": "#333333",
|
||||
"errorForeground": "#88bbff",
|
||||
"extensionButton.prominentBackground": "#333333",
|
||||
"extensionButton.prominentForeground": "#ffffff",
|
||||
"extensionButton.prominentHoverBackground": "#555555",
|
||||
"focusBorder": "#666666",
|
||||
"foreground": "#ffffff",
|
||||
"gitDecoration.modifiedResourceForeground": "#cccccc",
|
||||
"gitDecoration.untrackedResourceForeground": "#cccccc",
|
||||
"input.background": "#333333",
|
||||
"input.border": "#333333",
|
||||
"input.foreground": "#ffffff",
|
||||
"input.placeholderForeground": "#555555",
|
||||
"inputOption.activeBorder": "#555555",
|
||||
"inputValidation.errorBackground": "#333333",
|
||||
"inputValidation.errorBorder": "#88bbff",
|
||||
"inputValidation.infoBackground": "#333333",
|
||||
"inputValidation.infoBorder": "#bba0ff",
|
||||
"inputValidation.warningBackground": "#333333",
|
||||
"inputValidation.warningBorder": "#88bbff",
|
||||
"list.activeSelectionBackground": "#111111",
|
||||
"list.activeSelectionForeground": "#ffffff",
|
||||
"list.dropBackground": "#111111bf",
|
||||
"list.focusBackground": "#222222",
|
||||
"list.focusForeground": "#ffffff",
|
||||
"list.highlightForeground": "#ffffff",
|
||||
"list.hoverBackground": "#333333",
|
||||
"list.hoverForeground": "#ffffff",
|
||||
"list.inactiveSelectionBackground": "#000000",
|
||||
"list.inactiveSelectionForeground": "#ffffff",
|
||||
"menu.background": "#333333",
|
||||
"menu.foreground": "#ffffff",
|
||||
"merge.border": "#222222",
|
||||
"merge.currentContentBackground": "#333333",
|
||||
"merge.currentHeaderBackground": "#555555",
|
||||
"merge.incomingContentBackground": "#555555",
|
||||
"merge.incomingHeaderBackground": "#666666",
|
||||
"panel.background": "#111111",
|
||||
"panel.border": "#111111",
|
||||
"panelTitle.activeBorder": "#ffffff",
|
||||
"panelTitle.activeForeground": "#ffffff",
|
||||
"panelTitle.inactiveForeground": "#888888",
|
||||
"peekView.border": "#222222",
|
||||
"peekViewEditor.background": "#333333",
|
||||
"peekViewEditor.matchHighlightBackground": "#555555",
|
||||
"peekViewEditorGutter.background": "#333333",
|
||||
"peekViewResult.background": "#333333",
|
||||
"peekViewResult.fileForeground": "#888888",
|
||||
"peekViewResult.lineForeground": "#888888",
|
||||
"peekViewResult.matchHighlightBackground": "#555555",
|
||||
"peekViewResult.selectionBackground": "#333333",
|
||||
"peekViewResult.selectionForeground": "#ffffff",
|
||||
"peekViewTitle.background": "#333333",
|
||||
"peekViewTitleDescription.foreground": "#888888",
|
||||
"peekViewTitleLabel.foreground": "#ffffff",
|
||||
"pickerGroup.border": "#222222",
|
||||
"pickerGroup.foreground": "#555555",
|
||||
"progressBar.background": "#333333",
|
||||
"scrollbar.shadow": "#191919",
|
||||
"scrollbarSlider.activeBackground": "#ffffff12",
|
||||
"scrollbarSlider.background": "#ffffff12",
|
||||
"scrollbarSlider.hoverBackground": "#ffffff12",
|
||||
"selection.background": "#2255aa",
|
||||
"sideBar.background": "#111111",
|
||||
"sideBar.border": "#111111",
|
||||
"sideBar.foreground": "#888888",
|
||||
"sideBarSectionHeader.background": "#111111",
|
||||
"sideBarSectionHeader.foreground": "#666666",
|
||||
"sideBarTitle.foreground": "#555555",
|
||||
"statusBar.background": "#111111",
|
||||
"statusBar.border": "#111111",
|
||||
"statusBar.debuggingBackground": "#666666",
|
||||
"statusBar.debuggingForeground": "#ffffff",
|
||||
"statusBar.foreground": "#666666",
|
||||
"statusBar.noFolderBackground": "#111111",
|
||||
"statusBar.noFolderForeground": "#666666",
|
||||
"statusBarItem.activeBackground": "#222222",
|
||||
"statusBarItem.hoverBackground": "#222222",
|
||||
"statusBarItem.prominentBackground": "#333333",
|
||||
"statusBarItem.prominentHoverBackground": "#444444",
|
||||
"tab.activeBackground": "#222222",
|
||||
"tab.border": "#111111",
|
||||
"tab.inactiveBackground": "#111111",
|
||||
"tab.inactiveForeground": "#888888",
|
||||
"tab.unfocusedActiveBorder": "#888888",
|
||||
"tab.unfocusedActiveForeground": "#888888",
|
||||
"tab.unfocusedInactiveForeground": "#888888",
|
||||
"terminal.ansiBlack": "#333333",
|
||||
"terminal.ansiBlue": "#88bbff",
|
||||
"terminal.ansiBrightBlack": "#666666",
|
||||
"terminal.ansiBrightBlue": "#88bbff",
|
||||
"terminal.ansiBrightCyan": "#bba0ff",
|
||||
"terminal.ansiBrightGreen": "#ffdd44",
|
||||
"terminal.ansiBrightMagenta": "#88bbff",
|
||||
"terminal.ansiBrightRed": "#88bbff",
|
||||
"terminal.ansiBrightWhite": "#ffffff",
|
||||
"terminal.ansiBrightYellow": "#88cc44",
|
||||
"terminal.ansiCyan": "#bba0ff",
|
||||
"terminal.ansiGreen": "#ffdd44",
|
||||
"terminal.ansiMagenta": "#88bbff",
|
||||
"terminal.ansiRed": "#88bbff",
|
||||
"terminal.ansiWhite": "#ffffff",
|
||||
"terminal.ansiYellow": "#88cc44",
|
||||
"terminal.background": "#151515",
|
||||
"terminal.foreground": "#ffffff",
|
||||
"titleBar.activeBackground": "#111111",
|
||||
"titleBar.activeForeground": "#888888",
|
||||
"titleBar.inactiveBackground": "#111111",
|
||||
"titleBar.inactiveForeground": "#555555",
|
||||
"walkThrough.embeddedEditorBackground": "#111111",
|
||||
"widget.shadow": "#111111",
|
||||
//"activityBar.activeBorder": "#888888",
|
||||
//"activityBar.dropBorder": "#888888",
|
||||
//"activityBar.inactiveForeground": "#88888866",
|
||||
//"banner.background": "#111111",
|
||||
//"banner.foreground": "#ffffff",
|
||||
//"banner.iconForeground": "#3794ff",
|
||||
//"bookmarks.lineBackground": "#00000000",
|
||||
//"bookmarks.lineBorder": "#00000000",
|
||||
//"bookmarks.overviewRuler": "#157efb88",
|
||||
//"breadcrumb.activeSelectionForeground": "#ffffff",
|
||||
//"breadcrumb.background": "#222222",
|
||||
//"breadcrumb.focusForeground": "#ffffff",
|
||||
//"breadcrumb.foreground": "#ffffffcc",
|
||||
//"breadcrumbPicker.background": "#333333",
|
||||
//"button.secondaryBackground": "#3a3d41",
|
||||
//"button.secondaryForeground": "#ffffff",
|
||||
//"button.secondaryHoverBackground": "#45494e",
|
||||
//"charts.blue": "#3794ff",
|
||||
//"charts.foreground": "#ffffff",
|
||||
//"charts.green": "#89d185",
|
||||
//"charts.lines": "#ffffff80",
|
||||
//"charts.orange": "#d18616",
|
||||
//"charts.purple": "#b180d7",
|
||||
//"charts.red": "#ee5500",
|
||||
//"charts.yellow": "#88bbff",
|
||||
//"checkbox.background": "#222222",
|
||||
//"checkbox.border": "#222222",
|
||||
//"checkbox.foreground": "#888888",
|
||||
//"debugConsole.errorForeground": "#88bbff",
|
||||
//"debugConsole.infoForeground": "#3794ff",
|
||||
//"debugConsole.sourceForeground": "#ffffff",
|
||||
//"debugConsole.warningForeground": "#88bbff",
|
||||
//"debugConsoleInputIcon.foreground": "#ffffff",
|
||||
//"debugIcon.breakpointCurrentStackframeForeground": "#ffcc00",
|
||||
//"debugIcon.breakpointDisabledForeground": "#848484",
|
||||
//"debugIcon.breakpointForeground": "#e51400",
|
||||
//"debugIcon.breakpointStackframeForeground": "#89d185",
|
||||
//"debugIcon.breakpointUnverifiedForeground": "#848484",
|
||||
//"debugIcon.continueForeground": "#75beff",
|
||||
//"debugIcon.disconnectForeground": "#f48771",
|
||||
//"debugIcon.pauseForeground": "#75beff",
|
||||
//"debugIcon.restartForeground": "#89d185",
|
||||
//"debugIcon.startForeground": "#89d185",
|
||||
//"debugIcon.stepBackForeground": "#75beff",
|
||||
//"debugIcon.stepIntoForeground": "#75beff",
|
||||
//"debugIcon.stepOutForeground": "#75beff",
|
||||
//"debugIcon.stepOverForeground": "#75beff",
|
||||
//"debugIcon.stopForeground": "#f48771",
|
||||
//"debugTokenExpression.boolean": "#4e94ce",
|
||||
//"debugTokenExpression.error": "#f48771",
|
||||
//"debugTokenExpression.name": "#c586c0",
|
||||
//"debugTokenExpression.number": "#b5cea8",
|
||||
//"debugTokenExpression.string": "#ce9178",
|
||||
//"debugTokenExpression.value": "#cccccc99",
|
||||
//"debugView.exceptionLabelBackground": "#6c2022",
|
||||
//"debugView.exceptionLabelForeground": "#ffffff",
|
||||
//"debugView.stateLabelBackground": "#88888844",
|
||||
//"debugView.stateLabelForeground": "#ffffff",
|
||||
//"debugView.valueChangedHighlight": "#569cd6",
|
||||
//"descriptionForeground": "#ffffffb3",
|
||||
//"diffEditor.diagonalFill": "#cccccc33",
|
||||
//"editor.findRangeHighlightBackground": "#3a3d4166",
|
||||
//"editor.focusedStackFrameHighlightBackground": "#7abd7a4d",
|
||||
//"editor.foldBackground": "#4444664d",
|
||||
//"editor.inlineValuesBackground": "#ffc80033",
|
||||
//"editor.inlineValuesForeground": "#ffffff80",
|
||||
//"editor.linkedEditingBackground": "#ff00004d",
|
||||
//"editor.snippetFinalTabstopHighlightBorder": "#525252",
|
||||
//"editor.snippetTabstopHighlightBackground": "#7c7c7c4d",
|
||||
//"editor.stackFrameHighlightBackground": "#ffff0033",
|
||||
//"editor.symbolHighlightBackground": "#444466aa",
|
||||
//"editorActiveLineNumber.foreground": "#c6c6c6",
|
||||
//"editorBracketHighlight.foreground1": "#ffd700",
|
||||
//"editorBracketHighlight.foreground2": "#da70d6",
|
||||
//"editorBracketHighlight.foreground3": "#179fff",
|
||||
//"editorBracketHighlight.foreground4": "#00000000",
|
||||
//"editorBracketHighlight.foreground5": "#00000000",
|
||||
//"editorBracketHighlight.foreground6": "#00000000",
|
||||
//"editorBracketHighlight.unexpectedBracket.foreground": "#ff1212cc",
|
||||
//"editorBracketPairGuide.activeBackground1": "#00000000",
|
||||
//"editorBracketPairGuide.activeBackground2": "#00000000",
|
||||
//"editorBracketPairGuide.activeBackground3": "#00000000",
|
||||
//"editorBracketPairGuide.activeBackground4": "#00000000",
|
||||
//"editorBracketPairGuide.activeBackground5": "#00000000",
|
||||
//"editorBracketPairGuide.activeBackground6": "#00000000",
|
||||
//"editorBracketPairGuide.background1": "#00000000",
|
||||
//"editorBracketPairGuide.background2": "#00000000",
|
||||
//"editorBracketPairGuide.background3": "#00000000",
|
||||
//"editorBracketPairGuide.background4": "#00000000",
|
||||
//"editorBracketPairGuide.background5": "#00000000",
|
||||
//"editorBracketPairGuide.background6": "#00000000",
|
||||
//"editorGhostText.foreground": "#ffffff56",
|
||||
//"editorGutter.commentRangeForeground": "#c5c5c5",
|
||||
//"editorGutter.foldingControlForeground": "#c5c5c5",
|
||||
//"editorHint.foreground": "#eeeeeeb3",
|
||||
//"editorHoverWidget.foreground": "#ffffff",
|
||||
//"editorHoverWidget.highlightForeground": "#ffffff",
|
||||
//"editorHoverWidget.statusBarBackground": "#3d3d3d",
|
||||
//"editorIndentGuide.activeBackground": "#333333",
|
||||
//"editorInfo.foreground": "#3794ff",
|
||||
//"editorInlayHint.background": "#88cc4499",
|
||||
//"editorInlayHint.foreground": "#222222cc",
|
||||
//"editorInlayHint.parameterBackground": "#88cc4499",
|
||||
//"editorInlayHint.parameterForeground": "#222222cc",
|
||||
//"editorInlayHint.typeBackground": "#88cc4499",
|
||||
//"editorInlayHint.typeForeground": "#222222cc",
|
||||
//"editorLightBulb.foreground": "#ffcc00",
|
||||
//"editorLightBulbAutoFix.foreground": "#75beff",
|
||||
//"editorLineNumber.activeForeground": "#c6c6c6",
|
||||
//"editorMarkerNavigationError.headerBackground": "#88bbff1a",
|
||||
//"editorMarkerNavigationInfo.background": "#3794ff",
|
||||
//"editorMarkerNavigationInfo.headerBackground": "#3794ff1a",
|
||||
//"editorMarkerNavigationWarning.headerBackground": "#88bbff1a",
|
||||
//"editorOverviewRuler.bracketMatchForeground": "#a0a0a0",
|
||||
//"editorOverviewRuler.commonContentForeground": "#60606066",
|
||||
//"editorOverviewRuler.unicodeForeground": "#d186167e",
|
||||
//"editorPane.background": "#222222",
|
||||
//"editorSuggestWidget.focusHighlightForeground": "#ffffff",
|
||||
//"editorSuggestWidget.selectedForeground": "#ffffff",
|
||||
//"editorSuggestWidgetStatus.foreground": "#88888880",
|
||||
//"editorUnicodeHighlight.border": "#bd9b03",
|
||||
//"editorUnnecessaryCode.opacity": "#000000aa",
|
||||
//"editorWidget.foreground": "#ffffff",
|
||||
//"extensionBadge.remoteBackground": "#88cc44",
|
||||
//"extensionBadge.remoteForeground": "#222222",
|
||||
//"extensionIcon.preReleaseForeground": "#1d9271",
|
||||
//"extensionIcon.starForeground": "#ff8e00",
|
||||
//"extensionIcon.verifiedForeground": "#3794ff",
|
||||
//"gitDecoration.addedResourceForeground": "#81b88b",
|
||||
//"gitDecoration.conflictingResourceForeground": "#e4676b",
|
||||
//"gitDecoration.deletedResourceForeground": "#c74e39",
|
||||
//"gitDecoration.ignoredResourceForeground": "#8c8c8c",
|
||||
//"gitDecoration.renamedResourceForeground": "#73c991",
|
||||
//"gitDecoration.stageDeletedResourceForeground": "#c74e39",
|
||||
//"gitDecoration.stageModifiedResourceForeground": "#e2c08d",
|
||||
//"gitDecoration.submoduleResourceForeground": "#8db9e2",
|
||||
//"gitlens.closedAutolinkedIssueIconColor": "#a371f7",
|
||||
//"gitlens.closedPullRequestIconColor": "#f85149",
|
||||
//"gitlens.decorations.addedForegroundColor": "#81b88b",
|
||||
//"gitlens.decorations.branchAheadForegroundColor": "#35b15e",
|
||||
//"gitlens.decorations.branchBehindForegroundColor": "#b15e35",
|
||||
//"gitlens.decorations.branchDivergedForegroundColor": "#d8af1b",
|
||||
//"gitlens.decorations.branchMissingUpstreamForegroundColor": "#c74e39",
|
||||
//"gitlens.decorations.branchUnpublishedForegroundColor": "#35b15e",
|
||||
//"gitlens.decorations.branchUpToDateForegroundColor": "#888888",
|
||||
//"gitlens.decorations.copiedForegroundColor": "#73c991",
|
||||
//"gitlens.decorations.deletedForegroundColor": "#c74e39",
|
||||
//"gitlens.decorations.ignoredForegroundColor": "#8c8c8c",
|
||||
//"gitlens.decorations.modifiedForegroundColor": "#cccccc",
|
||||
//"gitlens.decorations.renamedForegroundColor": "#73c991",
|
||||
//"gitlens.decorations.untrackedForegroundColor": "#cccccc",
|
||||
//"gitlens.gutterBackgroundColor": "#ffffff13",
|
||||
//"gitlens.gutterForegroundColor": "#bebebe",
|
||||
//"gitlens.gutterUncommittedForegroundColor": "#00bcf299",
|
||||
//"gitlens.lineHighlightBackgroundColor": "#00bcf233",
|
||||
//"gitlens.lineHighlightOverviewRulerColor": "#00bcf299",
|
||||
//"gitlens.mergedPullRequestIconColor": "#a371f7",
|
||||
//"gitlens.openAutolinkedIssueIconColor": "#3fb950",
|
||||
//"gitlens.openPullRequestIconColor": "#3fb950",
|
||||
//"gitlens.trailingLineBackgroundColor": "#00000000",
|
||||
//"gitlens.trailingLineForegroundColor": "#99999959",
|
||||
//"gitlens.unpublishedCommitIconColor": "#35b15e",
|
||||
//"gitlens.unpulledChangesIconColor": "#b15e35",
|
||||
//"gitlens.unpushlishedChangesIconColor": "#35b15e",
|
||||
//"icon.foreground": "#c5c5c5",
|
||||
//"inputOption.activeBackground": "#66666666",
|
||||
//"inputOption.activeForeground": "#ffffff",
|
||||
//"inputOption.hoverBackground": "#5a5d5e80",
|
||||
//"interactive.activeCodeBorder": "#222222",
|
||||
//"interactive.inactiveCodeBorder": "#000000",
|
||||
//"keybindingLabel.background": "#8080802b",
|
||||
//"keybindingLabel.border": "#33333399",
|
||||
//"keybindingLabel.bottomBorder": "#44444499",
|
||||
//"keybindingLabel.foreground": "#cccccc",
|
||||
//"keybindingTable.headerBackground": "#ffffff0a",
|
||||
//"keybindingTable.rowsBackground": "#ffffff0a",
|
||||
//"list.deemphasizedForeground": "#8c8c8c",
|
||||
//"list.errorForeground": "#f88070",
|
||||
//"list.filterMatchBackground": "#444466aa",
|
||||
//"list.focusHighlightForeground": "#ffffff",
|
||||
//"list.focusOutline": "#666666",
|
||||
//"list.invalidItemForeground": "#b89500",
|
||||
//"list.warningForeground": "#cca700",
|
||||
//"listFilterWidget.background": "#653723",
|
||||
//"listFilterWidget.noMatchesOutline": "#be1100",
|
||||
//"listFilterWidget.outline": "#00000000",
|
||||
//"menu.selectionBackground": "#111111",
|
||||
//"menu.selectionForeground": "#ffffff",
|
||||
//"menu.separatorBackground": "#bbbbbb",
|
||||
//"menubar.selectionBackground": "#ffffff1a",
|
||||
//"menubar.selectionForeground": "#888888",
|
||||
//"merge.commonContentBackground": "#60606029",
|
||||
//"merge.commonHeaderBackground": "#60606066",
|
||||
//"minimap.errorHighlight": "#ff1212b3",
|
||||
//"minimap.findMatchHighlight": "#d18616",
|
||||
//"minimap.foregroundOpacity": "#000000",
|
||||
//"minimap.selectionHighlight": "#264f78",
|
||||
//"minimap.selectionOccurrenceHighlight": "#676767",
|
||||
//"minimap.unicodeHighlight": "#d18616",
|
||||
//"minimap.warningHighlight": "#88bbff",
|
||||
//"minimapGutter.addedBackground": "#587c0c",
|
||||
//"minimapGutter.deletedBackground": "#94151b",
|
||||
//"minimapGutter.modifiedBackground": "#0c7d9d",
|
||||
//"minimapSlider.activeBackground": "#ffffff09",
|
||||
//"minimapSlider.background": "#ffffff09",
|
||||
//"minimapSlider.hoverBackground": "#ffffff09",
|
||||
//"notebook.cellBorderColor": "#000000",
|
||||
//"notebook.cellEditorBackground": "#111111",
|
||||
//"notebook.cellInsertionIndicator": "#666666",
|
||||
//"notebook.cellStatusBarItemHoverBackground": "#ffffff26",
|
||||
//"notebook.cellToolbarSeparator": "#80808059",
|
||||
//"notebook.focusedCellBorder": "#666666",
|
||||
//"notebook.focusedEditorBorder": "#666666",
|
||||
//"notebook.inactiveFocusedCellBorder": "#000000",
|
||||
//"notebook.selectedCellBackground": "#000000",
|
||||
//"notebook.selectedCellBorder": "#000000",
|
||||
//"notebook.symbolHighlightBackground": "#ffffff0b",
|
||||
//"notebookScrollbarSlider.activeBackground": "#ffffff12",
|
||||
//"notebookScrollbarSlider.background": "#ffffff12",
|
||||
//"notebookScrollbarSlider.hoverBackground": "#ffffff12",
|
||||
//"notebookStatusErrorIcon.foreground": "#88bbff",
|
||||
//"notebookStatusRunningIcon.foreground": "#ffffff",
|
||||
//"notebookStatusSuccessIcon.foreground": "#89d185",
|
||||
//"notificationCenterHeader.background": "#424242",
|
||||
//"notificationLink.foreground": "#3794ff",
|
||||
//"notifications.background": "#333333",
|
||||
//"notifications.border": "#424242",
|
||||
//"notifications.foreground": "#ffffff",
|
||||
//"notificationsErrorIcon.foreground": "#ee5500",
|
||||
//"notificationsInfoIcon.foreground": "#3794ff",
|
||||
//"notificationsWarningIcon.foreground": "#88bbff",
|
||||
//"panel.dropBorder": "#ffffff",
|
||||
//"panelSection.border": "#111111",
|
||||
//"panelSection.dropBackground": "#111111bb",
|
||||
//"panelSectionHeader.background": "#80808033",
|
||||
//"ports.iconRunningProcessForeground": "#88cc44",
|
||||
//"problemsErrorIcon.foreground": "#ee5500",
|
||||
//"problemsInfoIcon.foreground": "#3794ff",
|
||||
//"problemsWarningIcon.foreground": "#88bbff",
|
||||
//"quickInput.background": "#333333",
|
||||
//"quickInput.foreground": "#ffffff",
|
||||
//"quickInputList.focusBackground": "#111111",
|
||||
//"quickInputList.focusForeground": "#ffffff",
|
||||
//"quickInputTitle.background": "#ffffff1b",
|
||||
//"sash.hoverBorder": "#666666",
|
||||
//"scm.providerBorder": "#454545",
|
||||
//"searchEditor.findMatchBackground": "#44446670",
|
||||
//"searchEditor.textInputBorder": "#333333",
|
||||
//"settings.checkboxBackground": "#222222",
|
||||
//"settings.checkboxBorder": "#222222",
|
||||
//"settings.checkboxForeground": "#888888",
|
||||
//"settings.dropdownBackground": "#222222",
|
||||
//"settings.dropdownBorder": "#222222",
|
||||
//"settings.dropdownForeground": "#888888",
|
||||
//"settings.dropdownListBorder": "#333333",
|
||||
//"settings.focusedRowBackground": "#80808024",
|
||||
//"settings.focusedRowBorder": "#ffffff1f",
|
||||
//"settings.headerForeground": "#e7e7e7",
|
||||
//"settings.modifiedItemIndicator": "#0c7d9d",
|
||||
//"settings.numberInputBackground": "#333333",
|
||||
//"settings.numberInputBorder": "#333333",
|
||||
//"settings.numberInputForeground": "#ffffff",
|
||||
//"settings.rowHoverBackground": "#80808012",
|
||||
//"settings.textInputBackground": "#333333",
|
||||
//"settings.textInputBorder": "#333333",
|
||||
//"settings.textInputForeground": "#ffffff",
|
||||
//"sideBar.dropBackground": "#111111bb",
|
||||
//"sideBySideEditor.horizontalBorder": "#111111",
|
||||
//"sideBySideEditor.verticalBorder": "#111111",
|
||||
//"statusBar.debuggingBorder": "#111111",
|
||||
//"statusBar.noFolderBorder": "#111111",
|
||||
//"statusBarItem.compactHoverBackground": "#ffffff33",
|
||||
//"statusBarItem.errorBackground": "#0066eb",
|
||||
//"statusBarItem.errorForeground": "#ffffff",
|
||||
//"statusBarItem.prominentForeground": "#666666",
|
||||
//"statusBarItem.remoteBackground": "#88cc44",
|
||||
//"statusBarItem.remoteForeground": "#222222",
|
||||
//"statusBarItem.warningBackground": "#0066eb",
|
||||
//"statusBarItem.warningForeground": "#ffffff",
|
||||
//"symbolIcon.arrayForeground": "#ffffff",
|
||||
//"symbolIcon.booleanForeground": "#ffffff",
|
||||
//"symbolIcon.classForeground": "#ee9d28",
|
||||
//"symbolIcon.colorForeground": "#ffffff",
|
||||
//"symbolIcon.constantForeground": "#ffffff",
|
||||
//"symbolIcon.constructorForeground": "#b180d7",
|
||||
//"symbolIcon.enumeratorForeground": "#ee9d28",
|
||||
//"symbolIcon.enumeratorMemberForeground": "#75beff",
|
||||
//"symbolIcon.eventForeground": "#ee9d28",
|
||||
//"symbolIcon.fieldForeground": "#75beff",
|
||||
//"symbolIcon.fileForeground": "#ffffff",
|
||||
//"symbolIcon.folderForeground": "#ffffff",
|
||||
//"symbolIcon.functionForeground": "#b180d7",
|
||||
//"symbolIcon.interfaceForeground": "#75beff",
|
||||
//"symbolIcon.keyForeground": "#ffffff",
|
||||
//"symbolIcon.keywordForeground": "#ffffff",
|
||||
//"symbolIcon.methodForeground": "#b180d7",
|
||||
//"symbolIcon.moduleForeground": "#ffffff",
|
||||
//"symbolIcon.namespaceForeground": "#ffffff",
|
||||
//"symbolIcon.nullForeground": "#ffffff",
|
||||
//"symbolIcon.numberForeground": "#ffffff",
|
||||
//"symbolIcon.objectForeground": "#ffffff",
|
||||
//"symbolIcon.operatorForeground": "#ffffff",
|
||||
//"symbolIcon.packageForeground": "#ffffff",
|
||||
//"symbolIcon.propertyForeground": "#ffffff",
|
||||
//"symbolIcon.referenceForeground": "#ffffff",
|
||||
//"symbolIcon.snippetForeground": "#ffffff",
|
||||
//"symbolIcon.stringForeground": "#ffffff",
|
||||
//"symbolIcon.structForeground": "#ffffff",
|
||||
//"symbolIcon.textForeground": "#ffffff",
|
||||
//"symbolIcon.typeParameterForeground": "#ffffff",
|
||||
//"symbolIcon.unitForeground": "#ffffff",
|
||||
//"symbolIcon.variableForeground": "#75beff",
|
||||
//"tab.activeForeground": "#ffffff",
|
||||
//"tab.activeModifiedBorder": "#3399cc",
|
||||
//"tab.inactiveModifiedBorder": "#3399cc80",
|
||||
//"tab.lastPinnedBorder": "#585858",
|
||||
//"tab.unfocusedActiveBackground": "#222222",
|
||||
//"tab.unfocusedActiveModifiedBorder": "#3399cc80",
|
||||
//"tab.unfocusedInactiveBackground": "#111111",
|
||||
//"tab.unfocusedInactiveModifiedBorder": "#3399cc40",
|
||||
//"terminal.border": "#111111",
|
||||
//"terminal.dropBackground": "#111111bb",
|
||||
//"terminal.selectionBackground": "#ffffff40",
|
||||
//"testing.iconErrored": "#f14c4c",
|
||||
//"testing.iconFailed": "#f14c4c",
|
||||
//"testing.iconPassed": "#73c991",
|
||||
//"testing.iconQueued": "#cca700",
|
||||
//"testing.iconSkipped": "#848484",
|
||||
//"testing.iconUnset": "#848484",
|
||||
//"testing.message.error.decorationForeground": "#ee5500",
|
||||
//"testing.message.error.lineBackground": "#ff000033",
|
||||
//"testing.message.info.decorationForeground": "#ffffff80",
|
||||
//"testing.peekBorder": "#ee5500",
|
||||
//"testing.peekHeaderBackground": "#ee55001a",
|
||||
//"testing.runAction": "#73c991",
|
||||
//"textBlockQuote.background": "#7f7f7f1a",
|
||||
//"textBlockQuote.border": "#007acc80",
|
||||
//"textCodeBlock.background": "#0a0a0a66",
|
||||
//"textLink.activeForeground": "#3794ff",
|
||||
//"textLink.foreground": "#3794ff",
|
||||
//"textPreformat.foreground": "#d7ba7d",
|
||||
//"textSeparator.foreground": "#ffffff2e",
|
||||
//"toolbar.activeBackground": "#63666750",
|
||||
//"toolbar.hoverBackground": "#5a5d5e50",
|
||||
//"tree.indentGuidesStroke": "#585858",
|
||||
//"tree.tableColumnsBorder": "#cccccc20",
|
||||
//"tree.tableOddRowsBackground": "#ffffff0a",
|
||||
//"welcomePage.progress.background": "#333333",
|
||||
//"welcomePage.progress.foreground": "#3794ff",
|
||||
//"welcomePage.tileBackground": "#333333",
|
||||
//"welcomePage.tileHoverBackground": "#3d3d3d",
|
||||
//"welcomePage.tileShadow": "#111111",
|
||||
//"activityBar.activeBackground": null,
|
||||
//"activityBar.activeFocusBorder": null,
|
||||
//"button.border": null,
|
||||
//"contrastActiveBorder": null,
|
||||
//"contrastBorder": null,
|
||||
//"debugToolBar.border": null,
|
||||
//"diffEditor.border": null,
|
||||
//"dropdown.listBackground": null,
|
||||
//"editor.findMatchBorder": null,
|
||||
//"editor.findMatchHighlightBorder": null,
|
||||
//"editor.findRangeHighlightBorder": null,
|
||||
//"editor.rangeHighlightBorder": null,
|
||||
//"editor.selectionForeground": null,
|
||||
//"editor.selectionHighlightBorder": null,
|
||||
//"editor.snippetFinalTabstopHighlightBackground": null,
|
||||
//"editor.snippetTabstopHighlightBorder": null,
|
||||
//"editor.symbolHighlightBorder": null,
|
||||
//"editor.wordHighlightBorder": null,
|
||||
//"editor.wordHighlightStrongBorder": null,
|
||||
//"editorCursor.background": null,
|
||||
//"editorError.background": null,
|
||||
//"editorError.border": null,
|
||||
//"editorGhostText.background": null,
|
||||
//"editorGhostText.border": null,
|
||||
//"editorGroup.emptyBackground": null,
|
||||
//"editorGroup.focusedEmptyBorder": null,
|
||||
//"editorGroupHeader.border": null,
|
||||
//"editorHint.border": null,
|
||||
//"editorInfo.background": null,
|
||||
//"editorInfo.border": null,
|
||||
//"editorOverviewRuler.background": null,
|
||||
//"editorSuggestWidget.selectedIconForeground": null,
|
||||
//"editorUnnecessaryCode.border": null,
|
||||
//"editorWarning.background": null,
|
||||
//"editorWidget.resizeBorder": null,
|
||||
//"inputValidation.errorForeground": null,
|
||||
//"inputValidation.infoForeground": null,
|
||||
//"inputValidation.warningForeground": null,
|
||||
//"list.activeSelectionIconForeground": null,
|
||||
//"list.filterMatchBorder": null,
|
||||
//"list.inactiveFocusBackground": null,
|
||||
//"list.inactiveFocusOutline": null,
|
||||
//"list.inactiveSelectionIconForeground": null,
|
||||
//"menu.border": null,
|
||||
//"menu.selectionBorder": null,
|
||||
//"menubar.selectionBorder": null,
|
||||
//"minimap.background": null,
|
||||
//"notebook.cellHoverBackground": null,
|
||||
//"notebook.focusedCellBackground": null,
|
||||
//"notebook.inactiveSelectedCellBorder": null,
|
||||
//"notebook.outputContainerBackgroundColor": null,
|
||||
//"notebook.outputContainerBorderColor": null,
|
||||
//"notificationCenter.border": null,
|
||||
//"notificationCenterHeader.foreground": null,
|
||||
//"notificationToast.border": null,
|
||||
//"panelInput.border": null,
|
||||
//"panelSectionHeader.border": null,
|
||||
//"panelSectionHeader.foreground": null,
|
||||
//"peekViewEditor.matchHighlightBorder": null,
|
||||
//"quickInput.list.focusBackground": null,
|
||||
//"quickInputList.focusIconForeground": null,
|
||||
//"searchEditor.findMatchBorder": null,
|
||||
//"sideBarSectionHeader.border": null,
|
||||
//"tab.activeBorder": null,
|
||||
//"tab.activeBorderTop": null,
|
||||
//"tab.hoverBackground": null,
|
||||
//"tab.hoverBorder": null,
|
||||
//"tab.hoverForeground": null,
|
||||
//"tab.unfocusedActiveBorderTop": null,
|
||||
//"tab.unfocusedHoverBackground": null,
|
||||
//"tab.unfocusedHoverBorder": null,
|
||||
//"tab.unfocusedHoverForeground": null,
|
||||
//"terminal.tab.activeBorder": null,
|
||||
//"terminalCursor.background": null,
|
||||
//"terminalCursor.foreground": null,
|
||||
//"testing.message.info.lineBackground": null,
|
||||
//"titleBar.border": null,
|
||||
//"toolbar.hoverOutline": null,
|
||||
//"welcomePage.background": null,
|
||||
//"window.activeBorder": null,
|
||||
//"window.inactiveBorder": null
|
||||
},
|
||||
"tokenColors": [
|
||||
{
|
||||
"scope": [
|
||||
"variable.language.this"
|
||||
],
|
||||
"settings": {
|
||||
"fontStyle": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.bold",
|
||||
"settings": {
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"invalid",
|
||||
"markup.italic",
|
||||
"markup.quote"
|
||||
],
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.underline",
|
||||
"settings": {
|
||||
"fontStyle": "underline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"source.js.jsx punctuation.section.embedded",
|
||||
"entity.name.tag",
|
||||
"string.other.link.description.title",
|
||||
"support.constant",
|
||||
"support.variable",
|
||||
"support.type",
|
||||
"variable.other.class",
|
||||
"support.class.builtin.js",
|
||||
"support.class.console.js",
|
||||
"meta.property-value",
|
||||
"variable.parameter.keyframe-list",
|
||||
"meta.at-rule.keyframes entity.name.function",
|
||||
"expression.embedded.vue punctuation.definition"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#BBA0FF",
|
||||
"fontStyle": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.other.attribute-name.pseudo-class.css",
|
||||
"entity.name.type.object.console",
|
||||
"variable.language",
|
||||
"variable.parameter.function.language.special.self.python",
|
||||
"storage.type",
|
||||
"entity.other.attribute-name.pseudo-element.css"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#BBA0FF",
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.definition.string.template"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#BBA0FF",
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.other.attribute-name.class.css",
|
||||
"entity.other.attribute-name.parent-selector-suffix.css",
|
||||
"entity.other.attribute-name.parent-selector-suffix.css punctuation.definition.entity.css",
|
||||
"meta.definition.function",
|
||||
"markup.underline.link",
|
||||
"markup.inserted",
|
||||
"meta.function-call",
|
||||
"meta.instance.constructor",
|
||||
"meta.attribute-with-value.class string",
|
||||
"string.other.ref",
|
||||
"string.other.restructuredtext.ref",
|
||||
"variable.function",
|
||||
"entity.name.type",
|
||||
"entity.name.function",
|
||||
"variable.other.object.property",
|
||||
"punctuation.separator.key-value",
|
||||
"meta.definition.function.js",
|
||||
"support.class.component.js",
|
||||
"entity.other.inherited-class",
|
||||
"support.class",
|
||||
"support.function.misc",
|
||||
"support.function",
|
||||
"entity.other.attribute-name.id.css",
|
||||
"entity.other.attribute-name.id.css punctuation",
|
||||
"entity.other.attribute-name.class.css punctuation",
|
||||
"meta.function-call support.function.construct",
|
||||
"entity.other.attribute-name"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#FFDD44"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage.type.function.arrow",
|
||||
"settings": {
|
||||
"foreground": "#FFDD44",
|
||||
"fontStyle": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.name.section",
|
||||
"constant.numeric.line-number.match.find-in-files",
|
||||
"markup.heading",
|
||||
"markup.changed",
|
||||
"meta.attribute-with-value.id string",
|
||||
"string",
|
||||
"punctuation.definition.string.begin",
|
||||
"punctuation.definition.string.end",
|
||||
"meta.attribute-selector"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#88CC44"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"keyword",
|
||||
"keyword.control",
|
||||
"constant",
|
||||
"constant.numeric",
|
||||
"constant.language",
|
||||
"constant.other.property",
|
||||
"constant.character.escape",
|
||||
"comment keyword.codetag.notation",
|
||||
"keyword.other.template.begin",
|
||||
"keyword.other.template.end",
|
||||
"markup.raw",
|
||||
"markup.deleted",
|
||||
"meta.property-list.css variable.other",
|
||||
"entity.name.constant.preprocessor",
|
||||
"meta.preprocessor",
|
||||
"punctuation.section.embedded",
|
||||
"punctuation.template-string.element.begin",
|
||||
"punctuation.template-string.element.end",
|
||||
"string.quoted.template punctuation.definition.string.begin",
|
||||
"string.quoted.template punctuation.definition.string.end",
|
||||
"meta.paragraph.markdown meta.dummy.line-break",
|
||||
"meta.paragraph.markdown meta.hard-line-break.markdown",
|
||||
"storage",
|
||||
"storage.class.restructuredtext.ref",
|
||||
"string.other.link.title",
|
||||
"string.other.link.description",
|
||||
"string.regexp punctuation.definition.string.begin",
|
||||
"string.regexp punctuation.definition.string.end",
|
||||
"variable.language.arguments",
|
||||
"storage.modifier",
|
||||
"keyword.operator.new",
|
||||
"keyword.operator",
|
||||
"keyword.operator.spread",
|
||||
"punctuation.section.embedded.end.php source.php",
|
||||
"support.function.construct",
|
||||
"meta.at-rule.keyframes",
|
||||
"meta.at-rule.keyframes entity.other.attribute-name"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#88BBFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"variable.other.substitution"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#88BBFF",
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"meta.function-call meta.function-call.arguments",
|
||||
"meta.function-call meta.arguments",
|
||||
"meta.function-call meta.group",
|
||||
"source.json meta.structure.dictionary",
|
||||
"meta.object.member",
|
||||
"punctuation.definition.group",
|
||||
"string.unquoted.label",
|
||||
"variable.other.member",
|
||||
"entity.name.class",
|
||||
"entity.name.namespace",
|
||||
"constant.other",
|
||||
"variable",
|
||||
"variable.other",
|
||||
"variable.other.constant.js",
|
||||
"text.find-in-files",
|
||||
"source",
|
||||
"entity.name.type.module",
|
||||
"source.sql support.function",
|
||||
"support.other.namespace.php"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#FFFFFF",
|
||||
"fontStyle": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"variable.parameter",
|
||||
"parameters variable.function"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#FFFFFF",
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"variable.other.property",
|
||||
"support.variable.property",
|
||||
"punctuation.separator.key-value",
|
||||
"meta.object-literal.key",
|
||||
"variable.other.object.property",
|
||||
"variable.object.property",
|
||||
"text.html.basic",
|
||||
"text.html.vue-html",
|
||||
"text.html.php",
|
||||
"text.html.derivative",
|
||||
"punctuation.definition.variable",
|
||||
"punctuation.definition.keyword.scss",
|
||||
"meta.jsx.children.js",
|
||||
"meta.tag.attributes keyword.operator.assignment",
|
||||
"support.type.vendored.property-name.css",
|
||||
"support.type.property-name.json",
|
||||
"variable.other.constant.property"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#BBBBCC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.property-name support.type",
|
||||
"settings": {
|
||||
"foreground": "#BBBBCC",
|
||||
"fontStyle": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"keyword.other.substitution",
|
||||
"keyword.operator.heading.restructuredtext",
|
||||
"keyword.operator.table.row.restructuredtext",
|
||||
"keyword.operator.table.data.restructuredtext",
|
||||
"punctuation",
|
||||
"markup.ignored",
|
||||
"markup.untracked",
|
||||
"meta.brace.round",
|
||||
"meta.brace.square",
|
||||
"meta.brace.curly",
|
||||
"meta.delimiter.comma.js",
|
||||
"meta.function-call.without-arguments.js",
|
||||
"meta.function-call.method.without-arguments.js",
|
||||
"source.scss",
|
||||
"string source punctuation.section.embedded",
|
||||
"punctuation.definition.tag.begin source",
|
||||
"source.php"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#9999AA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"comment",
|
||||
"comment punctuation"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#888899",
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.info-token",
|
||||
"settings": {
|
||||
"foreground": "#6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.warn-token",
|
||||
"settings": {
|
||||
"foreground": "#CD9731"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.error-token",
|
||||
"settings": {
|
||||
"foreground": "#F44747"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.debug-token",
|
||||
"settings": {
|
||||
"foreground": "#B267E6"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"utility": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"list": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"vector": "cpp",
|
||||
"xhash": "cpp",
|
||||
"xstring": "cpp",
|
||||
"system_error": "cpp",
|
||||
"array": "cpp",
|
||||
"string_view": "cpp",
|
||||
"xutility": "cpp",
|
||||
"*.ipp": "cpp"
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Touch CMakeLists.txt",
|
||||
"type": "process",
|
||||
"promptOnClose": false,
|
||||
"isBackground": true,
|
||||
"command": "touch",
|
||||
"args": ["${workspaceRoot}/CMakeLists.txt"],
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"echo": false,
|
||||
"revealProblems": "onProblem",
|
||||
"reveal": "silent",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": false,
|
||||
"clear": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "build_configuration",
|
||||
"type": "pickString",
|
||||
"default": "debug",
|
||||
"description": "Configuration:",
|
||||
"options": ["debug", "release"]
|
||||
},
|
||||
{
|
||||
"id": "compiler",
|
||||
"type": "pickString",
|
||||
"default": "gcc",
|
||||
"description": "Compiler",
|
||||
"options": ["clang", "gcc"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Spark Client",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/Debug/bin/net6.0-windows/Spark.exe",
|
||||
"cwd": "${workspaceFolder}/build/Debug/bin/net6.0-windows",
|
||||
"enableStepFiltering": false,
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false
|
||||
},
|
||||
{
|
||||
"name": "Spark Test",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/Debug/bin/net6.0/sparkcmd.exe",
|
||||
"args": ["test", "${input:test}"],
|
||||
"cwd": "${workspaceFolder}/build/Debug/bin/net6.0-windows",
|
||||
"enableStepFiltering": false,
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false
|
||||
},
|
||||
{
|
||||
"name": "Attach (.NET Core)",
|
||||
"type": "coreclr",
|
||||
"request": "attach"
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "test",
|
||||
"description": "The test(s) to run",
|
||||
"type": "promptString"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"cmake.configureOnOpen": false,
|
||||
"workbench.colorTheme": "Default Dark+",
|
||||
"C_Cpp.intelliSenseEngine": "Disabled",
|
||||
"files.associations": {
|
||||
"*.js": "javascript",
|
||||
"*.conf": "jsonc",
|
||||
"array": "cpp",
|
||||
"xtree": "cpp",
|
||||
"chrono": "cpp",
|
||||
"*.ipp": "cpp",
|
||||
"optional": "cpp",
|
||||
"regex": "cpp",
|
||||
"system_error": "cpp",
|
||||
"format": "cpp",
|
||||
"future": "cpp",
|
||||
"istream": "cpp",
|
||||
"memory": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"utility": "cpp",
|
||||
"variant": "cpp",
|
||||
"xlocmes": "cpp",
|
||||
"xlocmon": "cpp",
|
||||
"xlocnum": "cpp",
|
||||
"xloctime": "cpp",
|
||||
"xutility": "cpp",
|
||||
"xstring": "cpp",
|
||||
"string": "cpp",
|
||||
"cstdint": "cpp"
|
||||
},
|
||||
|
||||
"files.exclude": {
|
||||
"**/.g.cs": true,
|
||||
"**/.g.i.cs": true
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build Spark Client",
|
||||
"type": "process",
|
||||
"command": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\VsDevCmd.bat",
|
||||
"args": [
|
||||
"-arch=x64",
|
||||
"-host_arch=x64",
|
||||
"&&",
|
||||
"${workspaceRoot}\\tools\\buildspark.cmd"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Run Spark Client",
|
||||
"type": "process",
|
||||
"command": "${workspaceRoot}\\build\\Debug\\bin\\net6.0-windows\\Spark.exe",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/src",
|
||||
"${workspaceRoot}/externals/linux/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/src",
|
||||
"${workspaceRoot}/externals/linux/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17",
|
||||
"compileCommands": "${workspaceFolder}/build/ninja_debug/compile_commands.json"
|
||||
},
|
||||
{
|
||||
"name": "Windows",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include"
|
||||
],
|
||||
"defines": [
|
||||
"__linux__",
|
||||
"__x86_64__"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/*"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "WindowsQuick",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"${workspaceRoot}/src",
|
||||
"${workspaceRoot}/build/src",
|
||||
"${workspaceRoot}/build/ninja_debug/src",
|
||||
"${workspaceRoot}/externals/windows/include",
|
||||
"${workspaceRoot}/externals/linux/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
|
||||
"${workspaceRoot}/externals/windows/vscode/usr/include"
|
||||
],
|
||||
"defines": [
|
||||
"__linux__",
|
||||
"__x86_64__"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceRoot}/src"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": "${workspaceRoot}/.vscode/browse.vc.db"
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
@@ -1,402 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Spark Local",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"run",
|
||||
"test",
|
||||
"-a",
|
||||
"OutrightVanillaOrder"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceRoot}/build/gcc/debug/server/",
|
||||
"environment": [
|
||||
{
|
||||
"name": "TZ",
|
||||
"value": "America/Chicago"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SparkVM Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"-a",
|
||||
"[ilink3]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Skip STL",
|
||||
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "LD LIBRARY",
|
||||
"text": "set env LD_LIBRARY_PATH=.",
|
||||
"ignoreFailures": false
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceRoot}/build/ninja_debug/src/server/sparkd",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Client Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/spark.exe",
|
||||
"args": [],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "SDK Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/spark_sdk.exe",
|
||||
"args": [
|
||||
"md",
|
||||
"GLBX",
|
||||
"Future",
|
||||
"CL",
|
||||
"CLZ9",
|
||||
"--user=bts",
|
||||
"--pass="
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Excel Launch",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "C:/Program Files/Microsoft Office/Office14/EXCEL.EXE",
|
||||
"args": [
|
||||
"${workspaceRoot}/build/Debug/bin/net471/spark_excel-addin64-packed.xll"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Client Tests",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
|
||||
"args": [
|
||||
"test",
|
||||
"ApiUpdateTests"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"requireExactSource": false
|
||||
},
|
||||
{
|
||||
"name": "Client Attach",
|
||||
"type": "clr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickProcess}"
|
||||
},
|
||||
{
|
||||
"name": "Spreader Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[spreader]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Admin Service Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[admin_service]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Limiter Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[limiter]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "enable pretty-printer",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MD Tests",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
|
||||
"args": [
|
||||
"test",
|
||||
"[algo]"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server/",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"preLaunchTask": "",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
},
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Skip STL",
|
||||
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SparkVM attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"MIMode": "gdb",
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Python",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"stopOnEntry": false,
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"program": "${file}",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {},
|
||||
"envFile": "${workspaceRoot}/.env",
|
||||
"args": [
|
||||
"DEBUG"
|
||||
],
|
||||
"debugOptions": [
|
||||
"WaitOnAbnormalExit",
|
||||
"WaitOnNormalExit",
|
||||
"RedirectOutput"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Remote Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"pipeTransport": {
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/home/bts/vsdbg/vsdbg",
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"quoteArgs": true
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
},
|
||||
"justMyCode": true
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Remote Launch",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"program": "/usr/bin/dotnet",
|
||||
"args": [
|
||||
"sparkcmd.dll",
|
||||
"test",
|
||||
"test_join_create_and_takeout_market"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/home/bts/spark/build/gcc/debug/server",
|
||||
"pipeTransport": {
|
||||
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
|
||||
"pipeArgs": [
|
||||
"bts@sparkvm"
|
||||
],
|
||||
"debuggerPath": "/home/bts/vsdbg/vsdbg",
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"quoteArgs": true
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/home/bts/spark/": "${workspaceRoot}"
|
||||
},
|
||||
"justMyCode": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"utility": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"list": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"vector": "cpp",
|
||||
"xhash": "cpp",
|
||||
"xstring": "cpp",
|
||||
"system_error": "cpp",
|
||||
"array": "cpp",
|
||||
"string_view": "cpp"
|
||||
"xutility": "cpp",
|
||||
"*.ipp": "cpp"
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "client_build",
|
||||
"type": "shell",
|
||||
"command": ".\\tools\\buildspark.cmd",
|
||||
"problemMatcher":"$msCompile",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"label": "server_build",
|
||||
"type": "shell",
|
||||
"command": ".\\tools\\buildsparkd.cmd",
|
||||
"problemMatcher": {
|
||||
"base": "$gcc",
|
||||
"owner": "cpp",
|
||||
"fileLocation": [
|
||||
"relative",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "(.?)(home)(.?)(bts)(.?)(spark)(.?)(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)",
|
||||
"file": 8,
|
||||
"line": 9,
|
||||
"column": 10,
|
||||
"severity": 11,
|
||||
"message": 12
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "linux build (Debug)",
|
||||
"type": "shell",
|
||||
"command": "cd build/ninja_debug; time ninja",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
public
|
||||
@@ -1,15 +0,0 @@
|
||||
# The URL the site will be built for
|
||||
base_url = "https://api.bluetradesys.com"
|
||||
|
||||
title = "BTS Spark API"
|
||||
description = "Documentation for the BTS Spark API"
|
||||
|
||||
compile_sass = true
|
||||
|
||||
highlight_code = true
|
||||
highlight_theme = "kronuz"
|
||||
insert_anchor_links = true
|
||||
build_search_index = true
|
||||
|
||||
[extra]
|
||||
author = "Blue Trading Systems"
|
||||
@@ -1,5 +0,0 @@
|
||||
+++
|
||||
title = "BTS Spark API"
|
||||
+++
|
||||
|
||||
This is index
|
||||
@@ -1,7 +0,0 @@
|
||||
+++
|
||||
title="Client API"
|
||||
redirect_to = "client/getting-started/overview/"
|
||||
sort_by="weight"
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
+++
|
||||
title="Getting Started"
|
||||
sort_by="weight"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
+++
|
||||
title = "Install Prerequisites"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
# C#/.NET
|
||||
|
||||
We target [.NET Standard 2.0](https://docs.microsoft.com/en-us/dotnet/standard/net-standard) so you can use .NET Framework 4.6.1+ or .NET Core 2.0+. Simply add a reference to the [Spark Nuget package](https://www.nuget.org/packages/spark_sdk/) to get started.
|
||||
|
||||
```
|
||||
dotnet new console -lang c#
|
||||
dotnet add package spark_sdk
|
||||
dotnet build
|
||||
```
|
||||
|
||||
# C++
|
||||
|
||||
The easiest way to get started with C++ is to use the Spark Server SDK to develop your application. Follow the instructions to [download and install the Spark Server SDK](/server/getting-started/install) and open the client_sdk sample project. If you want to run your C++ Client SDK application on Windows [contact us](mailto://api@bluetradesys.com) to get the required headers and binaries.
|
||||
|
||||
# JavaScript
|
||||
|
||||
We use JavaScript internally with the Spark Client API over a websocket connection but the documentation and packaging isn't ready yet. If this is something you're interested in get in touch with us at [api@bluetradesys.com](mailto:api@bluetradesys.com).
|
||||
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
+++
|
||||
title = "Overview"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
The Spark Client SDK is a high level command and control API which can be used to build scripts or integrate Spark into your existing ecosystem. The API is divided into several independent **"services"** responsible for different aspects of the system. A Service can define both [remote procedure call (RPC)](/client/getting-started/services#rpc) and incremental [streaming](/client/getting-started/services#streams) data.
|
||||
|
||||
The [Spark Desktop](https://www.bluetradingsystems.com/bts-spark/) is built on top of this API so you can be assured that it is complete and well tested.
|
||||
|
||||
Spark uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) as an interface definition language similar to [GRPC](https://grpc.io) but backed by our custom high-performance TCP protocol. We currently support C#/.NET and C++ <!--and Javascript--> but the architecture is designed for easy extension so contact us about your specific business needs.
|
||||
|
||||
## Orders
|
||||
|
||||
Use the [OrderService](/client/services/orderservice) to send and manage orders including native exchange orders, spreader orders, and custom Algo orders created using the [Spark Server SDK](https://api.bluetradesys.com/server/).
|
||||
|
||||
## Spreader
|
||||
|
||||
Use the [SyntheticSecurityService](/client/services/syntheticsecurityservice) to create and manage synthetic spreads. Once created these spreads show up in the security and market data feeds just like exchange listed spreads.
|
||||
|
||||
## Position
|
||||
|
||||
Use the [PositionService](/client/services/positionservice) to get your position and P&L reports or add fills manually to keep the Spark system up to date with an external system.
|
||||
|
||||
## Administration
|
||||
|
||||
Use the [AdminService](/client/services/adminservice) to manage users and control limits.
|
||||
|
||||
## Market Data
|
||||
|
||||
For .NET subscribe to market data though the high level MarketDataClient interface. From C++ or JavaScript use the MarketDataRelay service directly.
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
+++
|
||||
title = "Services"
|
||||
weight = 20
|
||||
+++
|
||||
|
||||
The Spark Client SDK uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) to define the interface for each service in a language independent manner. Services have both functions which return a single result and streams of data which return values continuously while subscribed. This page describes the mapping from the Protocol Buffer definition to the concrete definition in each supported language.
|
||||
|
||||
# ServiceContext
|
||||
|
||||
To connect your client to the Spark Server you need to get or create a `ServiceContext` instance. A `ServiceContext` represents a connection to the Spark Server and a background thread for handling messages on that connection. Generally there should be a single `ServiceContext` per process. All of the methods on the `ServiceContext` are safe thread safe.
|
||||
|
||||
Construct a ServiceContext by calling the default constructor. The ServiceContext will find the Spark Server by loading the server configuration over an HTTP connection. To determine the URL it will search the following locations and use the first one that is present.
|
||||
|
||||
* A command line argument `-configserver <url>`
|
||||
* An environment variable `BTSCONFIG`
|
||||
* `%APPDATA%/bts/conf/spark.conf` (Windows)
|
||||
* /sparkdata/conf/spark.conf (Linux)
|
||||
* $HOME/sparkdata/conf/spark.conf (Linux)
|
||||
|
||||
If your application is running on a system with the BTS Client installed this will probably work without any further configuration. If you plan to run your client application on a separate machine we recommend setting the `BTSCONFIG` environment variable.
|
||||
|
||||
<div class="info">
|
||||
<i class="fa fa-lightbulb-o fa-fw" aria-hidden="true"></i>
|
||||
If you are using the Spark Server SDK to run a local copy of the Spark server set <p><strong>BTSCONFIG = http://localhost:9000/config/</strong></p>
|
||||
</div>
|
||||
|
||||
To get a proxy for a given service call ServiceContext.locate<T>("qualifier") where T is the type of the service and "qualifier" is an optional qualifier used to disambiguate between 2 instances of the same service. The locate call cannot fail but it may return a disconnected proxy. When you make a call on the proxy you should check the call result to see if the method call succeeded.
|
||||
|
||||
# RPC
|
||||
|
||||
Here is the OrderService reduced to a single method definition. A RPC method always takes exactly 1 argument and returns 1 value. In this example the `create_order` call takes a `Create` instance and returns a `Response`.
|
||||
|
||||
```C
|
||||
service OrderService {
|
||||
rpc create_order(Create) returns (Response);
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
The `Create` and `Response` types are also defined as protocol buffer messages. Each field can either be a primitive type another message or a list or map.
|
||||
|
||||
```C
|
||||
message Create {
|
||||
OrderDefinition new_order = 1;
|
||||
double price = 2;
|
||||
uint32 quantity = 3;
|
||||
}
|
||||
|
||||
message Response {
|
||||
uint32 order_key = 1;
|
||||
OrderError error_code = 2;
|
||||
string msg = 3;
|
||||
}
|
||||
```
|
||||
|
||||
Each RPC call generates both synchronous (blocking) and asynchronous variants. In C# the asynchronous calls have the `_async` suffix and return a `Task`. In C++ the call is overloaded to either return a value synchronously or accept a callback function to be called on the ServiceContext thread when the call completes. <!-- In Javascript only async methods returning a Promise are generated because it never makes sense to make a blocking call in the browser. -->
|
||||
|
||||
To call the resulting service locate a proxy using the [ServiceContext](#servicecontext) and then call `cancel_order` or `cancel_order_async`. If you are calling the Spark API from a GUI application you should always prefer the `_async` version of the calls.
|
||||
|
||||
|
||||
### C# example
|
||||
```c#
|
||||
var ctx = new ServiceContext();
|
||||
var orders = ctx.locate<OrderService>();
|
||||
var response =
|
||||
await orders.create_order_async(
|
||||
new Create { price = 2.25, quantity = 42 });
|
||||
if (response.success) {
|
||||
Console.WriteLine($"success: {response.value}");
|
||||
}
|
||||
else {
|
||||
Console.WriteLine($"Error: {response.error_message}");
|
||||
}
|
||||
```
|
||||
### C++ example
|
||||
```cpp
|
||||
auto ctx = ServiceContext{};
|
||||
auto orders = ctx.locate<OrderService>();
|
||||
Create c;
|
||||
c.set_price(2.25);
|
||||
c.set_quantity(42);
|
||||
// Instead of providing an _async method C++ uses overloading.
|
||||
// To make a syncronous call simply omit the callback
|
||||
orders.create_order(c, [=](const Result<Response>& response) {
|
||||
if(response.success()) {
|
||||
std::cout << "success.";
|
||||
}
|
||||
else {
|
||||
std::cout << "error: " << response.error_message();
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
# Streams
|
||||
|
||||
Streams allow you to subscribe to live updating data. Each stream represents a changing collection of protocol buffer objects. Similar to a database row each item has an `id` which uniquely identifies it within the collection. Updates from the Spark server can add, remove or replace entries in the collection. Since only the changed items are sent over the wire the stream can remain responsive even when it represents a large collection.
|
||||
|
||||
Streams are implemented using the language bindings for [ReativeX](http://reactivex.io/) which provide utility functions to drill down to the specific data your application needs. In C# we provide both mutable and immutable versions of the generated data types (C++ users can rely on `const`).
|
||||
|
||||
When defined in a proto file streams use the `stream` keyword on the result type.
|
||||
```C
|
||||
service OrderService {
|
||||
...
|
||||
rpc fills (FillsSub) returns (stream Fill);
|
||||
}
|
||||
```
|
||||
|
||||
### C# example
|
||||
```c#
|
||||
var sc = new ServiceContext();
|
||||
var orders = sc.locate<OrderService>();
|
||||
var fills_observable = orders.subscribei_fills();
|
||||
var unsub = fills_observable.Subscribe(update => {
|
||||
Console.WriteLine(
|
||||
"Added {0} items, Removed {1} items, Updated {2} items. Total items {3}",
|
||||
update.added.Count(),
|
||||
update.removed.Count(),
|
||||
update.changes.Count(),
|
||||
update.all.Count());
|
||||
});
|
||||
|
||||
Thread.Sleep(TimeSpan.FromMinutes(5));
|
||||
unsub.Dispose();
|
||||
```
|
||||
### C++ Example
|
||||
```cpp
|
||||
#include "lib/api/public/ServiceContext.h"
|
||||
#include "lib/api/services/OrderService.client.pb.h"
|
||||
using namespace bts::api;
|
||||
ServiceContext ctx;
|
||||
auto orders = ctx.locate<orderman::OrderService>();
|
||||
auto unsub = orders.subscribe_fills().subscribe([](const auto& update) {
|
||||
std::cout
|
||||
<< "Added " << update.added().size() << " items, "
|
||||
<< "Removed " << update.removed().size() << " items, "
|
||||
<< "Updated " << update.updated().size() << " items, "
|
||||
<< "Total items " << update.all().size() << std::endl;
|
||||
});
|
||||
std::this_thread::sleep_for(std::chrono::minutes(5));
|
||||
```
|
||||
@@ -1,6 +0,0 @@
|
||||
+++
|
||||
title="Samples"
|
||||
sort_by="weight"
|
||||
weight = 30
|
||||
+++
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
+++
|
||||
title = "AdminService"
|
||||
+++
|
||||
@@ -1,3 +0,0 @@
|
||||
+++
|
||||
title = "OrderService"
|
||||
+++
|
||||
@@ -1,3 +0,0 @@
|
||||
+++
|
||||
title = "PositionService"
|
||||
+++
|
||||
@@ -1,3 +0,0 @@
|
||||
+++
|
||||
title = "SyntheticService"
|
||||
+++
|
||||
@@ -1,6 +0,0 @@
|
||||
+++
|
||||
title="Services"
|
||||
#sort_by="weight"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
+++
|
||||
title = "Market Data"
|
||||
+++
|
||||
|
||||
|
||||
Use the MarketDataService to subscribe enumerate all available securities.
|
||||
|
||||
```cs
|
||||
using System;
|
||||
using System.Threading;
|
||||
using bts.api;
|
||||
using bts.api.core;
|
||||
|
||||
namespace sample {
|
||||
class Program {
|
||||
static void Main(string[] args) {
|
||||
using var context = new ServiceContext();
|
||||
var md = context.locate<MarketDataService>();
|
||||
using var sub = md.subscribe_securities().Subscribe(update => {
|
||||
foreach (var security in update.added) {
|
||||
Console.WriteLine($"Added security {security.Id}: {security.Symbol}");
|
||||
}
|
||||
});
|
||||
|
||||
Thread.Sleep(TimeSpan.FromMinutes(5));
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```cpp
|
||||
#include "lib/api/public/ServiceContext.h"
|
||||
#include "spark/lib/domain_model/Security.h"
|
||||
#include "lib/api/services/MarketDataService.client.pb.h"
|
||||
#include <thread>
|
||||
|
||||
using namespace bts::api;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
ServiceContext ctx;
|
||||
auto md_service = ctx.locate<bts::api::MarketDataService>();
|
||||
auto sub = md_service.subscribe_securities().subscribe([](const auto& update) {
|
||||
for (const auto& s : update.added()) {
|
||||
std::cout << "Added security: " << s->id() << ": " << s->symbol() << std::endl;
|
||||
}
|
||||
});
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::minutes(5));
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
@@ -1,24 +0,0 @@
|
||||
+++
|
||||
title="Algo API"
|
||||
redirect_to = "server/getting-started/overview/"
|
||||
sort_by="weight"
|
||||
+++
|
||||
|
||||
Getting Started
|
||||
- Install (docker, editor)
|
||||
- Downloading
|
||||
- Write your first algo
|
||||
- Testing
|
||||
|
||||
Reference
|
||||
- Subscriptions
|
||||
- Child Orders
|
||||
- Detaching
|
||||
- Attaching
|
||||
- ...
|
||||
|
||||
Samples
|
||||
- Iceberg
|
||||
- Pro-rata
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
+++
|
||||
title="Getting Started"
|
||||
sort_by="weight"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 54 KiB |
@@ -1,138 +0,0 @@
|
||||
+++
|
||||
title = "Development"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Visual Studio Code
|
||||
|
||||
In this section we're going to use the Remote - Containers feature of <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code<i class="fa fa-fw fa-window-restore" aria-hidden="true"></i></a> to simplify the development experience. If you are using a different editor skip to the <a href="#other-editors">other editor</a> section below.
|
||||
|
||||
## Remote - Containers
|
||||
|
||||
The Visual Studio Code Remote containers extension allows it to run a complete development environment inside the Spark SDK Docker container. The editor UI runs as a thin client on your desktop and connects to a headless instance running inside the Spark SDK Docker environment. This configuration allows us to ship a pre-configured set of [Tasks](https://code.visualstudio.com/Docs/editor/tasks) for building and testing your code.
|
||||
|
||||
Start Visual Studio Code and click on the puzzle piece icon on the left-hand side to open the extensions panel. Use the search box at the top to find the "Remote - Containers" extension and install it.
|
||||
|
||||
<img src="../vscode_remote_containers.png" width="640" />
|
||||
|
||||
## Into the Code
|
||||
|
||||
Open the examples/algo_template directory using the File->Open Folder menu option. If you opted to add it to your path during install, you could run `code .` from your command prompt.
|
||||
|
||||
When the workspace opens, you should see a notification offering to let you re-open the workspace inside the container.
|
||||
|
||||
<img src="../vscode_notification.png" width="480" />
|
||||
|
||||
The first time you open the workspace inside the container it will take a few seconds to configure the spark_sdk docker container. While the workspace is open in Visual Studio Code the docker image will also be running in the background. The container will stop automatically when you close the editor.
|
||||
|
||||
Open algo_template.cpp from the file browser on the left or by pressing ctrl-p and typing the name. Each Algo is a standard C++ class which implements **IAlgoOrder**. Placing your cursor on IAlgoOrder and pressing F12 will take you to the IAlgoOrder.h header file where you can browse the API. To learn more about how an Algo is instantiated see the [Algo Initialization](/server/ref/initialization).
|
||||
|
||||
## Compiling
|
||||
|
||||
To build press "Ctrl+Shift+B". You should see the build output at the bottom of your screen. If the build was successful the resulting algo_template.so will be automatically copied to the plugins directory where it will be loaded by the Spark server process on start.
|
||||
|
||||
<img src="../compiled.png" width="640" />
|
||||
|
||||
## Debugging
|
||||
|
||||
To debug your Algo set a breakpoint (F9) and open the Debug panel (Ctrl+Shift+D) and choose "(gdb) Launch". This will launch the Spark Server inside the container with the debugger attached.
|
||||
|
||||
<img src="../gdb_launch.png" width="380" />
|
||||
|
||||
With sparkd running you can launch the Spark Client (spark_client.cmd) and it will connect to the running server. Log in with the user "bts" and no password and open a ladder. You can now select your Algo on the order type dropdown and activate it by clicking on a price on the ladder.
|
||||
|
||||
<img src="../myalgo.png" width="150" />
|
||||
|
||||
While sparkd is running you can also access the Spark Server Admin interface on [http://localhost:9000](http://localhost:9000). Use the same "bts" login to access the admin interface. Here you can manage user and account permissions and risk limits.
|
||||
|
||||
## Starting Spark Server
|
||||
|
||||
To start the Spark Server without attaching a debugger press "Ctrl+Shift+P" and select "Tasks: Run Task" and then "Start Sparkd" and "Never scan task output" This will open a new terminal where you can see any messages logged with the **Sdk** subsystem as well as any warnings or errors. To stop the Spark server simply kill the terminal (trash can icon) or run the "Stop Sparkd" task.
|
||||
|
||||
## Next Steps
|
||||
|
||||
If you would like to understand more about how Docker is working behind the scenes continue to the [next section](#other-editors). Otherwise, continue to [Algo Registration](/server/ref/registration) to learn how Algos are registered with the Spark.
|
||||
|
||||
<hr>
|
||||
|
||||
# Other Editors
|
||||
|
||||
In this section you will be more exposed to the details of how Docker works and how to compile and test your Algo using the command line.
|
||||
|
||||
## Docker
|
||||
|
||||
Spark Server is built and runs only on Linux so you need a Linux development environment to effectively develop plug-ins for it. Docker lets you take the spark_sdk.img disk image and run it inside a virtual Linux machine running on your Windows desktop.
|
||||
|
||||
First, some terminology. A Docker "image" is a disk image containing a complete filesystem. The spark_sdk.img file you imported earlier is an image. A Docker "container" is what you get when you get when you attach this image to a running Linux system. You can connect to a running container and use it to run commands like the C++ compiler or the Spark server. Directories from your local filesystem can be mapped into the Docker container when it starts so you can easily share files.
|
||||
|
||||
### Start
|
||||
|
||||
The first step is to start the spark_sdk Docker container with the examples directory mapped so we can compile the examples inside the container. In your command prompt cd to the *examples* directory that you unzipped from the spark_sdk.zip file. Then run the following command to start the container.
|
||||
|
||||
Windows Command Prompt:
|
||||
{% clipable() %}
|
||||
docker run --rm -it -v %CD%:/examples -u bts -w /examples --shm-size 2048m --name spark_sdk -h spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 9000:9000 -p 9001:9001 spark_sdk bash
|
||||
{% end %}
|
||||
|
||||
**Powershell** / Linux / Mac:
|
||||
{% clipable() %}
|
||||
docker run --rm -it -v ${PWD}:/examples -u bts -w /examples --shm-size 2048m --name spark_sdk -h spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 9000:9000 -p 9001:9001 spark_sdk bash
|
||||
{% end %}
|
||||
|
||||
### Attach
|
||||
|
||||
The container will remain as long as this prompt is open. You can attach an additional to the running container with the following command:
|
||||
{% clipable() %}
|
||||
docker exec -it spark_sdk bash
|
||||
{% end %}
|
||||
|
||||
## Compiling
|
||||
|
||||
Let's look at the algo_template sample first. All of the samples are laid out similarly with a `build.sh` script for compiling. As long as you are running build.sh inside the spark Docker container, it automatically copies the build output to /sparkbin/plugins/ where it needs to be to get loaded by the Spark server.
|
||||
|
||||
```
|
||||
bts@spark_sdk:/examples$ cd algo_template/
|
||||
bts@spark_sdk:/examples/algo_template$ ./build.sh
|
||||
algo_template.so copied to /sparkbin/plugins/
|
||||
Restart sparkd to see changes.
|
||||
```
|
||||
|
||||
## Starting Spark Server
|
||||
|
||||
To start the Spark server `cd /sparkbin/` and run `./sparkd run`. Press Ctrl+C to stop it.
|
||||
```
|
||||
bts@spark_sdk:/sparkbin$ ./sparkd run
|
||||
2019-10-25 16:21:09.383626|262552152803600|Gen|Warn |1 |main|132 |Run.cpp:53 |dev|
|
||||
------------------------------------ Sparkd launched --------------------------------
|
||||
```
|
||||
|
||||
You will see any Sdk log messages as well as any log messages at or above Warning level from other parts of the system. If you need additional diagnostic information more details logs are stored in /sparkdata/data/logging/log. These logs will be automatically deleted when you stop the Docker container.
|
||||
|
||||
With sparkd running you can launch the Spark Client (spark_client.cmd) and it will connect to the running server. Log in with the user "bts" and no password and open a ladder. You can now select your Algo on the order type dropdown and activate it by clicking on a price on the ladder.
|
||||
|
||||
<img src="../myalgo.png" width="150" />
|
||||
|
||||
While sparkd is running you can also access the Spark Server Admin interface on [http://localhost:9000](http://localhost:9000). Use the same "bts" login to access the admin interface. Here you can manage user and account permissions and risk limits.
|
||||
|
||||
## Debugging
|
||||
|
||||
You can debug your algo using gdb from the bash command prompt.
|
||||
|
||||
```bts@spark_sdk:/sparkbin$ gdb --args ./sparkd run
|
||||
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
|
||||
Copyright (C) 2018 Free Software Foundation, Inc.
|
||||
...
|
||||
Reading symbols from ./sparkd...done.
|
||||
(gdb) break algo_template.cpp:45
|
||||
No source file named algo_template.cpp.
|
||||
Make breakpoint pending on future shared library load? (y or [n]) y
|
||||
Breakpoint 1 (algo_template.cpp:45) pending.
|
||||
(gdb) run
|
||||
Starting program: /sparkbin/sparkd run
|
||||
```
|
||||
|
||||
If your editor supports debugging over the ssh protocol you can start sshd from inside the container.
|
||||
|
||||
## Next
|
||||
|
||||
Continue to [Algo Registration](/server/ref/registration) to learn how Algos are registered with the Spark.
|
||||
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
@@ -1,88 +0,0 @@
|
||||
+++
|
||||
title = "Download SDK"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
## Request Access 🔑
|
||||
|
||||
To start using the Server SDK you will need to request access though our sales department. Please email <a href="mailto:api@bluetradesys.com">api@bluetradesys.com</a> or call <a href="tel:919-913-0850">(919) 913-0850</a> and we will provide download credentials.
|
||||
|
||||
## Download
|
||||
|
||||
Download the latest SDK image here: [spark_sdk.zip](https://api.bluetradesys.com/download/spark_sdk.zip)
|
||||
|
||||
Unzip that folder into a working directory. Inside you should see something like this:
|
||||
|
||||
```
|
||||
spark_sdk.img
|
||||
client/
|
||||
spark_client.cmd
|
||||
examples/
|
||||
```
|
||||
|
||||
## Import
|
||||
|
||||
Import the spark_sdk image into docker using the `docker load` command.
|
||||
{% clipable() %}
|
||||
docker load < spark_sdk.img
|
||||
{% end %}
|
||||
|
||||
<div class="info">
|
||||
<i class="fa fa-lightbulb-o fa-fw" aria-hidden="true"></i>
|
||||
<strong>If you see this error it means Docker Desktop is not running:</strong>
|
||||
|
||||
|
||||
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
|
||||
</div>
|
||||
|
||||
Confirm that the import worked by running `docker images` which should list the new image.
|
||||
```
|
||||
c:\bts> docker images
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
bluetradingsystems/spark_sdk latest e2be89436e73 4 hours ago 3.89GB
|
||||
```
|
||||
|
||||
<!--
|
||||
## Run
|
||||
|
||||
Start the docker container by running
|
||||
```
|
||||
docker run -d -v %CD%:/work --name spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 8000:8000 -p 8001:8001 -p 8008:8008 bluetradingsytems/spark_sdk
|
||||
```
|
||||
<div class="linux">
|
||||
<i class="fa fa-linux fa-fw" aria-hidden="true"></i>
|
||||
If you are using Linux or Mac replace <strong>%CD%</strong> with <strong>$PWD</strong>.
|
||||
</div>
|
||||
|
||||
The first time you invoke `docker run` you may be prompted to "share" your filesystem with Docker. This usually works fine but if you run into trouble, see <a href="">Docker Desktop for Windows tips</a> on avoiding common problems.
|
||||
|
||||
## Success 🎉
|
||||
Docker is now running the spark SDK image. If you are on Windows or Mac it is running inside a virtual Linux machine. You can see that is is running by typing `docker ps` to list running docker containers. If you restart the Docker Desktop application you will need to start the spark_sdk image again using `docker start spark_sdk`.
|
||||
|
||||
You should now be able to access an admin interface at http://localhost:8008/ which will let you stop and start the spark server process.
|
||||
-->
|
||||
|
||||
## Update
|
||||
|
||||
To update your Spark SDK simply download an unzip a new [spark_sdk.zip](https://api.bluetradesys.com/download/spark_sdk.zip) and use `docker load < spark_sdk.img` to overwrite the old image with the new one.
|
||||
|
||||
To preserve the old image so you can go back to it later run `docker tag spark_sdk spark_sdk:your_custom_tag` before loading the new SDK image.
|
||||
|
||||
### Re-build the Dev Container
|
||||
|
||||
If you are using Visual Studio Code you also need to rebuild the dev-container so it picks up the new image.
|
||||
|
||||
#### Inside VSCode
|
||||
To re-build from inside Visual Studio Code. Click the 'Remote Explorer' icon on the left hand side.
|
||||
You should see your spark_sdk project listed under the Containers section. Right click on it and select **rebuild-container**.
|
||||
|
||||
#### Command Line
|
||||
To re-build from the command line run `docker ps -a` and find the row with the spark_sdk image.
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
54d96cfa3888 spark_sdk "/bin/sh -c 'echo Co…" About a minute ago Up About a minute 127.0.0.1:9000-9001->9000-9001/tcp quizzical_lichterman
|
||||
```
|
||||
Then run `docker rm 54d96cfa3888` (use your container id instead of 54d96cfa3888) or `docker rm quizzical_lichterman` (use your container name).
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
@@ -1,57 +0,0 @@
|
||||
+++
|
||||
title = "Install Prerequisites"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
These instructions assume you are using Microsoft Windows but you should be able to follow them on a Linux or Mac with minor modifications.
|
||||
|
||||
{% linux() %}
|
||||
When there is a significant difference on non-Windows platforms it will be called out in a box like this one.
|
||||
{% end %}
|
||||
{% info() %}
|
||||
Tips or solutions to common problems will be highlighted in a box like this.
|
||||
{% end %}
|
||||
|
||||
The minimum hardware requirements for using the SDK are:
|
||||
- **12 GB** RAM (preferably 16 GB or more)
|
||||
- 4 CPU cores
|
||||
- 20 GB free hard disk space
|
||||
|
||||
The Spark SDK uses a tool called Docker to distribute all of the tools you need to build and test your trading algorithm ("Algo"). Once you have Docker installed you can download and import the Spark SDK image and be ready to start developing your Algo in a few minutes.
|
||||
|
||||
## Docker
|
||||
|
||||
Download and install <a href="https://www.docker.com/products/docker-desktop" target="_blank">Docker Desktop for Windows/Mac. <i class="fa fa-fw fa-window-restore" aria-hidden="true"></i></a>
|
||||
|
||||
<div class="linux">
|
||||
<i class="fa fa-linux fa-fw" aria-hidden="true"></i>
|
||||
If you are using Linux follow the <a href="https://docs.docker.com/install/#supported-platforms">official install instructions for Docker for your distribution.</a>
|
||||
</div>
|
||||
|
||||
During the install Docker may ask you to enable virtualization support and reboot.
|
||||
|
||||
Once Docker Desktop is installed and running it will create an icon in your system tray area that looks like the Docker logo.
|
||||

|
||||
|
||||
Right click on the tray icon and choose 'Settings' and choose the 'Advanced' tab.
|
||||
|
||||
Ensure that the docker image has 8192 MB of memory and at least 2 cores. Memory that you assign to the docker image will not be available to Windows/Mac while Docker is running. CPU cores are shared with the host OS. Since you are going to use this image to compile your Algo it makes sense to allow Docker to use all available cores.
|
||||
|
||||
<img src="../docker_config.png" width="640" >
|
||||
|
||||
## Sharing
|
||||
|
||||
You need to give Docker access to the Windows drive where your source code is kept.
|
||||
|
||||
Open Settings -> Shared Drives and check the drive where you intend to keep your Algo source code.
|
||||
|
||||
<div class="info">
|
||||
<i class="fa fa-lightbulb-o fa-fw" aria-hidden="true"></i>
|
||||
If you run into trouble with drive sharing, see <a href="https://code.visualstudio.com/docs/remote/troubleshooting#_docker-desktop-for-windows-tips">Docker Desktop for Windows tips</a> on avoiding common problems.
|
||||
</div>
|
||||
|
||||
## Editor
|
||||
|
||||
The Server SDK includes a complete configuration for C++ development with the <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code <i class="fa fa-fw fa-window-restore" aria-hidden="true"></i></a> editor. If you are a new to C++ development on a Linux system we recommend you give this a try as it's the easiest way to get up and running quickly. Of course, If you have a different editor that you prefer we fully support that as well.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,44 +0,0 @@
|
||||
+++
|
||||
title = "Overview"
|
||||
weight = 0
|
||||
+++
|
||||
|
||||
Using the **Spark Server SDK**, users can create new order types ("Algos"). In this case, users implement the new functionality in C++, producing a shared library that is loaded at run time by our Spark Server.
|
||||
|
||||
If you are interested in accessing Spark server remotely, please see the [Spark Client SDK](/client/).
|
||||
|
||||
## Speed
|
||||
|
||||
The Spark platform offers a sub-10 microsecond socket to socket response times for algorithmic trading. With the **Spark Server SDK**, you can create your order types in high-performance C++ and load them into the Spark server.
|
||||
|
||||
Since your order is running inside the Spark Server, there is virtually no overhead allowing your algorithm to take full advantage of the speed Spark offers. Hosting a high-performance language like C++ directly in the Spark server process allows it to respond to the market thousands of times faster than an Algo built using a proprietary drag and drop tool.
|
||||
|
||||
|
||||
## Easy to Get Started
|
||||
|
||||
If you are not actively developing with C++, it can be time-consuming to set up a complete development environment from scratch. That is why we provide a full development environment out of the box with [Docker](https://docker.io) so you can download and try the Server SDK quickly and easily.
|
||||
|
||||
Docker works across Windows, macOS, and Linux, so you don't need to change your development environment to try the Spark API. Docker also ensures that all of the dependencies you need are packaged together in one image, so you know it will work out of the box, no matter the platform.
|
||||
|
||||
## Implementation
|
||||
|
||||
Creating a new Algo begins with implementing a standard C++ class derived from IAlgoOrder. Start from the [algo_template](/server/samples/template) example to get going quickly.
|
||||
|
||||
The first call your new Algo receives is [do_before_launch](/server/ref/initialization#before-launch), which is an opportunity to validate parameters and allocate any long-lived resources needed during execution. Next, it receives either [do_launch](/server/ref/initialization#launch-launch-attached) in the case of a new order or [do_launch_attached](/server/ref/initialization#launch-launch-attached) if the order is attaching to an existing order.
|
||||
|
||||
The Algo receives a reference to [IAlgoServices](/server/ref/subscriptions/), which is how it calls out to the Spark system. It will use [IAlgoServices](/server/ref/subscriptions/) to subscribe to market events, launch and control child orders, and communicate its state to the larger Spark system.
|
||||
|
||||
## Fully Integrated
|
||||
|
||||
When a Spark Server plugin is loaded, it registers its exposed Algos with the Spark Server though the [init_spark_plugin](/server/ref/registration) callback. This callback allows the Algo to describe the parameters it expects so they can be automatically entered in the [Spark Client](https://www.bluetradingsystems.com/bts-spark/).
|
||||
|
||||
<img src="../myalgo.png" width="150" />
|
||||
<img src="../paramsui.png" width="460" />
|
||||
|
||||
Compose your Algo with out of the box Algos in the [Spark Algo Studio](https://www.bluetradingsystems.com/news/155-bts-algo-studio-provides-algo-library-with-customization-functionality) to create new functionality on the fly.
|
||||
|
||||
<img src="../algostudio.png" width="548" /><br />
|
||||
<img src="../iced_algo.png" width="460" />
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 93 KiB |
@@ -1,6 +0,0 @@
|
||||
+++
|
||||
title="Reference"
|
||||
sort_by="weight"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
+++
|
||||
title = "Questions"
|
||||
weight = 40
|
||||
+++
|
||||
|
||||
## I need to make a call that might take a few seconds. What is the best way to do this?
|
||||
|
||||
Create a background thread in [do_before_launch](/server/ref/initialization#before-launch) or [do_launch](/server/ref/initialization#launch-launch-attached) to do the work. Use [on_timer](/server/ref/subscriptions#timer) to poll until the result is available.
|
||||
|
||||
## I don't see the header files in the .zip file. Where are they?
|
||||
|
||||
The SDK headers are baked into the docker image along with the build tools. Once you've loaded the image with `docker load < spark_sdk.img` you can run this command to copy them out to your local file system `docker run --rm -it -v $PWD:/out spark_sdk /bin/tar -cvf /out/headers.tar /sdk/include` This will copy the headers to the current directory in headers.tar. We still recommend doing the actual build inside the docker environment but having a copy of the headers can be useful for setting up your development environment.
|
||||
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
+++
|
||||
title = "Initialization"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
Each Algo derives from IAlgoOrder and overrides virtual methods to receive callbacks from the Spark system.
|
||||
|
||||
|
||||
## Before Launch
|
||||
|
||||
When an order is activated by a user or by another Algo, the first call it receives is do_before_launch. This call happens outside of the latency-sensitive path, so it's the place to validate parameters and set up data structures that the Algo might need.
|
||||
|
||||
This call returns an OrderOpResult, which allows it to fail and return an error message to its creator. If a user created this order, this message is displayed in the [Activity Log](https://www.bluetradingsystems.com/docs/bts_spark/Help/#activity-log) and across the bottom of the ladder.
|
||||
|
||||
Every SDK Algo is a "Dynamic" Algo since it's parameters are defined during [registration](/server/ref/registration/). Use the `get_if<T>` helper to retrieve a named parameter from the `order_params` collection as a `std::option<T>`. If a parameter has a valid default value you can use `std::option::value_or(...)` to set default values for missing parameters. If a parameter *must* exist or must be within a certain valid range, return an error to the caller.
|
||||
|
||||
```cpp
|
||||
OrderOpResult MyAlgo::do_before_launch(IBeforeLaunchAlgoServices& serv) {
|
||||
auto& def = serv.definition();
|
||||
auto& params = def.custom_def().dynamic().order_params();
|
||||
auto mqi = get_if<uint32_t>(params, "Min Quantity");
|
||||
if (!mqi || mqi.value() == 0)
|
||||
return OrderOpResult{
|
||||
ORDER_ERROR_INVALID_ORDER_DEFINITON,
|
||||
"Min Quantity parameter must be defined and non zero"};
|
||||
}
|
||||
```
|
||||
|
||||
<div class="info">
|
||||
<i class="fa fa-lightbulb-o fa-fw" aria-hidden="true"></i>
|
||||
The parameters are defined during <a href="/server/ref/registration/">registration</a> by the <a href="/server/ref/registration/#dynamicorderdescriptor">DynamicOrderDescriptor</a>.
|
||||
</div>
|
||||
|
||||
### IBeforeLaunchAlgoServices
|
||||
|
||||
IBeforeLaunchAlgoServices is passed to `do_before_launch` and allows the Algo to query its environment.
|
||||
|
||||
```cpp
|
||||
class IBeforeLaunchAlgoServices {
|
||||
public:
|
||||
// The OrderDefinition for this algo
|
||||
virtual api::orderman::OrderDefinition const &definition() const = 0;
|
||||
|
||||
// The security this algo is paramterized with (also available from
|
||||
// definition())
|
||||
virtual api::Security const &security() const = 0;
|
||||
|
||||
// The unique order key for this algo
|
||||
virtual OrderKey order_key() const = 0;
|
||||
|
||||
// The parent key for this algo's parent or null_order_key() if the
|
||||
// algo does not have a parent
|
||||
virtual OrderKey parent_order_key() const = 0;
|
||||
|
||||
// The security identified by k or nullptr if no such security exists
|
||||
virtual api::Security const *lookup_security(SecurityKey k) const = 0;
|
||||
|
||||
// Wheter this algo is being attached to an existing order.
|
||||
// If an algo does not support attaching it can return an error
|
||||
// if is_attaching() == true from do_before_launch.
|
||||
virtual bool is_attaching() const = 0;
|
||||
|
||||
// Build a child template that can later can be used to quickly
|
||||
// launch child orders. The reserve parameter indicates how many
|
||||
// orders should be created ahead of time, before they are
|
||||
// launched. This is usefull to remove the relatively expensive
|
||||
// order creation operation to a background thread.
|
||||
virtual ChildTemplate &
|
||||
make_child_template(api::orderman::OrderDefinition const &child_def,
|
||||
size_t reserve = 1) = 0;
|
||||
|
||||
// Get the current time
|
||||
virtual TimeStamp get_time() const;
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
## Launch / Launch Attached
|
||||
|
||||
Depending on the state of `is_attaching()` the next call will either be `do_launch` or `do_launch_attached`. The only difference is that in `do_launch_attached` the existing OrderKey and ChildState are provided.
|
||||
|
||||
`do_launch` and `do_launch_attached` are in the latency-sensitive path and should not do more work than needed. These functions get a reference to `IAlgoServices`, which is a superset of the functionality available on `IBeforeLaunchAlgoServices`. Most Algos should store a pointer or reference to this object for managing child orders (it has a stable address).
|
||||
|
||||
Now is the time to use `IAlgoServices` to subscribe to market events that are relevant to your Algo and create any child orders that need to exist at the start of your Algo. You can safely call IAlgoServices from any `IAlgoOrder` callback.
|
||||
|
||||
To learn more about subscribing to events see [subscriptions](/server/ref/subscriptions).
|
||||
|
||||
### Things to do in the launch callback
|
||||
☑ Store a reference to IAlgoServices
|
||||
☑ Subscribe to relevant market events
|
||||
☑ Launch a child order?
|
||||
|
||||
|
||||
## Update
|
||||
|
||||
If the user or parent Algo changes the order parameters (price, size, or the custom parameters defined during registration), Spark calls the `do_update` callback with the new parameters. It is up to the Algo to decide how to apply the new parameters to update the running state. It can do this by canceling, changing, or adding new child orders.
|
||||
|
||||
|
Before Width: | Height: | Size: 46 KiB |
@@ -1,88 +0,0 @@
|
||||
+++
|
||||
title = "Child Orders"
|
||||
weight = 30
|
||||
+++
|
||||
|
||||
Every Algo must, at some point, launch a child order to be useful. Each child order can be another Algo or regular exchange order. When the child order is updated or filled, those changes are also sent to the parent.
|
||||
|
||||
|
||||
# Templates
|
||||
|
||||
Since launching a child order is one of the most latency-sensitive things an Algo can do, the Server SDK enables you to create a child template. An order template prepares an order based on a known OrderDefinition and gets it ready to send on a background thread. When the Algo determines it is time to send the order, it only needs to provide the price and quantity to complete and send the order. If an Algo expects to send multiple child orders, it can reserve more than one. Preparing a child template is typically done in [do_before_launch](http://127.0.0.1:1111/server/ref/initialization/#before-launch) callback.
|
||||
|
||||
```cpp
|
||||
virtual ChildTemplate&
|
||||
IBeforeLaunchAlgoServices::make_child_template(
|
||||
api::orderman::OrderDefinition const &child_def,
|
||||
size_t reserve = 1);
|
||||
```
|
||||
|
||||
# Launch
|
||||
|
||||
IAlgoServices provides two overloads for launching child orders. By default, launching a child order automatically subscribes the Algo to its state changes.
|
||||
|
||||
Launch a child order from a template if you have one prepared. This is the fastest option.
|
||||
```cpp
|
||||
OrderKey IAlgoServices::launch_child(ChildTemplate&, Price, Quantity, bool subscribe = true);
|
||||
```
|
||||
Launch a child order by constructing an OrderDefinition as needed.
|
||||
```cpp
|
||||
OrderKey launch_child(OrderDefinition const &, Price, Quantity, bool subscribe = true);
|
||||
```
|
||||
|
||||
When a child is launched its `OrderKey` is returned to the caller. This ID can be used to update, cancel, or detach the child order.
|
||||
|
||||
## Update
|
||||
|
||||
To update an existing child order, call update_child and pass an Update. The Update type lets you change the price, size or the entire OrderDefinition. You only need to specify the fields that you intend to update so only set the price() field if that is what you are changing.
|
||||
|
||||
```cpp
|
||||
void IAlgoServices::update_child(OrderKey child, api::orderman::Update const &);
|
||||
```
|
||||
|
||||
## Cancel
|
||||
|
||||
To cancel an existing child order call `cancel_child`. When the order is canceled you will receive an update though the `on_child_change` callback.
|
||||
|
||||
```cpp
|
||||
void IAlgoServices::cancel_child(OrderKey child);
|
||||
```
|
||||
|
||||
## Detach
|
||||
|
||||
The lifetime of a child order is tied to its parent. If a parent is canceled or completed child orders are automatically stopped as well. If the Algo needs to launch an order that will continue after the Algo ends use `detach_child` to sever the connection. This order hierarchy can be viewed in the Spark [Order Book](https://www.bluetradingsystems.com/docs/bts_spark/Trading/#order-book).
|
||||
|
||||
```cpp
|
||||
void IAlgoServices::detach_child(OrderKey child);
|
||||
```
|
||||
To detach all children at once use `detach_all_children`.
|
||||
|
||||
```cpp
|
||||
void IAlgoServices::detach_all_children();
|
||||
```
|
||||
|
||||
# Child Updated
|
||||
|
||||
When a child order is updated the parent receives the `on_child_change` callback with an updated ChildState object.
|
||||
|
||||
```cpp
|
||||
void on_child_change(OrderKey, ChildState const &) override;
|
||||
|
||||
struct ChildState {
|
||||
Price price;
|
||||
Quantity quantity;
|
||||
Quantity total_fills;
|
||||
Price avg_price;
|
||||
Quantity last_fills;
|
||||
Price last_price;
|
||||
ChildStatus status;
|
||||
Quantity fills_at_attach_time;
|
||||
};
|
||||
```
|
||||
|
||||
<!--
|
||||
To talk about:
|
||||
- updating fills (update_fill_state)
|
||||
- handling child finished (unexpected cancel)
|
||||
-->
|
||||
|
||||
|
Before Width: | Height: | Size: 7.2 KiB |
@@ -1,92 +0,0 @@
|
||||
+++
|
||||
title = "Registration"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
When Spark Server starts, it loads all plugins listed in the /sparkbin/plugins directory and calls an exported function named `init_spark_plugin` which must have the following signature.
|
||||
|
||||
```cpp
|
||||
extern "C" void init_spark_plugin(bts::SparkServices &serv) { }
|
||||
```
|
||||
|
||||
The `init_spark_plugin` function registers the Algo with a DynamicOrderDescriptor. Once registered, the Algo appears in the [Spark ladder](https://www.bluetradingsystems.com/docs/bts_spark/Trading/#ladder) and the [Algo Studio](https://www.bluetradingsystems.com/docs/bts_spark/Trading/#algo-studio).
|
||||
|
||||
To register an Algo call `register_dynamic_algo_order` on the provided bts::SparkServices instance. This function takes the DynamicOrderDescriptor and a function that is called to construct the IAlgoOrder. A single init_spark_plugin can call register_dynamic_algo_order multiple times to register multiple Algos.
|
||||
|
||||
The DynamicOrderDescriptor must have a dynamic_order_type (name), or the registration will fail.
|
||||
|
||||
```cpp
|
||||
DynamicOrderDescriptor desc;
|
||||
desc.set_dynamic_order_type("My Algo");
|
||||
auto result =
|
||||
serv.register_dynamic_algo_order(
|
||||
desc, []() { return std::make_unique<MyAlgo>(); });
|
||||
if (result != bts::AlgoRegistrationResult::SUCCESS) {
|
||||
// Algo failed to register
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## DynamicOrderDescriptor
|
||||
|
||||
The DynamicOrderDescriptor describes the type of parameters that the Algo accepts. These inputs can come either from the user manually entering them or from a parent Algo. Spark Algos are composable, so one Algo can activate another. See [Child Orders](/server/ref/orders) for more on how to activate custom order types as child orders.
|
||||
|
||||
Add parameters to the DynamicOrderDescriptor by calling `add_param_desc()` and setting the name and parameter type.
|
||||
|
||||
```cpp
|
||||
*desc.add_param_desc() = param_bool("Enable Feature");
|
||||
*desc.add_param_desc() = param_uint32("Feature Quantity");
|
||||
```
|
||||
|
||||
The above parameters look like this when rendered in the Spark ladder.
|
||||
|
||||
<img src="../paramsui.png" width="460" />
|
||||
|
||||
And like this when viewed in the Spark order book.
|
||||
|
||||
<img src="../orderbook_truncated.png" width="988" />
|
||||
|
||||
Each descriptor can be one of the following types:
|
||||
```
|
||||
// Primitive
|
||||
int32
|
||||
uint32
|
||||
double
|
||||
string
|
||||
bool
|
||||
// Complex
|
||||
Order
|
||||
Array
|
||||
Struct
|
||||
```
|
||||
|
||||
**Currently the Spark UI only renders parameters with primitive types.** The complex types can only be provided by a parent order.
|
||||
|
||||
### Order
|
||||
|
||||
This parameter type indicates that another order type parameterizes this Algo. When the Algo needs to create a child order, it can use this parameter type to create a custom order type instead of defaulting to a limit order.
|
||||
|
||||
For example, an Algo might be designed to wait for a specific market condition before putting in an order. Instead of placing a limit order when the condition is met, the user can specify that it should an IceBerg order. The Algo doesn't need special logic to handle different child order types.
|
||||
|
||||
### Array
|
||||
|
||||
An array parameter is a collection of the same type of parameter. If your Algo needed to behave differently depending on a table of prices, you could send that list in though an array parameter.
|
||||
```cpp
|
||||
*desc.add_param_desc() =
|
||||
param_array("Price Points",
|
||||
param_double("unused").param_type());
|
||||
```
|
||||
|
||||
### Struct
|
||||
|
||||
A struct parameter is a set of named parameter types similar to the entire DynamicOrderDescriptor. The struct parameter type can be combined with the array type to handle tabular data.
|
||||
|
||||
```cpp
|
||||
*desc.add_param_desc() =
|
||||
param_array("Step Table",
|
||||
param_struct("", {
|
||||
param_uint32("Market Quantity"),
|
||||
param_uint32("Order Quantity")
|
||||
}).param_type());
|
||||
```
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
+++
|
||||
title = "Subscriptions"
|
||||
weight = 20
|
||||
+++
|
||||
|
||||
An Algo exists to observe changes in the market and respond to them. When the Algo is [launched](1/server/ref/initialization/#launch-launch-attached) it uses IAlgoServices to subscribe to the events it needs to operate. Each subscribe call is paired with a matching unsubscribe call, which takes the same argument to unsubscribe.
|
||||
|
||||
# Book
|
||||
|
||||
Subscribe to book updates for the specified security call use subscribe_book and unsubscribe book.
|
||||
```cpp
|
||||
// Subscribe to book updates for the specified security
|
||||
void IAlgoServices::subscribe_book(SecurityKey);
|
||||
void IAlgoServices::unsubscribe_book(SecurityKey);
|
||||
|
||||
// You implement
|
||||
virtual void on_book(SecurityKey, Book const &) override;
|
||||
```
|
||||
Get the `SecurityKey` of the current security using:
|
||||
```cpp
|
||||
services.subscribe_book(SecurityKey(algo_services().security().id()));
|
||||
```
|
||||
If your Algo needs to subscribe to other securities, their keys must be passed in as parameters.
|
||||
|
||||
|
||||
To get the details of a security use
|
||||
```cpp
|
||||
api::Security const* IBeforeLaunchAlgoServices::lookup_security(SecurityKey k) const = 0;
|
||||
```
|
||||
|
||||
# Timer
|
||||
To handle time-based logic, an Algo can subscribe to a common timer event that is invoked once every 10 milliseconds. Use the TimeStamp class from `bts_chrono.h` to efficiently handle time calculations.
|
||||
```cpp
|
||||
// Subscribe to a periodic 10ms timer
|
||||
void IAlgoServices::subscribe_timer();
|
||||
// You implement
|
||||
virtual void on_timer() override;
|
||||
```
|
||||
|
||||
# Ticker
|
||||
The status callback is called when the market for this security opens, closes, or has some other state transition.
|
||||
```cpp
|
||||
// Subscribe to trade ticker
|
||||
void IAlgoServices::subscribe_ticker(SecurityKey);
|
||||
// You implement
|
||||
void on_ticker(SecurityKey, TradeVector const&) override;
|
||||
```
|
||||
|
||||
# Trading Status
|
||||
|
||||
The status callback is called when the market for this security opens, closes, or has some other state transition.
|
||||
```cpp
|
||||
// Subscribe to security trading status
|
||||
void IAlgoServices::subscribe_status(SecurityKey);
|
||||
// You implement
|
||||
virtual void on_status(SecurityKey, domain::protobufs::TradingStatus) override;
|
||||
```
|
||||
|
||||
# Child Orders
|
||||
|
||||
When an Algo launches a child order, it is subscribed to the changes on that child automatically. If the Algo unsubscribes from those changes, it can re-subscribe using this method.
|
||||
|
||||
```cpp
|
||||
// Subscribe to child order updates for the specified child order.
|
||||
void IAlgoServices::subscribe_child_change(OrderKey);
|
||||
// You implement
|
||||
virtual void on_child_change(OrderKey, ChildState const &) override;
|
||||
```
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
+++
|
||||
title="Samples"
|
||||
sort_by="weight"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
@@ -1,354 +0,0 @@
|
||||
+++
|
||||
title = "Join"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
|
||||
Join starts working N ticks away from the market (usually) and then watches for the opposite inside to become same side inside market; if there is then enough size on that market, it will join.
|
||||
|
||||
<div class="info">
|
||||
<i class="fa fa-lightbulb-o fa-fw" aria-hidden="true"></i>
|
||||
This sample is part of the Server SDK examples included in the <a href="/server/getting-started/download/">spark_sdk.zip download</a>.
|
||||
</div>
|
||||
|
||||
```cpp
|
||||
#include "spark/lib/config/config.h"
|
||||
#include "spark/lib/config/protos/system.pb.h"
|
||||
#include "spark/lib/domain_model/Security.h"
|
||||
#include "spark/lib/orderman/orders/server/IAlgoOrder.h"
|
||||
#include "spark/lib/orderman/orders/server/IAlgoServices.h"
|
||||
#include "spark/lib/plugin/SparkServices.h"
|
||||
|
||||
#include "spark/lib/orderman/order_factory/IOrderFactory.h"
|
||||
#include "spark/lib/orderman/orderman_utils/Book.h"
|
||||
#include "spark/lib/orderman/orderman_utils/orderman_utils.h"
|
||||
#include "spark/lib/utils/PBUtils.h"
|
||||
|
||||
using namespace bts::api::orderman;
|
||||
using namespace bts::orderman;
|
||||
|
||||
namespace bts {
|
||||
namespace order_example {
|
||||
|
||||
// Join starts working N ticks away from the market (usually) and then
|
||||
// watches for the opposite inside to become same side inside market;
|
||||
// if there is then enough size on that market, it will join.
|
||||
class DynamicJoin : public IAlgoOrder {
|
||||
public:
|
||||
DynamicJoin();
|
||||
~DynamicJoin();
|
||||
|
||||
OrderOpResult do_before_launch(IBeforeLaunchAlgoServices &) override;
|
||||
void do_launch(IAlgoServices &) override;
|
||||
void do_launch_attached(IAlgoServices &, OrderKey, ChildState) override;
|
||||
void do_update(api::orderman::Update const &) override;
|
||||
void on_book(SecurityKey, Book const &) override;
|
||||
void on_child_change(OrderKey, ChildState const &) override;
|
||||
|
||||
private:
|
||||
enum class Status;
|
||||
struct PImpl;
|
||||
std::unique_ptr<PImpl> me;
|
||||
|
||||
IAlgoServices &algo_services() const;
|
||||
void try_to_join();
|
||||
};
|
||||
|
||||
// The three stages our algo goes through. We start by waiting to
|
||||
// observe the book for our security (WAITING_FOR_MD). Once we have a
|
||||
// book we use it to derive our target price and we continue to
|
||||
// monitor the book to see if we should join the market
|
||||
// (WAITING_TO_JOIN). Once the size and price constraints are met we
|
||||
// jump to the target price (JOINED). We remain in the JOINED state
|
||||
// until our order is filled or canceled.
|
||||
enum class DynamicJoin::Status { WAITING_FOR_MD, WAITING_TO_JOIN, JOINED };
|
||||
|
||||
// All state information needed for this algo
|
||||
struct DynamicJoin::PImpl {
|
||||
IAlgoServices *algo_services;
|
||||
Quantity min_quantity_to_join;
|
||||
Status status = Status::WAITING_FOR_MD;
|
||||
OrderKey child_key = null_order_key();
|
||||
ChildTemplate *child_template = nullptr;
|
||||
Book book_at_inception;
|
||||
Book last_book;
|
||||
};
|
||||
|
||||
DynamicJoin::DynamicJoin() : me(new PImpl()) {}
|
||||
DynamicJoin::~DynamicJoin() {}
|
||||
IAlgoServices &DynamicJoin::algo_services() const { return *me->algo_services; }
|
||||
|
||||
// This is called outside of the latency sensitive path
|
||||
// once. Expensive initialization should be done here, rather than
|
||||
// in do_launch()
|
||||
OrderOpResult DynamicJoin::do_before_launch(IBeforeLaunchAlgoServices &serv) {
|
||||
auto &def = serv.definition();
|
||||
bts_assert(def.has_custom_def());
|
||||
bts_assert(def.custom_def().has_dynamic());
|
||||
|
||||
// Validate our parameters, returning an error if we find a
|
||||
// problem. If an error is returned here the order will be
|
||||
// abandoned.
|
||||
auto ¶ms = def.custom_def().dynamic().order_params();
|
||||
auto mqi = get_if<uint32_t>(params, "Min Quantity");
|
||||
if (!mqi || mqi.value() == 0) {
|
||||
return OrderOpResult{
|
||||
ORDER_ERROR_INVALID_ORDER_DEFINITON,
|
||||
"Min Quantity parameter must be defined and non zero"};
|
||||
}
|
||||
|
||||
me->min_quantity_to_join = Quantity(mqi.value());
|
||||
|
||||
if (!serv.is_attaching()) {
|
||||
// If we are not attaching, create a child template so we can
|
||||
// quickly launch our child when the time comes.
|
||||
|
||||
// We will be sending a limit order with the same side,
|
||||
// security, trader, account, etc, as this algo order, so just
|
||||
// copy our definition to the child definition to start with.
|
||||
auto child_def = def;
|
||||
// Now add a limit order component to mark our child as a limit
|
||||
// order. Limit orders do not require any extra parameters
|
||||
// beyond those already inherited from this algo order
|
||||
// (i.e. beyond what we obtained through serv.definition()) so
|
||||
// we can just use a default constructed LimitOrderDefinition.
|
||||
*child_def.mutable_custom_def()->mutable_limit() = LimitOrderDefinition{};
|
||||
// Now just build the child template and cache it for future use
|
||||
me->child_template = &(serv.make_child_template(child_def));
|
||||
} else {
|
||||
// If we are attaching to an existing order then we do not need
|
||||
// to spawn a new child, so there is no need to setup a child
|
||||
// template
|
||||
}
|
||||
|
||||
// All is good, return a default constructed OrderOpResult which
|
||||
// indicates success.
|
||||
return {};
|
||||
}
|
||||
|
||||
// Called in the latency sensitive path, once, when the algo is first
|
||||
// launched.
|
||||
void DynamicJoin::do_launch(IAlgoServices &services) {
|
||||
// Cache our algo services
|
||||
me->algo_services = &services;
|
||||
|
||||
LOG(OrderMan, Diag, "Lauching DynamicJoin k: {} ",
|
||||
algo_services().order_key().value());
|
||||
|
||||
// Launch our child order
|
||||
me->child_key =
|
||||
services.launch_child(*me->child_template, algo_services().price(),
|
||||
algo_services().quantity());
|
||||
|
||||
// Subscribe to market data
|
||||
services.subscribe_book(SecurityKey(algo_services().security().id()));
|
||||
}
|
||||
|
||||
// Called in the latency sensitive path, once, when the algo is first
|
||||
// launched. In this case the algo is provided with an existing order
|
||||
// it is now responsible for managing.
|
||||
void DynamicJoin::do_launch_attached(IAlgoServices &services,
|
||||
OrderKey attached_order, ChildState st) {
|
||||
// The order was launched and attached to an existing order, with
|
||||
// key 'attached_order' and current state 'st'
|
||||
|
||||
// Cache our algo services
|
||||
me->algo_services = &services;
|
||||
|
||||
LOG(OrderMan, Diag,
|
||||
"Lauching DynamicJoin k: {} Attached to existing order: {}",
|
||||
algo_services().order_key().value(), attached_order.value());
|
||||
|
||||
// Cache the key of the attached order we will be managing
|
||||
me->child_key = attached_order;
|
||||
|
||||
// Subscribe to market data
|
||||
services.subscribe_book(SecurityKey(services.security().id()));
|
||||
|
||||
// Simulate a child change so we can update our own state to
|
||||
// reflect that of the child order we attached to. From this point
|
||||
// forward there is no distinction between an algo instance that
|
||||
// spawned a new child order and one that attached to an existing
|
||||
// order.
|
||||
on_child_change(attached_order, st);
|
||||
}
|
||||
|
||||
// Called when a human (or a supervising algo) updates a parameter for
|
||||
// this algo. The implementation validates the update and depending on
|
||||
// the validation outcome either applies the update or terminates the
|
||||
// algo.
|
||||
void DynamicJoin::do_update(api::orderman::Update const &update) {
|
||||
LOG(OrderMan, Diag, "DynamicJoin k: {} receiving update: {}",
|
||||
algo_services().order_key().value(), utils::pb::to_string(update));
|
||||
|
||||
// Validate update
|
||||
if (update.quantity() == 0) {
|
||||
// An invalid update has been detected so we terminate the
|
||||
// algo, signaling an error. Any child orders launched by
|
||||
// this algo will also be terminated.
|
||||
algo_services().terminate_error("Invalid update");
|
||||
return;
|
||||
}
|
||||
|
||||
// Updates have two parts, a standard part consisting of price and
|
||||
// size and present in all updates, and an optional part that is
|
||||
// specific to the algo in question. Below we check for the
|
||||
// existance of this optional part and validate if present.
|
||||
bool has_new_min_qty = false;
|
||||
if (update.has_custom()) {
|
||||
auto ¶ms = update.custom().dynamic().order_params();
|
||||
auto mqi = params.find("Min Quantity");
|
||||
|
||||
if (mqi == params.end() || mqi->second.as_uint32() == 0) {
|
||||
algo_services().terminate_error(
|
||||
"Minimum quantity to join must be greater than 0");
|
||||
return;
|
||||
}
|
||||
has_new_min_qty = true;
|
||||
me->min_quantity_to_join = Quantity(mqi->second.as_uint32());
|
||||
}
|
||||
|
||||
// Update is good, forward it to our child
|
||||
Update child_update;
|
||||
child_update.set_price(update.price());
|
||||
child_update.set_quantity(update.quantity());
|
||||
algo_services().update_child(me->child_key, child_update);
|
||||
|
||||
// Try to join again if conditions changed
|
||||
if (me->status == Status::WAITING_TO_JOIN && has_new_min_qty)
|
||||
try_to_join();
|
||||
}
|
||||
|
||||
// Called when the book for the specified security has changed
|
||||
void DynamicJoin::on_book(SecurityKey, Book const &b) {
|
||||
|
||||
// Cache the book, so we can reffer to it in the event of a
|
||||
// parameter change that might allow us to join
|
||||
me->last_book = b;
|
||||
|
||||
LOG(OrderMan, Diag, "DynamicJoin order {} on book. BID: {}@{} ASK: {}@{}",
|
||||
algo_services().order_key().value(), b.side(api::SIDE_BUY)[0].size(),
|
||||
b.side(api::SIDE_BUY)[0].price(), b.side(api::SIDE_SELL)[0].size(),
|
||||
b.side(api::SIDE_SELL)[0].price());
|
||||
|
||||
switch (me->status) {
|
||||
case Status::WAITING_FOR_MD: {
|
||||
|
||||
auto other_side =
|
||||
securities::other_side(algo_services().definition().side());
|
||||
auto &other_side_top = me->last_book.side(other_side)[0];
|
||||
|
||||
if (other_side_top.size() > 0) {
|
||||
// First time we get the opposite side market, we will use
|
||||
// this price as the target price for the join
|
||||
me->status = Status::WAITING_TO_JOIN;
|
||||
me->book_at_inception = b;
|
||||
LOG(OrderMan, Diag,
|
||||
"JoinOrder order {} receiving first book: {} Target: {}",
|
||||
algo_services().order_key().value(),
|
||||
me->min_quantity_to_join.value(), other_side_top.price());
|
||||
try_to_join();
|
||||
}
|
||||
} break;
|
||||
case Status::JOINED:
|
||||
// Nothing to do at this point
|
||||
break;
|
||||
case Status::WAITING_TO_JOIN:
|
||||
// Check if we reached the target and join if so
|
||||
try_to_join();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Given the current book, our target price and our min quantity
|
||||
// parameter, join if appropriate
|
||||
void DynamicJoin::try_to_join() {
|
||||
bts_assert(me->status == Status::WAITING_TO_JOIN);
|
||||
|
||||
auto my_side = algo_services().definition().side();
|
||||
auto other_side = securities::other_side(my_side);
|
||||
auto &my_side_psz = me->last_book.side(my_side)[0];
|
||||
auto &opposite_at_inception_psz = me->book_at_inception.side(other_side)[0];
|
||||
|
||||
if (my_side_psz.size() &&
|
||||
my_side_psz.size() >= me->min_quantity_to_join.value() &&
|
||||
securities::is_equal_or_better(
|
||||
my_side, Price(my_side_psz.price()),
|
||||
Price(opposite_at_inception_psz.price()))) {
|
||||
|
||||
// Time to update our child to join the market
|
||||
Update child_update;
|
||||
child_update.set_price(my_side_psz.price());
|
||||
child_update.set_quantity(algo_services().quantity().value());
|
||||
algo_services().update_child(me->child_key, child_update);
|
||||
me->status = Status::JOINED;
|
||||
|
||||
LOG(OrderMan, Diag, "DynamicJoin order {} joined: {}@{}",
|
||||
algo_services().order_key().value(),
|
||||
algo_services().quantity().value(), my_side_psz.price());
|
||||
|
||||
} else {
|
||||
LOG(OrderMan, Diag,
|
||||
"JoinOrder order {} still waiting to join. Order: {}@{} Top of "
|
||||
"the book: {}@{} Target: {}@{}",
|
||||
algo_services().order_key().value(),
|
||||
algo_services().quantity().value(), algo_services().price().value(),
|
||||
my_side_psz.size(), my_side_psz.price(),
|
||||
me->min_quantity_to_join.value(), opposite_at_inception_psz.price());
|
||||
}
|
||||
}
|
||||
|
||||
// Our child reported a change:
|
||||
void DynamicJoin::on_child_change(OrderKey, ChildState const &st) {
|
||||
// Our fill quantity and price is always a reflection of our
|
||||
// child's state
|
||||
algo_services().update_fill_state(st.total_fills, st.last_price);
|
||||
|
||||
switch (st.status) {
|
||||
case ChildStatus::WORKING:
|
||||
// Child order is still working, nothing to do
|
||||
return;
|
||||
case ChildStatus::COMPLETED:
|
||||
// Child order completed, we should also complete
|
||||
algo_services().complete();
|
||||
return;
|
||||
case ChildStatus::CANCELED:
|
||||
// Child order unexpectedly canceled, signal an error and
|
||||
// terminate
|
||||
algo_services().terminate_error("Unexpected child cancel");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// This is called by the spark daemon at startup. In this call we
|
||||
// describe our algo's parameters and register a factory function to
|
||||
// create an instance of the algo.
|
||||
extern "C" void init_spark_plugin(bts::SparkServices &serv) {
|
||||
using namespace bts;
|
||||
|
||||
DynamicOrderDescriptor join_desc;
|
||||
|
||||
// Start by naming our order type
|
||||
join_desc.set_dynamic_order_type("dyn join");
|
||||
|
||||
// Now add a single unsigned int parameter, Min Quantity, that will
|
||||
// determine the minimum quantity that must exist in the book in
|
||||
// order for us to join the market.
|
||||
*join_desc.add_param_desc() = param_uint32("Min Quantity");
|
||||
|
||||
// Associate the descriptor with a builder function and register
|
||||
// that with the Spark server.
|
||||
auto result =
|
||||
serv.register_dynamic_algo_order(
|
||||
join_desc, []() { return std::make_unique<DynamicJoin>(); });
|
||||
|
||||
if (result != bts::AlgoRegistrationResult::SUCCESS) {
|
||||
// The join_desc has errors
|
||||
// Check the error log for more details
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace order_example
|
||||
} // namespace bts
|
||||
|
||||
```
|
||||