-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ac5267
commit e3705d3
Showing
15 changed files
with
4,642 additions
and
10 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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
|
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,38 @@ | ||
ARG GO_VERSION=1.21 | ||
ARG RUST_VERSION=nightly-2023-12-03 | ||
ARG CARGO_CHEF_TAG=0.1.41 | ||
|
||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update && ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime | ||
|
||
# Install basic packages | ||
RUN apt-get install -y build-essential | ||
RUN apt-get install -y curl | ||
RUN apt-get install -y wget | ||
RUN apt-get install -y git | ||
RUN apt-get install -y pkg-config | ||
|
||
# Install dev-packages | ||
RUN apt-get install -y libclang-dev | ||
RUN apt-get install -y libssl-dev | ||
RUN apt-get install -y llvm | ||
|
||
# Install Rust | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
ENV CARGO_HOME=/root/.cargo | ||
# Add Toolchain | ||
ARG RUST_VERSION | ||
RUN rustup toolchain install ${RUST_VERSION} | ||
ARG CARGO_CHEF_TAG | ||
RUN cargo install cargo-chef --locked --version ${CARGO_CHEF_TAG} \ | ||
&& rm -rf $CARGO_HOME/registry/ | ||
|
||
# Install Go | ||
ARG GO_VERSION | ||
RUN rm -rf /usr/local/go | ||
RUN wget https://go.dev/dl/go${GO_VERSION}.1.linux-amd64.tar.gz | ||
RUN tar -C /usr/local -xzf go${GO_VERSION}.1.linux-amd64.tar.gz | ||
RUN rm go${GO_VERSION}.1.linux-amd64.tar.gz | ||
ENV PATH="/usr/local/go/bin:${PATH}" |
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 +1,40 @@ | ||
# da-codec | ||
# da-codec | ||
|
||
## Building `libscroll_zstd.so` File. | ||
|
||
Follow these steps to build the `.so` file: | ||
|
||
1. Build and enter the container: | ||
``` | ||
make run | ||
``` | ||
2. Change directory to rs: | ||
``` | ||
cd rs | ||
``` | ||
3. Build libzstd: | ||
``` | ||
export CARGO_NET_GIT_FETCH_WITH_CLI=true | ||
make libzstd | ||
``` | ||
## Running unit tests | ||
Follow these steps to run unit tests: | ||
1. Build and enter the container: | ||
``` | ||
make run | ||
``` | ||
2. Set the directory for shared libraries: | ||
``` | ||
export LD_LIBRARY_PATH=${PWD}/rs:$LD_LIBRARY_PATH | ||
``` | ||
3. Execute the unit tests: | ||
``` | ||
go test -v -race ./... | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target | ||
/_obj |
Oops, something went wrong.