-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from DoubleCouponDay/feat/hosted
Feat/hosted
- Loading branch information
Showing
32 changed files
with
454 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
/C_part/lib/ | ||
/Rust_part/target/ | ||
/Rust_part/tests/ | ||
/Rust_part/libvec.a | ||
/Rust_part/Cargo.lock | ||
C_part/.xmake/ | ||
C_part/build/ | ||
C_part/test/ | ||
README.md | ||
LICENSE | ||
.gitignore | ||
/.vscode/ | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.13.4) | ||
project(vec) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup() | ||
|
||
file(GLOB sourceglob | ||
"${PROJECT_SOURCE_DIR}/src/*.h" "${PROJECT_SOURCE_DIR}/src/*.c" | ||
"${PROJECT_SOURCE_DIR}/src/utility/*.h" "${PROJECT_SOURCE_DIR}/src/utility/*.c" | ||
"${PROJECT_SOURCE_DIR}/src/nsvg/*.h" "${PROJECT_SOURCE_DIR}/src/nsvg/*.c" | ||
"${PROJECT_SOURCE_DIR}/src/imagefile/*.h" "${PROJECT_SOURCE_DIR}/src/imagefile/*.c") | ||
|
||
add_library(${PROJECT_NAME} STATIC ${sourceglob}) | ||
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "./src/entrypoint.h") | ||
|
||
file(COPY "../template.svg" DESTINATION "./bin") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[requires] | ||
libpng/1.6.37 | ||
nanosvg/20190405 | ||
|
||
[generators] | ||
cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#include "error.h" | ||
|
||
#include "utility/logger.h" | ||
#include "logger.h" | ||
|
||
int error_code = SUCCESS_CODE; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#designed for linux build | ||
FROM rust:1.50 | ||
|
||
RUN apt-get update && \ | ||
apt-get install apt-utils -y && \ | ||
apt-get dist-upgrade -y && \ | ||
apt-get install -y musl-tools && \ | ||
apt-get install software-properties-common -y && \ | ||
apt-get install python3=3.7.3-1 -y && \ | ||
apt-get install python-pip -y && \ | ||
python -m pip install --upgrade pip && \ | ||
python -m pip install conan && \ | ||
apt-get install cmake -y && \ | ||
apt-get install build-essential && \ | ||
rustup target add x86_64-unknown-linux-musl | ||
|
||
# copy C source and Rust source | ||
COPY ./ /home/sjsui/vectorizer/ | ||
|
||
# set environment variables | ||
ENV conanpath /root/.conan/data/ | ||
ENV releasebuild true | ||
ENV PATH $PATH:/home/sjsui/vectorizer/Rust_part/target/release | ||
|
||
# initialize build tools | ||
WORKDIR /home/sjsui/vectorizer/C_part/build/ | ||
RUN conan install ../ && \ | ||
conan profile update settings.compiler.libcxx=libstdc++11 default && \ | ||
cmake ../ && \ | ||
make | ||
|
||
#build Rust code | ||
WORKDIR /home/sjsui/vectorizer/Rust_part/ | ||
RUN cargo build -vv --release | ||
|
||
#create entrypoint of container | ||
CMD ["./target/release/trampoline"] |
Oops, something went wrong.