Browse Source

c-api: support IWYU pragmas (#7473)

This allows clangd to not import the headers in the wasmtime directory,
as not all of them include their dependencies correctly. This means that
clangd can import a header directly and it breaks the build, as the
order `wasmtime.h` #includes is important.

See: https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
pull/7478/head
Tyler Rockwood 1 year ago
committed by GitHub
parent
commit
6c428469f7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      crates/c-api/include/wasmtime.h

2
crates/c-api/include/wasmtime.h

@ -181,6 +181,7 @@
#define WASMTIME_API_H
#include <wasi.h>
// IWYU pragma: begin_exports
#include <wasmtime/config.h>
#include <wasmtime/engine.h>
#include <wasmtime/error.h>
@ -196,6 +197,7 @@
#include <wasmtime/trap.h>
#include <wasmtime/val.h>
#include <wasmtime/async.h>
// IWYU pragma: end_exports
/**
* \brief Wasmtime version string.

Loading…
Cancel
Save