Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust helloworld example application #3

Closed
wants to merge 1 commit into from

Conversation

huyhoang8398
Copy link

add Rust helloworld programs

Copy link
Collaborator

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, @huyhoang8398

Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This App does not work on App ELF loader yet.

Apart from the Makefile not working, the resulting binary fails with

fatal runtime error: assertion failed: signal(libc::SIGPIPE, libc::SIG_IGN) != libc::SIG_ERR

It works on Linux, though.

The failing assert is here: std/src/sys/unix/mod.rs#L155

@@ -0,0 +1,4 @@
all: helloworld

helloworld: helloworld.rs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without removing the trailing colon I get

$ make
Makefile:3: *** target pattern contains no '%'.  Stop.
Suggested change
helloworld: helloworld.rs:
helloworld: helloworld.rs

@razvand razvand self-requested a review June 26, 2022 15:17
@razvand
Copy link
Collaborator

razvand commented Jul 1, 2022

@huyhoang8398 , @mkroening , I'm not able to get it to build. I get the error:

error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-unknown-linux-musl` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-unknown-linux-musl`

I've little experience with Rust and I aimed to solve this by using rustup but I wasn't able to.

Could you please add a README.md file describing what needs to be installed / set up for this to work? Also, please add the helloworld executable file in the commit, a clean rule in the Makefile and, if required, a .gitignore file. See the support for other helloworld programs (such as C).

@mkroening mkroening mentioned this pull request Jul 2, 2022
@razvand
Copy link
Collaborator

razvand commented Jul 2, 2022

This is superseded by #8 from @mkroening

@razvand razvand closed this Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants