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

MacOS support #42

Open
malthe opened this issue Dec 15, 2022 · 9 comments
Open

MacOS support #42

malthe opened this issue Dec 15, 2022 · 9 comments

Comments

@malthe
Copy link

malthe commented Dec 15, 2022

I get error[E0425]: cannot find function `prctl` in crate `libc`​ which suggests Linux-only.

@cpuguy83
Copy link
Member

Correct, runwasi is only supported on Linux at the moment.

We could look at taking contributions to make macos work.
There is already folks looking at making it work on Windows which would help because we'll split the code out based on platform.

@0xE282B0
Copy link
Contributor

Rund is a project that is still in its early stages, but may be able to make runwasi run on MacOS.

@iamshreeram
Copy link

+1.

Tried building this today on Mac M1. Error seems to be different.

error: failed to run custom build command for `procfs v0.15.1`

Caused by:
  process didn't exit successfully: `/Users/home/project/rust/wasm/runwasi/./target/debug/build/procfs-1372915205a1c053/build-script-build` (exit status: 1)
  --- stderr
  Building procfs on an for a unsupported platform. Currently only linux and android are supported
  (Your current target_os is macos)
warning: build failed, waiting for other jobs to finish...
make: *** [build-wasm] Error 101

@jprendes
Copy link
Collaborator

We currently take unix builds as meaning linux, although macos is also unix.
If we plan to support macos we would need to clean that up.

runwasi has gained a lot of new features since this issue was created, and we havent been paying attention to macos` since then.

The main challenge to have a macos build would be implementing an Instance for it. The first step would be creating a stub like we currently do for windows here, and disambiguate all the unix checks into linux and macos. The linux implementation is "easy" because we can piggiback on youki. There's work in progress for the windows implementation, but we don't currently have anyone working on a macos implementation.

@chenzhiguo
Copy link

I'm still not able to compile the code on macOS in M1 Pro.

@0xE282B0
Copy link
Contributor

0xE282B0 commented Jan 8, 2024

What are you trying to achieve? - Is there a specific problem you are facing?

If you just want to compile runwasi with your MacOS, I recommend an Ubuntu Linux VM (that's what I use). But a Docker container is also possible.

If you want to compile a runwasi shim for using it on MacOS then the complete implementation is missing and there are open design questions like do we want to wrap the runtime in a container and how could that look like in MacOS since Apple does not officially support Linux like containers.

However, there is no active development on building a MacOS implementation of runwasi.

@chenzhiguo
Copy link

What are you trying to achieve? - Is there a specific problem you are facing?

If you just want to compile runwasi with your MacOS, I recommend an Ubuntu Linux VM (that's what I use). But a Docker container is also possible.

If you want to compile a runwasi shim for using it on MacOS then the complete implementation is missing and there are open design questions like do we want to wrap the runtime in a container and how could that look like in MacOS since Apple does not officially support Linux like containers.

However, there is no active development on building a MacOS implementation of runwasi.

I just want to look at the code and try to build it and learn its implementation logic. Thank you for your reply.

@0xE282B0
Copy link
Contributor

0xE282B0 commented Jan 8, 2024

I'm happy that you are looking into this repository! If you have specific questions you can chat with the team on our CNCF Slack channel: https://cloud-native.slack.com/archives/C04LTPB6Z0V

@malthe
Copy link
Author

malthe commented Jan 8, 2024

@0xE282B0 I think people are trying to achieve being able to run wasi workloads without a second level of emulation, i.e. directly under their main operating environment.

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

No branches or pull requests

6 participants