mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
Merge pull request #630 from bhavik-goplani/dev
#620 Changed `bend run` to `bend run-rs` and `bend run` defaults to the C implementation
This commit is contained in:
commit
060239a055
@ -52,6 +52,7 @@ and this project does not currently adhere to a particular versioning scheme.
|
||||
- Add repeated field name error message.
|
||||
- Add `Math` builtin functions. ([#570][gh-570])
|
||||
- Add primitive file IO function `IO/FS/flush`. ([#598][gh-598])
|
||||
- Changed `bend run` to `bend run-rs` and `bend run` defaults to the C implementation. ([#620][gh-620])
|
||||
|
||||
## [0.2.35] - 2024-06-06
|
||||
|
||||
@ -393,5 +394,6 @@ and this project does not currently adhere to a particular versioning scheme.
|
||||
[gh-596]: https://github.com/HigherOrderCO/Bend/issues/596
|
||||
[gh-598]: https://github.com/HigherOrderCO/Bend/issues/598
|
||||
[gh-618]: https://github.com/HigherOrderCO/Bend/issues/618
|
||||
[gh-620]: https://github.com/HigherOrderCO/Bend/issues/620
|
||||
[gh-623]: https://github.com/HigherOrderCO/Bend/issues/623
|
||||
[Unreleased]: https://github.com/HigherOrderCO/Bend/compare/0.2.36...HEAD
|
||||
|
@ -74,7 +74,8 @@ bend --version
|
||||
### Getting Started
|
||||
#### Running Bend Programs
|
||||
```sh
|
||||
bend run <file.bend> # uses the Rust interpreter (sequential)
|
||||
bend run <file.bend> # uses the C interpreter by default (parallel)
|
||||
bend run-rs <file.bend> # uses the Rust interpreter (sequential)
|
||||
bend run-c <file.bend> # uses the C interpreter (parallel)
|
||||
bend run-cu <file.bend> # uses the CUDA interpreter (massively parallel)
|
||||
|
||||
|
12
src/main.rs
12
src/main.rs
@ -48,8 +48,9 @@ enum Mode {
|
||||
path: PathBuf,
|
||||
},
|
||||
/// Compiles the program and runs it with the Rust HVM implementation.
|
||||
Run(RunArgs),
|
||||
RunRs(RunArgs),
|
||||
/// Compiles the program and runs it with the C HVM implementation.
|
||||
#[command(alias = "run")]
|
||||
RunC(RunArgs),
|
||||
/// Compiles the program and runs it with the Cuda HVM implementation.
|
||||
RunCu(RunArgs),
|
||||
@ -282,8 +283,9 @@ fn execute_cli_mode(mut cli: Cli) -> Result<(), Diagnostics> {
|
||||
|
||||
let run_cmd = match &cli.mode {
|
||||
Mode::RunC(..) => "run-c",
|
||||
Mode::RunRs(..) => "run",
|
||||
Mode::RunCu(..) => "run-cu",
|
||||
_ => "run",
|
||||
_ => "run-c",
|
||||
};
|
||||
|
||||
match cli.mode {
|
||||
@ -307,9 +309,9 @@ fn execute_cli_mode(mut cli: Cli) -> Result<(), Diagnostics> {
|
||||
println!("{}", hvm_book_show_pretty(&compile_res.hvm_book));
|
||||
}
|
||||
|
||||
Mode::Run(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
|
||||
| Mode::RunC(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
|
||||
| Mode::RunCu(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) => {
|
||||
Mode::RunC(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
|
||||
| Mode::RunCu(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments })
|
||||
| Mode::RunRs(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) => {
|
||||
let CliRunOpts { linear, print_stats } = run_opts;
|
||||
|
||||
let diagnostics_cfg =
|
||||
|
@ -6,6 +6,6 @@ error: unexpected argument '-d' found
|
||||
|
||||
tip: to pass '-d' as a value, use '-- -d'
|
||||
|
||||
Usage: bend run [OPTIONS] <PATH> [ARGUMENTS]...
|
||||
Usage: bend run-c [OPTIONS] <PATH> [ARGUMENTS]...
|
||||
|
||||
For more information, try '--help'.
|
||||
|
@ -6,6 +6,6 @@ error: unexpected argument '-d' found
|
||||
|
||||
tip: to pass '-d' as a value, use '-- -d'
|
||||
|
||||
Usage: bend run [OPTIONS] <PATH> [ARGUMENTS]...
|
||||
Usage: bend run-c [OPTIONS] <PATH> [ARGUMENTS]...
|
||||
|
||||
For more information, try '--help'.
|
||||
|
Loading…
Reference in New Issue
Block a user