-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update wasi-libc to d03829489904d38c624f6de9983190f1e5e7c9c5 #19614
Conversation
This also removes junk we were shipping but irrelevant to webassembly. |
10KLoc reduce, feel so good |
Added the wasi-libc |
man. wasi-libc kinda sucks. how about we provide libc via zig code instead? |
But rewriting it in Zig would be a lot of work. |
@jedisct1 I've rebased this on master locally, do you mind if I force-push to your branch? I'd like to get this in for 0.14.0. |
Sure, go ahead! There's been changes in |
Yeah, I figure this is likely to be our last wasi-libc update, what with all the Rust tooling they're apparently mixing in due to the component model stuff. #2879 is probably going to be the way forward in the long term (unless we develop our own component model tooling). |
96927ae
to
989a205
Compare
989a205
to
e600726
Compare
@andrewrk you ok with taking this as our (probably) last wasi-libc update? (At least unless/until we develop self-hosted component model tooling.) |
|
Yes 👍 |
@@ -10,13 +10,17 @@ pub const CrtFile = enum { | |||
crt1_reactor_o, | |||
crt1_command_o, | |||
libc_a, | |||
libdl_a, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this strikes me as strange... wasi doesn't support dynamic linking, so what in the world is this library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weak void *dlopen(const char *name, int flags)
{
error = "dlopen not implemented";
return NULL;
}
weak void *dlsym(void *library, const char *name)
{
error = "dlsym not implemented";
return NULL;
}
oh.
ok, well, it won't be very difficult to implement this in zig 🙄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just another one of those "emulated" WASI libraries that do nothing so existing software can compile. For whatever reason it doesn't follow the usual naming pattern.
FWIW, these all strike me as silly and I wouldn't be opposed to removing them, but that'd probably be separate work.
Most notable improvements include
realpath
and stubs forstatvfs
,chmod
, etc.Other changes are for WASI 0.2 which is going to be painful to support since 3rd party tools written in Rust may become necessary in addition to LLVM (WebAssembly/wasi-sdk#402)