Kaynağa Gözat

Update README

Joeri Exelmans 4 yıl önce
ebeveyn
işleme
653835f5cd
1 değiştirilmiş dosya ile 13 ekleme ve 2 silme
  1. 13 2
      README.md

+ 13 - 2
README.md

@@ -1,4 +1,4 @@
-# Statechart interpreter with semantic variation
+# Statechart interpreter (and compiler!) with semantic variation
 
 ## Dependencies
 
@@ -16,6 +16,7 @@ Tip: Users of the Nix package manager can get a usable development environment t
 
 ### Optional
 
+* [Rust compiler](https://www.rust-lang.org/) to test compilation to Rust.
 * [state-machine-cat](https://github.com/sverweij/state-machine-cat) to render statecharts as SVG images. Runs on NodeJS, installable from NPM.
 * [Graphviz dot](https://graphviz.org/) to render the priorities between a statechart's transitions as a graph.
 
@@ -30,11 +31,21 @@ Alternatively, you can just set your `PYTHONPATH` environment variable to the ab
 Assuming you followed the installation instructions above, run:
 
 ```
-python3 -m sccd.test.run test/test_files
+python -m sccd.test.run test/test_files
 ```
 
 It will recursively visit the directory tree of `test_files` and look for XML files starting with with `test_` (tests that should succeed) or `fail_` (for tests that should fail), and execute them. The tree also contains XML files starting with `statechart_`: these are individual statechart models that are not directly executable, but are used by test files. The tree also contains SVG files: these contain automatically rendered images of statechart models.
 
+### Running the tests with Rust
+
+The test framework can also generate Rust code for each test, and then invokes the Rust compiler (must be in your PATH as `rustc`) to compile to native code for your machine. The compiled program is then run (the main-function of the generated code executes the test). Add the `--rust` flag to try it:
+
+```
+python -m sccd.test.run --rust test/test_files
+```
+
+Rust code generation is a work in progress. Tests that contain unsupported features will be skipped.
+
 ## Runtime environment variables
 
 The following environment variables can be set to change the behavior of the runtime. These options can be set while running the tests, or while running one of the examples.