Open andrew-otiv opened 1 year ago
Update: I tried more feature combinations. ["export-dot"] fails, but I get a green build in both cargo and buck2 with just export-plantuml enabled, so that's a temporary workaround if you don't need the dotfiles.
Hello @andrew-otiv! Thank you for your interest in typestate
, currently the crate is pretty much unmaintained but I'd be open to learn more about your use case and how I can help you. If that sounds interesting let me know so we can establish a better communication channel!
Thanks! We still have a lot to figure out in the software stack we're building, so it's probably premature to deepen a collaboration, but if we stick with typestate-rs, I'll be providing at minimum bug reports, which I asprire to make high quality. My company develops control and supervision systems for trains and trams, and on some of our projects we have strict functional safety requirements that may preclude even using Rust, let alone a specific library. So for example typestate-rs wasn't developed with processes you have to use for safety critical software in our industry, so instead of arguing for the functional safety of typestate-rs, it may be less work for us to run cargo expand, and then do the functional safety process on that code.
I showed off a typestate-rs based demo to colleagues this morning and they thought it was neat!
Sorry for the delayed reply @andrew-otiv
W.r.t. functional safety, you're absolutely right, the crate was not developed with that in mind, but rather as an exploration of typestates in Rust - my MSc thesis topic.
I stopped working on it since there was little incentive to keep going (a lot of stars but little interest in real-life use cases), as it currently stands, I am available to provide help and guidance w.r.t. using the crate, developing it further or even developing a variant yourself.
I've published some work on the topic which you can access in articles/
.
You can also take a look into behavioral types as they are actively being worked on by the scientific community.
More resources you might find useful to look into: https://sites.google.com/view/rustverify2021/home https://sites.google.com/view/rustverify2022/home https://sites.google.com/view/rustverify2023/home
When I build with this combination of features: typestate = {version="0.8.0", default-features=false, features = [ "export-dot", "export-plantuml" ]}
I am hitting:
I ~think I'm using:
rustc 1.70.0 (90c541806 2023-05-31)
but I'm not entirely certain since I hit this whille messing with build systems that may or may not be setting up their own toolchain behind my back.
I get a clean build with Cargo with all features enabled, in the same environment, leading me to suspect that the issue is specific to this combination of feature flags.
The wider context, if you happen to be interested, is that I'm trying to get a state machine based on typestate-rs to build on buck2 with reindeer, and pruned out the mermaid related dependencies since they had issues (that are probably unrelated).
Thanks for the very neat libary! I'm evaluating it for use in a safety related system, where statically enforced correctness of our state machines would be an attractive feature.