Skip to content

Update README to include Archlinux AUR package link #235

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

Merged
merged 2 commits into from
Mar 10, 2021

Conversation

htfy96
Copy link
Contributor

@htfy96 htfy96 commented Feb 28, 2021

Just created an AUR repo at https://aur.archlinux.org/packages/wasi-libc-git/. Add its link to README to help fellow Archlinux users.

Just created an AUR repo at https://aur.archlinux.org/packages/wasi-libc-git/ . Add its link to README to help fellow Archlinux users
@sbc100
Copy link
Member

sbc100 commented Feb 28, 2021

Pretty cool. Does that that arch linux user who install this packages can just type clang -target wam32-wasi hello.c -o out.wasm have it just work?

Is there some way I can see the package contents (just out of interest).

README.md Outdated
@@ -43,4 +43,8 @@ or libc++abi.a, respectively, so they may not be usable without
extra setup. This is one of the things [wasi-sdk] simplifies, as it includes
cross-compiled builds of compiler-rt, libc++.a, and libc++abi.a.

## AUR package
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps put "Arch Linux" in the heading here.. since its more meaningful that "AUR package"... I had to look up that the latter was.

You can also ways say something like "For Arch Linux there is a unofficial (AUR) package..."

@htfy96
Copy link
Contributor Author

htfy96 commented Feb 28, 2021

Pretty cool. Does that that arch linux user who install this packages can just type clang -target wam32-wasi hello.c -o out.wasm have it just work?

The usage is printed out after installation at (wasi-libc.install):

post_install() {
  echo "Use this lib with clang --target=wasm32-unknown-wasi --sysroot /opt/wasi-libc"
}

Is there some way I can see the package contents (just out of interest).

Users are supposed to build the package on their own machines. Attached the package built on my machine below.
wasi-libc-prebuilt.zip

@sbc100
Copy link
Member

sbc100 commented Feb 28, 2021

Pretty cool. Does that that arch linux user who install this packages can just type clang -target wam32-wasi hello.c -o out.wasm have it just work?

The usage is printed out after installation at (wasi-libc.install):

post_install() {
  echo "Use this lib with clang --target=wasm32-unknown-wasi --sysroot /opt/wasi-libc"

Sounds good. I wonder if one day we could make this work with normal multi-arch path heirchary to avoid the need to specify a sysroot. i.e. install in /usr/lib/wam32-wasi-unknown and /usr/include/wasm32-wasi-unknown and then clang should be able pick them up by default? I'm not sure this works today but I think its a good goal.

}


> Is there some way I can see the package contents (just out of interest).

Users are supposed to build the package on their own machines. Attached the package built on my machine below.
[wasi-libc-prebuilt.zip](https://github.com/WebAssembly/wasi-libc/files/6057735/wasi-libc-prebuilt.zip)

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

lgtm, but I'll leave it to @pchickey or @sunfishcode to give the final approval.

@htfy96
Copy link
Contributor Author

htfy96 commented Feb 28, 2021

Pretty cool. Does that that arch linux user who install this packages can just type clang -target wam32-wasi hello.c -o out.wasm have it just work?

The usage is printed out after installation at (wasi-libc.install):

post_install() {
  echo "Use this lib with clang --target=wasm32-unknown-wasi --sysroot /opt/wasi-libc"

Sounds good. I wonder if one day we could make this work with normal multi-arch path heirchary to avoid the need to specify a sysroot. i.e. install in /usr/lib/wam32-wasi-unknown and /usr/include/wasm32-wasi-unknown and then clang should be able pick them up by default? I'm not sure this works today but I think its a good goal.

Yeah I think that should eventually be the case, but I would like to postpone it until #154 gets merged, as with CMake we can easily install to multi-arch paths with CMAKE_INSTALL_INCLUDEDIR/CMAE_INSTALL_LIBDIR if we specifies target types in CMakeLists.txt properly.

@sunfishcode
Copy link
Member

Looks good to me.

@sunfishcode sunfishcode merged commit ca4d2f0 into WebAssembly:main Mar 10, 2021
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.

3 participants