erg/crates/erg_compiler
2023-11-15 11:20:10 +09:00
..
context feat: var-kwargs codegen 2023-11-14 02:17:47 +09:00
error feat: make erg_compiler available as a Python lib 2023-11-15 11:20:10 +09:00
lib feat: add jinja2 type declaration 2023-11-12 12:23:32 +09:00
module fix: module cache bug 2023-10-11 03:59:11 +09:00
tests fix: forward-referenced method inference bug 2023-10-29 21:24:40 +09:00
ty feat: var-kwargs codegen 2023-11-14 02:17:47 +09:00
.gitignore Rename dir: compiler -> crates 2023-01-15 12:03:19 +09:00
artifact.rs chore: add parameter Builder to PackageBuilder 2023-10-11 11:46:23 +09:00
build.rs Rename dir: compiler -> crates 2023-01-15 12:03:19 +09:00
build_hir.rs chore: add New trait 2023-11-03 12:56:46 +09:00
build_package.rs chore: add PackageBuilder::build_module 2023-11-06 23:43:27 +09:00
Cargo.toml feat: make erg_compiler available as a Python lib 2023-11-15 11:20:10 +09:00
codegen.rs feat: var-kwargs codegen 2023-11-14 02:17:47 +09:00
compile.rs chore: add New trait 2023-11-03 12:56:46 +09:00
declare.rs feat: add kw-var-args 2023-11-12 09:52:59 +09:00
desugar_hir.rs chore: add hir::Methods 2023-11-05 01:18:32 +09:00
effectcheck.rs chore: add hir::Methods 2023-11-05 01:18:32 +09:00
hir.rs feat: add kw-var-args 2023-11-12 09:52:59 +09:00
lib.rs feat: make erg_compiler available as a Python lib 2023-11-15 11:20:10 +09:00
link_ast.rs chore: eliminate clippy warns 2023-08-24 23:38:27 +09:00
link_hir.rs chore: add hir::Methods 2023-11-05 01:18:32 +09:00
lint.rs chore: add hir::Methods 2023-11-05 01:18:32 +09:00
lower.rs feat: add SubrType::kw_var_params 2023-11-12 12:22:48 +09:00
main.rs chore: let HIRBuilder/ASTLowerer be generic 2023-11-03 03:03:11 +09:00
optimize.rs feat: make erg_compiler available as a Python lib 2023-11-15 11:20:10 +09:00
ownercheck.rs feat: add SubrType::kw_var_params 2023-11-12 12:22:48 +09:00
README.md feat: make erg_compiler available as a Python lib 2023-11-15 11:20:10 +09:00
transpile.rs chore: add hir::Methods 2023-11-05 01:18:32 +09:00
varinfo.rs fix: closure codegen bug 2023-10-20 12:26:57 +09:00

The Erg compiler (codename: Centimetre)

The overall structure is described in detail in architecture.md(English).For other language translations of architecture.md, please check them out by yourself.

Use erg_compiler as a Python library

erg_compiler can be built as a Python library by using pyo3/maturin.

Example

import erg_compiler

module = erg_compiler.exec_module(".i = 1")
# foo.er:
# .bar = 1
foo = erg_compiler.__import__("foo")
assert module.i == 1
assert foo.bar == 1

Debug install (using venv)

python -m venv .venv
source .venv/bin/activate
maturin develop --features pylib_compiler

Release install

maturin build -i python --release --features pylib_compiler
pip install <output wheel>