# LCAx

The goal for LCAx is to make an open, machine and human-readable data format for exchanging LCA results,
EPD's and assemblies.

We propose a simple three level data format with information on project, assembly and EPD level,
written in an open data format and paired with a validator for a more robust and standardized format.
We intend to create connections to existing tools and API’s.

Our goal is making LCA calculations more accessible, transparent, and open.

![LCAx](./docs/assets/benchmark.png)

# Rust

## Install Rust
Head over to Rust's installation [page](https://www.rust-lang.org/tools/install)

## Install Rust Dependencies
```bash
cargo update
```

## Run Rust Tests

```bash
cargo test --package lcax --target x86_64-unknown-linux-gnu
```

## Export JSON Schema
```bash
cargo run -p lcax --target x86_64-unknown-linux-gnu --bin export-schema > lcax.schema.json

```

# Python

## Install Python Dependencies
```bash
uv tool install maturin
uv sync --dev
```

## Run Python Tests

```bash
uv run pytest
```

## Documentation Dev Server

```bash
cd docs
npm run dev
```

# JavaScript/TypeScript
Install wasm-pack
```bash
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
```

## Build JS Package

```bash
cd modules/lcax
wasm-pack build --features jsbindings
mv pkg/lcax* ../../packages/javascript/src
rm -rf pkg
rm ../LICENSE
```

## Run JS Tests
```bash
npm run test
```