/crystallib

Primary LanguageVApache License 2.0Apache-2.0

Get started with crystallib

the following script will install vlang and crystallib

curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer.sh > /tmp/install.sh
bash /tmp/install.sh

requirements

  • ssh key loaded for access to github

alternative with manual git checkout & v install

requirements

  • v installed
  • ssh key loaded for access to github
mkdir -p ~/code/github/freeflowuniverse
cd ~/code/github/freeflowuniverse
git clone git@github.com:freeflowuniverse/crystallib.git
cd crystallib
# checkout a branch with most recent changes
# git checkout development 
bash install.sh

get latest hero

curl -L https://api.github.com/repos/freeflowuniverse/crystallib/actions/artifacts | jq -r '.artifacts | map(select(.name == "hero-macos-11.zip")) | sort_by(.updated_at) | last' |  jq -r '.archive_download_url'

wget --header='Authorization: token YOUR_GITHUB_TOKEN' -O filename.zip 'https://api.github.com/repos/freeflowuniverse/crystallib/actions/artifacts/1145996741/zip'

wget  -O filename.zip 'https://api.github.com/repos/freeflowuniverse/crystallib/actions/artifacts/1145996741/zip'

manual

The v documentation is on https://freeflowuniverse.github.io/crystallib

todo: there is some content underneath manual, but we are in process to use hero to generate mdbook. Stay tuned.

generating docs

#cd in this directory
cd ~/code/github/freeflowuniverse/crystallib
bash doc.sh

Install Hero

hero is our "hero" tool to execute 3script, deal with git, ...

hero will be installed in

  • /usr/local/bin for linux
  • ~/hero/bin for osx
curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/hero_install.sh > /tmp/hero_install.sh
bash /tmp/hero_install.sh
#to use hero make sure you restart your shell or you do (if osx)
source ~/.zprofile 
#check how to use, can also do on each of the subcommands
hero -help

requirements

  • ssh key loaded for access to github

to compile

bash ~/code/github/freeflowuniverse/crystallib/cli/hero/compile.sh

test your code before checking in

cd ~/code/github/freeflowuniverse/crystallib
bash test.sh
  • use v test crystallib/core/pathlib to run tests of one module