Skip to content
This repository was archived by the owner on Nov 9, 2019. It is now read-only.

Move common functionality into hostcalls mod#26

Merged
sunfishcode merged 1 commit intoCraneStation:masterfrom
kubkon:common-refactor
Jun 18, 2019
Merged

Move common functionality into hostcalls mod#26
sunfishcode merged 1 commit intoCraneStation:masterfrom
kubkon:common-refactor

Conversation

@kubkon
Copy link
Copy Markdown
Member

@kubkon kubkon commented Jun 11, 2019

This PR is essentially a housekeeping change. It strives to refactor out as much of common functionality between *nix and other hosts such as Windows as possible.

To provide some context, this PR came about as a direct result of my discussion with @sunfishcode (see #22) that it would be nice to re-use as much of common stuff as possible especially since WASI is still rather volatile and certain things which might be common between different hosts might change in the near future.

Quick summary of changes:

  • common functionality has now been moved to a separate module hostcalls which is located directly in the root of the crate:
  • each hostcall exposed by the lib to the outside world now resides in this separate module, and internally, most of the hostcalls call appropriately *nix or Windows specific impls

@sunfishcode
Copy link
Copy Markdown
Member

This looks great! It is likely that as WASI grows, we'll have even more code in common between the platforms, so this is a good direction to head in.

@sunfishcode sunfishcode merged commit 54a897c into CraneStation:master Jun 18, 2019
@kubkon
Copy link
Copy Markdown
Member Author

kubkon commented Jun 18, 2019

This looks great! It is likely that as WASI grows, we'll have even more code in common between the platforms, so this is a good direction to head in.

Agreed! :-)

@kubkon kubkon deleted the common-refactor branch June 18, 2019 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants