This library started off as a fork of https://github.com/jlindsey/hcl2.
Vektor Execution Language (VXL) is a chain-agnostic highly flexible grammar to interact with smart contracts and blockchains.
The vxl-parser
project is responsible for:
- Converting a string input into objects e.g.
Function
,Argument
,Optional Argument
. - Validating the input is syntactically correct.
- Having some light
domain
knowledge such as addresses start with0x
.
It is not responsible for aspects such as:
- Knowing about assets in the crypto ecosystem.
- Determing if a command can work across 2 blockchains.
- Knowing if a user has enough funds to execute a command.
Name | Purpose | Install | Version |
---|---|---|---|
Rust | Rust toolchain | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh |
rustc 1.49.0 , rustup 1.23.1 |
wasm-pack | WASM builder | cargo install wasm-pack |
0.10.0 |
- Build the workspace with
cargo build
/core
- parsing library/cli
- CLI app e.g.cat test.vxl | ./vxl
/js
- JavaScript WASM library/elixir
- Elixir NIF library
cargo build
wasm-pack build --dev --scope vektor js
The compilation and loading is handled by mix
at build or runtime.
cargo test
Omit --headless
to test interactively
wasm-pack test --chrome --safari --firefox --headless js
wasm-pack test --node js
cargo bench
Currently, we compile and package the vxl-parser
using wasm-pack
which works but has some brittle steps that could be improved.
We rename the package in the outputted package.json
during a publish step (for convenience sake but not necessarily required).