Skip to content

Rust CLI tools for the Simple Domain Modeling Language (SDML)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

sdm-lang/rust-sdml

Repository files navigation

Rust SDML

https://raw.githubusercontent.com/sdm-lang/.github/main/profile/horizontal-text.svg

Rust Library and Tools for the Simple Domain Modeling Language (SDML).

https://img.shields.io/badge/License-Apache_2.0-blue.svg https://img.shields.io/badge/License-MIT-blue.svg https://github.com/johnstonskj/rust-sdml/actions/workflows/rust.yml/badge.svg https://github.com/johnstonskj/rust-sdml/actions/workflows/security-audit.yml/badge.svg https://codecov.io/gh/johnstonskj/rust-sdml/branch/main/graph/badge.svg?token=1HGN6M4KIT https://img.shields.io/github/stars/johnstonskj/rust-sdml.svg

This project’s intent is to provide an idiomatic implementation of the in-memory model, parser, generators, and the CLI tool. The following figure shows the usage and relationships of the packages in this workspace.

                         ╭───────╮
                         │  CLI  │
                    ╔══  │ crate │  ══╗
                    ║    ╰───────╯    ║
┌╌╌╌╌╌╌╌╌┐          V                 V
┆        ┆       ╭───────╮       ╭──────────╮       Formatted Source
┆ source ┆  ══>  │ parse │  ══>  │ generate │  ══>  RDF Representation 
┆  file  ┆   ╭───│ crate │───────│   crate  │───╮   Documentation
┆        ┆   │   ╰───────╯       ╰──────────╯   │   Diagrams
└╌╌╌╌╌╌╌╌┘   │        core/errors crate         │
             ╰──────────────────────────────────╯
 ┌───────┐                  ⋀
 │ other │                  ║
 │ tools │  ════════════════╝
 └───────┘

To install the command-line tool on MacOS or Linux use the Homebrew package manager and the SDML Tap.

❯ brew install sdm-lang/sdml/sdml

Packages

errors

This package contains the common Error type as well as a diagnostic set for reporting language parse and model issues.

https://img.shields.io/crates/v/sdml-errors.svg https://img.shields.io/docsrs/sdml-errors.svg

core

This package contains the in-memory model of an sdml module, the major component of the project itself. It also has traits (`ModuleLoader`, `ModuleResolver`, `ModuleStore`) that are required by packages that follow.

https://img.shields.io/crates/v/sdml_core.svg https://img.shields.io/docsrs/sdml-core.svg

parse

This package contains the bridge from the tree-sitter SDML library to the in-memory model in sdml_core.

https://img.shields.io/crates/v/sdml_parse.svg https://img.shields.io/docsrs/sdml-parse.svg

generate

This package contains a set of tools for generating alternative representations of an in-memory module as well as related actions for the CLI.

https://img.shields.io/crates/v/sdml_generate.svg https://img.shields.io/docsrs/sdml-generate.svg

cli

This package contains the entry-point for the command-line tool.

https://img.shields.io/crates/v/sdml_cli.svg

License(s)

The contents of this repository are made available under the Apache-2.0 and MIT licenses.

Apache-2.0

Copyright 2023-2025 Simon Johnston <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

See the enclosed file LICENSE-APACHE.

MIT

Copyright 2023-2025 Simon Johnston <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

See the enclosed file LICENSE-MIT.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

For information on contributing to this project, see the following:

  1. Project Contribution Guidelines.
  2. Organization Code of Conduct.

Changes

After version 0.1.4 the single crate has been replaced with the four sdml-core, sdml-errors, sdml-parse, sdml-generate, and sdml-cli. Each will have it’s own version history starting with 0.1.5.

Version: 0.1.4

  • Support the latest grammar
  • UML Class Diagram (initial)
  • Modeling Library modules

Version: 0.1.3

  • Support the latest grammar

Version: 0.1.2

  • Syntax highlighting supported
  • Support the latest grammar

Version: 0.1.1

  • More drawing details
  • More command-line features
  • Support the latest grammar

Version: 0.1.0

  • Initial version, limited to basic drawings

Other Links

Formatting

Linting

About

Rust CLI tools for the Simple Domain Modeling Language (SDML)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages