Commit Graph

9 Commits

Author SHA1 Message Date
Pat Hickey
d415ae65e1 minor change in union AST in wasi- tag is namedtype 2020-02-24 11:36:05 -08:00
Pat Hickey
71d279a4b0 wasi-headers: unions are tagged now 2020-02-24 11:36:05 -08:00
Pat Hickey
c6f2c0517f
gen-headers: Generate assertions of layout from witx (#149)
* use pch/layout branch for witx; generate assertions of layout

* address review comments, add asserts for handle

* change wasm32 support comment to a preprocessor error

* expose `to_c_header` in wasi-headers crate for use in external test harness

* main.rs: inputs and output arguments are optional

so that generate-libc command works

* regen header
2020-02-07 13:21:18 -08:00
Daniel Bevenius
37c663f2f0
Correct minor typo in c_headers.rs (#166)
The header api.h was update using the following command:
$ cd tools/wasi-headers
$ cargo run -- WASI/phases/snapshot/witx/typenames.witx \
  WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx \
  --output ../../libc-bottom-half/headers/public/wasi/api.h
2020-02-07 05:18:10 -08:00
Pat Hickey
ec86d4dec4
Improvements to wasi-headers tool (#160)
* wasi-headers: update WASI submodule, handle changes to witx ast

* wasi-headers: restructure lib and exe to be more flexible

just factor out some of the hard-coded stuff
2020-01-14 14:24:12 -08:00
Dan Gohman
dd010beea5
Avoid using cast expressions in WASI API constants. (#148)
Cast expressions aren't valid to use in some preprocessor constants, so
change the constants to use `UINT32_C` etc. instead of casts.

Fixes #146.
2019-12-16 13:29:06 -08:00
Pat Hickey
fe130532ae
c header generation updated for reorganized witx ast (#139) 2019-11-22 13:06:12 -05:00
Dan Gohman
cd74e1d988
Correct the version of #136 on master (#141)
* Add the WASI repo as a submodule.

Also, add the witx filenames to the generated output, and just have
`cargo run` auto-generate the api.h header, rather than using clap.

* Switch witx to a path dependency.

* Add a test.

* Add a test that the generated file is in sync with the generator.

* Enable CI testing with Github Actions.

* Fix the name of the wasi-headers directory.

* Enable submodules.

* Add a diff mechanism to help explain failures.

* Sort the inputs for display.

* More debugging.

* More debugging.

* Add a .gitattributes file forcing text files to be eol=lf.

Most editors these days can deal with eof=lf files, even on Windows, and
this avoids trouble with headers and other generated files differing in
line endings.
2019-11-21 20:55:26 -08:00
Dan Gohman
446cb3f1aa
Wasi snapshot preview1 (#140)
* Make __wasi_linkcount_t a uint64_t (#134)

Refs: https://github.com/WebAssembly/WASI/pull/127

* Generate the WASI interface from witx.

This replaces the hand-maintained <wasi/core.h> header with a
<wasi/api.h> generated from witx.

Most of the churn here is caused by upstream WASI renamings; hopefully
in the future ABI updates will be less noisy.
2019-11-21 20:06:00 -08:00