Make decodal the published library crate
This commit is contained in:
@@ -2,40 +2,39 @@
|
||||
|
||||
Decodal is a small deterministic DSL for describing, composing, validating, and materializing structured data.
|
||||
|
||||
It is designed around a lightweight Rust core:
|
||||
It is designed around a lightweight Rust library:
|
||||
|
||||
- host-supplied imports through `SourceLoader`
|
||||
- no filesystem access in `decodal-core`
|
||||
- no filesystem access in the library core
|
||||
- concrete and abstract values with constraints and defaults
|
||||
- deterministic expression evaluation
|
||||
- optional regex support behind a Cargo feature
|
||||
- browser playground support through WebAssembly
|
||||
|
||||
## Install the CLI
|
||||
## Library crate
|
||||
|
||||
```sh
|
||||
cargo install decodal
|
||||
Embedded hosts should depend on `decodal` and provide imports with a `SourceLoader`.
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
decodal = "0.1"
|
||||
```
|
||||
|
||||
Run a Decodal file:
|
||||
## CLI
|
||||
|
||||
A standalone CLI is kept in this repository as the `decodal-cli` workspace package.
|
||||
It builds a `decodal` binary, but it is not the primary crates.io package.
|
||||
|
||||
Run a Decodal file from the repository:
|
||||
|
||||
```sh
|
||||
decodal examples/advanced/main.dcdl
|
||||
cargo run -q -p decodal-cli -- examples/advanced/main.dcdl
|
||||
```
|
||||
|
||||
Enable optional regex support when needed:
|
||||
|
||||
```sh
|
||||
cargo install decodal --features regex
|
||||
```
|
||||
|
||||
## Library crate
|
||||
|
||||
Embedded hosts should depend on `decodal-core` and provide imports with a `SourceLoader`.
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
decodal-core = "0.1"
|
||||
cargo run -q -p decodal-cli --features regex -- examples/regex/main.dcdl
|
||||
```
|
||||
|
||||
## Web playground
|
||||
|
||||
Reference in New Issue
Block a user