Hydent Docs for developers
compiler fases
Section titled “compiler fases”- SURFACE
cli: receive user’s input and send that intocompilerand return the resultscompiler: manage all compile process and resource with scheduling
- FRONTEND(using
CompilerFrontendContext)tokenizer: tokenize input and generateVec<Token>parser: parseVec<Token>and generateASTdependency_resolution: resolve file and package level devendencyname_resolution: resolve name and typetype_checker: check if type is correct
- MIDDLEEND(using
CompilerMiddleendContext)hir_gen: generate hir that is more low-level and brief lang fromASThir_transform: optimize or transform hirmir_gen: generate mir from hirmir_transform: optimize or transform mir
- BACKEND(using
CompilerBackendContext)llvmir_gen: generate llvm-irlinker: link the output binary to binaries from other programming language and export one binary
- OTHER
diagnostic: manage compiler diagnostic from any faseslinter: lintdoc_gen: generate documents from source codecommon: utility for all fases
How to build Compiler
Section titled “How to build Compiler”dependencies
Section titled “dependencies”- Rust stable toolchains (cargo, rustfmt, rustc, clippy)
- Rust nightly toolchains (miri)
- Node.js
- (in the future) LLVM_21 with libpolly-21-dev
- Install script dependencies bia npm
cd scriptnpm installnpm start- Build compiler bia cargo
cargo build --release