Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
Components driver in Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw committed Jan 4, 2016
1 parent 167d83f commit 3864b75
Show file tree
Hide file tree
Showing 7 changed files with 651 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Components/

target/
*.swp
49 changes: 49 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]

name = "components"
version = "0.3.0-rc.1"
authors = [ "Alexey Denisov <1101.debian@gmail.com>", "Stanislav Pankevich <s.pankevich@gmail.com>" ]

[[bin]]
name = "components"
path = "src/components.rs"
test = false

[dev-dependencies]
tempdir = "*"

12 changes: 6 additions & 6 deletions components.sh → History/components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readonly SCRIPT_NAME=$0

##### Global
readonly export COMPONENTS_BUILD_CACHE_PATH=$HOME/Library/Caches/Components
readonly export COMPONENTS_PATH=$PWD/Components
readonly export COMPONENTS_INSTALL_PATH=$PWD/Components
readonly export COMPONENTS_MAKE_PATH=${COMPONENTS_MAKE_PATH:-$PWD/Components.make}

### Messages
Expand All @@ -33,8 +33,8 @@ Usage:
command:
install - downloads, builds (if needed) and installs component
into a vendor directory (COMPONENTS_PATH)
uninstall - removes component from a vendor directory (COMPONENTS_PATH)
into a vendor directory (COMPONENTS_INSTALL_PATH)
uninstall - removes component from a vendor directory (COMPONENTS_INSTALL_PATH)
clean - removes downloaded files and built artefacts from
cache dir (COMPONENTS_BUILD_CACHE_PATH)
purge - cleans and uninstalls component
Expand All @@ -50,8 +50,8 @@ Usage:
Directories:
COMPONENTS_MAKE_PATH - directory contains all components used in the current project
$COMPONENTS_MAKE_PATH
COMPONENTS_PATH - directory contains all installed components for the current project
$COMPONENTS_PATH
COMPONENTS_INSTALL_PATH - directory contains all installed components for the current project
$COMPONENTS_INSTALL_PATH
COMPONENTS_BUILD_CACHE_PATH - stores zip/tarballs, built artefacts, or source code of used components
$COMPONENTS_BUILD_CACHE_PATH
Expand Down Expand Up @@ -87,7 +87,7 @@ function show_usage_and_die() {

function prepare_directories() {
mkdir -p $COMPONENTS_BUILD_CACHE_PATH
mkdir -p $COMPONENTS_PATH
mkdir -p $COMPONENTS_INSTALL_PATH
mkdir -p $COMPONENTS_TEMP_PATH
mkdir -p $COMPONENTS_MAKE_PATH
}
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
default: test

build:
cargo build --release --target=x86_64-apple-darwin

test: build
COMPONENTS_EXEC=./target/x86_64-apple-darwin/release/components cargo test -- --nocapture

0 comments on commit 3864b75

Please sign in to comment.