Use cargo run in the adapter

Makes it easier to start the app eliminating the danger of forgetting to
build.
This commit is contained in:
2021-12-17 21:26:06 +01:00
parent 6ee41a112c
commit a7d3bb3752

View File

@@ -15,9 +15,10 @@ HERE = os.path.abspath(os.path.dirname(__file__))
app = flask.Flask(__name__) app = flask.Flask(__name__)
CORS(app) CORS(app)
engine = subprocess.Popen( engine = subprocess.Popen(
[os.path.join(HERE, "../rs/target/debug/schach")], ["cargo", "run"],
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
cwd=os.path.join(HERE, "../rs"),
) )