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

Use wasi-core isntead of libc #64

Merged
merged 5 commits into from
Aug 8, 2019
Merged

Use wasi-core isntead of libc #64

merged 5 commits into from
Aug 8, 2019

Conversation

newpavlov
Copy link
Member

@newpavlov newpavlov commented Jul 20, 2019

IIUC wasi-core will be the main crate for exposing low-level WASI Core API in Rust. We could link to the function directly as with some other targets, but probably we shouldn't do it, as right now __wasi_random_get is not considered stable. See: rust-lang/libc#1434

@newpavlov newpavlov requested a review from dhardy July 20, 2019 00:23
@dhardy
Copy link
Member

dhardy commented Jul 20, 2019

Sounds like you know much more about WASI interfaces than myself.

The only thing I can say is that this adds another dependency — but if wasi-core becomes a dependency of std anyway this doesn't matter.

Since both the libc interface and the wasi-core interfaces are explicitly unstable there may not be much reason to choose one over the other for now — will breaking changes in each crate require bumping the minor version @sunfishcode?

@sunfishcode
Copy link
Contributor

As we thought about it more, the name "WASI core" has caused confusion in some places, so I've now renamed the "wasi-core" crate to "wasi". I'd also request holding off on merging this for just a while longer while we let the module naming scheme within the crate settle in a little more.

But beyond that, I am starting to see the role for this "wasi" crate emerge. It's a minimal and no_std crate which we can add as a dependency to libc, and which can track WASI API changes over time, possibly including adding backwards-compatibility interfaces to help smooth over API transitions.

So yeah, I think this PR here is good, just update the crate name and give it a little more time while we settle any remaining organizational issues :-).

@newpavlov
Copy link
Member Author

Done! I will wait for your word then before merging this PR. (BTW maybe it's worth to release an empty wasi-core v0.3 with description "use wasi crate instead" or something similar?)

the name "WASI core" has caused confusion in some places, so I've now renamed the "wasi-core" crate to "wasi"

Well, I thought wasi-core for WASI Core API was a pretty straightforward naming, but oh well. :)

Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@josephlr josephlr left a comment

Choose a reason for hiding this comment

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

This looks good! When do we want to merge this?

@newpavlov
Copy link
Member Author

@sunfishcode
Can we merge this PR or do you plan to introduce changes to the wasi crate in the near future?

@newpavlov newpavlov merged commit 86c2cd6 into master Aug 8, 2019
@newpavlov newpavlov deleted the wasi_core branch August 8, 2019 08:02
@sunfishcode
Copy link
Contributor

Sorry for being slow on my end; merging this sounds good to me.

josephlr added a commit to josephlr/getrandom that referenced this pull request Aug 14, 2019
Small Cargo.toml nit that got missed in rust-random#64
@josephlr josephlr mentioned this pull request Aug 15, 2019
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

4 participants