Skip to content

Commit

Permalink
20220616 run in rust (#89)
Browse files Browse the repository at this point in the history
* Run with stage 2 (the 'chialisp' everyone uses) now invokes rust's launch_tool which emulates run.  run -s0 does the same thing as brun, so porting it isn't as important (it just runs clvm) and -s1 runs clvm, but adds a 'bind' primitive that never appeared in mainline chialisp.

* Ensure that we pass through --help to the rust code

* Streamline change to clvm_tools_rs' run by deprecating stage_1

* Restore formatting

* Bump after bug fixes
  • Loading branch information
prozacchiwawa authored Jul 8, 2022
1 parent dca2c8e commit d7b1479
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 80 deletions.
3 changes: 2 additions & 1 deletion clvm_tools/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import time

from clvm import to_sexp_f, KEYWORD_FROM_ATOM, KEYWORD_TO_ATOM, SExp
import clvm_tools_rs
from clvm.EvalError import EvalError
from clvm.serialize import sexp_from_stream, sexp_to_stream
from clvm.operators import OP_REWRITE
Expand Down Expand Up @@ -97,7 +98,7 @@ def as_bin(streamer_f):


def run(args=sys.argv):
return launch_tool(args, "run", default_stage=2)
sys.stdout.write(bytes(clvm_tools_rs.launch_tool("run", args, 2)).decode('utf8'))


def brun(args=sys.argv):
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

dependencies = [
"clvm>=0.9.2",
"clvm_tools_rs>=0.1.19"
]

dev_dependencies = [
Expand Down
73 changes: 0 additions & 73 deletions stages/stage_1.py

This file was deleted.

2 changes: 0 additions & 2 deletions tests/stage_1/bind-map.txt

This file was deleted.

2 changes: 0 additions & 2 deletions tests/stage_1/fact-1.txt

This file was deleted.

2 changes: 0 additions & 2 deletions tests/stage_1/fact-2.txt

This file was deleted.

0 comments on commit d7b1479

Please sign in to comment.