mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Improve false interpreter missing CLI arg message
This commit is contained in:
parent
6f35d1891a
commit
8849e5cdd1
2 changed files with 4 additions and 2 deletions
|
@ -489,7 +489,7 @@ fn roc_run(
|
||||||
) -> io::Result<i32> {
|
) -> io::Result<i32> {
|
||||||
use std::os::unix::process::CommandExt;
|
use std::os::unix::process::CommandExt;
|
||||||
|
|
||||||
let mut cmd = match triple.architecture {
|
match triple.architecture {
|
||||||
Architecture::Wasm32 => {
|
Architecture::Wasm32 => {
|
||||||
// If possible, report the generated executable name relative to the current dir.
|
// If possible, report the generated executable name relative to the current dir.
|
||||||
let generated_filename = binary_path
|
let generated_filename = binary_path
|
||||||
|
|
|
@ -74,7 +74,9 @@ pub unsafe extern "C" fn roc_memset(dst: *mut c_void, c: i32, n: usize) -> *mut
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn rust_main() -> i32 {
|
pub extern "C" fn rust_main() -> i32 {
|
||||||
let arg = env::args().nth(1).unwrap();
|
let arg = env::args()
|
||||||
|
.nth(1)
|
||||||
|
.expect("Please pass a .false file as a command-line argument to the false interpreter!");
|
||||||
let arg = RocStr::from(arg.as_str());
|
let arg = RocStr::from(arg.as_str());
|
||||||
|
|
||||||
let size = unsafe { roc_main_size() } as usize;
|
let size = unsafe { roc_main_size() } as usize;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue