An Introduction to Dragon/Lessons/Installation
Appearance
Installation and Building from Source
[edit | edit source]Dragon is currently distributed as source and built with Cargo, so a recent stable Rust toolchain (edition 2021) is required.
Cloning and building
[edit | edit source]# Clone the repository
git clone https://github.com/aaveshdev/dragon.git
cd dragon
# Build the CLI in debug mode
cargo build
# Build an optimized release binary (recommended)
cargo build --release
The compiled CLI binary is produced as dragon (or dragon.exe on Windows) at:
target/release/dragon
Cargo also builds a shared library (dragon_lib, i.e. dragon_lib.dll / libdragon_lib.so / libdragon_lib.dylib) automatically alongside the CLI, since the library target's crate type includes both cdylib and rlib.
Installing the CLI globally
[edit | edit source]cargo install --path .
This installs the dragon binary onto your PATH, so it can be invoked from any directory.
Feature and target notes
[edit | edit source]- Native codegen (
--native) shells out to a system C compiler (gcc,clang, orclon Windows), so one of these must be on yourPATHfor that feature to work. - Android targets pull in
jni/ndkdependencies automatically. - WASM targets pull in
wasm-bindgen/web-sys/getrandomautomatically. - On
aarch64-unknown-linux-gnu, OpenSSL is vendored and built from source, so a C toolchain is required there as well.
License
[edit | edit source]Dragon is licensed under the MIT License.