5 releases (3 breaking)

0.4.0 Sep 20, 2024
0.3.0 Jun 14, 2022
0.2.0 Feb 17, 2022
0.1.0 Sep 27, 2021
0.1.0-alpha.0 Sep 23, 2021
Download history 109/week @ 2024-08-30 70/week @ 2024-09-06 53/week @ 2024-09-13 411/week @ 2024-09-20 133/week @ 2024-09-27 104/week @ 2024-10-04 154/week @ 2024-10-11 199/week @ 2024-10-18 164/week @ 2024-10-25 236/week @ 2024-11-01 158/week @ 2024-11-08 157/week @ 2024-11-15 179/week @ 2024-11-22 293/week @ 2024-11-29 169/week @ 2024-12-06 28/week @ 2024-12-13

700 downloads per month
Used in 3 crates (2 directly)

Apache-2.0

78KB
1.5K SLoC

This project is still in experimental stage. DO NOT USE FOR PRODUCT.

ruststep

Crates for STEP (Standard for the Exchange of Product model data) written in pure Rust aimed at replacing stepcode.

name crates.io docs.rs master description
espr Crate docs.rs cargo-doc EXPRESS Language (ISO 10303-11) Compiler
espr-derive Crate docs.rs cargo-doc proc-macro for running espr compiler
ruststep Crate docs.rs cargo-doc Serialize/Deserialize STEP files
ruststep-derive Crate docs.rs cargo-doc proc-macro helper crate

What is STEP?

  • STEP is a set of data serialize formats, schema language, and common schemas.
  • Data serialize format is called exchange structure in ISO document, but usually called STEP file, They are serialized as ASCII text (ISO-10303-21, usually with extension *.step, *.stp or *.p21) or XML (ISO-10303-28).
  • Schema language is called EXPRESS. EXPRESS file is usually named with extension *.exp.
  • Many common schemas are defined in ISO-10303 by EXPRESS language.
    • schemas contains copies
    • Application Protocol (AP) is a class of defined schemas, and the main target of this project.
    • AP203 is most famous one in CAD (computer-aided design) applications.

Rosetta Stone for web developers

Protocol Buffers STEP (ISO 10303)
Schema Language Protocol Buffers Version 3 Language Specification EXPRESS Language (ISO 10303-11)
Schema file *.proto file *.exp file
Data Encoded Binary data "Exchange structure", *.step file (ASCII, ISO 10303-21)
Compiler protoc esprc

Why ruststep?

  • STEP is not only for CAD
  • We have to generate many codes from EXPRESS schemas
    • Tables for SQL or NoSQL database, Object-Record Mapper (ORM)
    • on-wire, on-memory format
      • ASCII / XML are inefficient than binary format e.g. protocol buffers
  • Extensible EXPRESS compiler is required
    • Like as protoc generates gRPC binding using gRPC-plugin

Roadmap

Released features

  • 0.1.0
    • Minimal EXPRESS Compiler to generate Rust struct definitions
    • Deserialize STEP file (ASCII) to Rust struct

TODO until 1.0 release

Planned features

  • Binary format convertible into STEP ASCII and XML formats
  • RDB support, ORM generation

License

Copyright 2021 RICOS Co. Ltd.

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.

Exception

The following directories are included for development purpose. They are not parts of this project.

Contributor License Agreement (CLA)

When you contribute (code, documentation, or anything else), you have to be aware that your contribution is covered by the same Apache 2.0 License that is applied to ruststep itself. This applies to all contributors, including those contributing on behalf of a company. If you agree to its content, you simply have to click on the link posted by the CLA assistant bot as a comment to the pull request. Click it to check the CLA, then accept it on the following screen if you agree to it. CLA assistant will save this decision for upcoming contributions and will notify you if there is any change to the CLA in the meantime.

Dependencies

~3MB
~60K SLoC