Make decodal the published library crate
This commit is contained in:
@@ -24,7 +24,7 @@ Primitive type names such as `String`, `Int`, `Float`, and `Bool` are handled be
|
||||
The host can bind values before adding or evaluating user sources.
|
||||
|
||||
```rust
|
||||
use decodal_core::{EmptyLoader, Engine, HostValue};
|
||||
use decodal::{EmptyLoader, Engine, HostValue};
|
||||
|
||||
let mut engine = Engine::new(EmptyLoader);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ primitive type conflict や明らかな numeric bound conflict は合成時に
|
||||
|
||||
## Core defaults
|
||||
|
||||
`decodal-core` defaults to `std` only.
|
||||
`decodal` defaults to `std` only.
|
||||
|
||||
```toml
|
||||
[features]
|
||||
@@ -46,7 +46,7 @@ std = []
|
||||
regex = ["std", "dep:regex"]
|
||||
```
|
||||
|
||||
Building `decodal-core` with `--no-default-features` keeps the core in `no_std + alloc` mode and avoids optional dependencies.
|
||||
Building `decodal` with `--no-default-features` keeps the core in `no_std + alloc` mode and avoids optional dependencies.
|
||||
|
||||
## Regex
|
||||
|
||||
@@ -54,7 +54,7 @@ Regex constraints are implemented behind the `regex` feature.
|
||||
When the feature is disabled, regex constraints parse and compose, but validating a concrete value against them returns an unsupported feature diagnostic.
|
||||
|
||||
```sh
|
||||
cargo run -q -p decodal --features regex -- examples/regex/main.dcdl
|
||||
cargo run -q -p decodal-cli --features regex -- examples/regex/main.dcdl
|
||||
```
|
||||
|
||||
Regex constraints are accumulated during `&` composition.
|
||||
@@ -63,5 +63,5 @@ Concrete strings must match every regex constraint attached to the abstract valu
|
||||
|
||||
## CLI features
|
||||
|
||||
`decodal-cli` exposes a matching `regex` feature that enables `decodal-core/regex`.
|
||||
`decodal-cli` exposes a matching `regex` feature that enables `decodal/regex`.
|
||||
The feature is not enabled by default so the default CLI binary remains small.
|
||||
|
||||
@@ -9,27 +9,25 @@ Run the normal Rust checks from the repository root.
|
||||
```sh
|
||||
cargo fmt --check
|
||||
cargo test
|
||||
cargo check -p decodal-core --no-default-features
|
||||
cargo check -p decodal --no-default-features
|
||||
nix flake check
|
||||
```
|
||||
|
||||
Regex support is optional and should be tested explicitly when touched.
|
||||
|
||||
```sh
|
||||
cargo test -p decodal-core --features regex
|
||||
cargo run -q -p decodal --features regex -- examples/regex/main.dcdl
|
||||
cargo test -p decodal --features regex
|
||||
cargo run -q -p decodal-cli --features regex -- examples/regex/main.dcdl
|
||||
```
|
||||
|
||||
## crates.io release
|
||||
|
||||
Crates are published as versioned workspace packages under the dual license `MIT OR Apache-2.0`.
|
||||
The dependency order matters because `decodal` and `decodal-wasm` depend on `decodal-core` from crates.io.
|
||||
The primary crates.io package is `decodal`, which contains the embeddable library.
|
||||
Workspace support crates such as `decodal-cli` and `decodal-wasm` are not published for 0.1.0.
|
||||
The project is dual licensed as `MIT OR Apache-2.0`.
|
||||
|
||||
```sh
|
||||
cargo publish -p decodal-core
|
||||
# wait until crates.io index has decodal-core 0.1.0
|
||||
cargo publish -p decodal
|
||||
cargo publish -p decodal-wasm
|
||||
```
|
||||
|
||||
Before publishing, run:
|
||||
@@ -37,12 +35,10 @@ Before publishing, run:
|
||||
```sh
|
||||
cargo fmt --check
|
||||
cargo test
|
||||
cargo check -p decodal-core --no-default-features
|
||||
cargo publish -p decodal-core --dry-run
|
||||
cargo check -p decodal --no-default-features
|
||||
cargo publish -p decodal --dry-run
|
||||
```
|
||||
|
||||
`cargo publish --dry-run` for `decodal` and `decodal-wasm` will fail until the matching `decodal-core` version is already visible in the crates.io index.
|
||||
|
||||
## Web site and playground
|
||||
|
||||
The Astro documentation site and browser playground are kept in:
|
||||
|
||||
Reference in New Issue
Block a user