Skip to content

Commit

Permalink
code motion: cli related feature names (bytecodealliance#104)
Browse files Browse the repository at this point in the history
* rename host runtime tests to command tests

* add a test for using wasi in a reactor

* commit cargo.lock

* reactor tests: fix wit deps

* test-programs: reactor-tests can build on stable

note that this fails because it exposes wasi-libc ctors calling import
functions from inside cabi_realloc

* test-programs: show that ctors fix in wit-bindgen fixes bug

* ci: install wasm32 targets for stable as well as nightly

* wit-bindgen: use 0.4.0

* ci: use wit-bindgen 0.4.0

* Co-habitate with wasi-common from wasmtime

* adapter: code motion in cargo feature & artifact names to cli-command, cli-reactor

there will shortly be a third type of reactor (non-cli, idk what to call it)

---------

Co-authored-by: Trevor Elliott <telliott@fastly.com>
  • Loading branch information
pchickey and elliottt authored Mar 8, 2023
1 parent 70a1528 commit 34aaaa7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ use poll::Pollable;
use streams::{InputStream, OutputStream};
use wasi::*;

#[cfg(all(feature = "cli-command", feature = "cli-reactor"))]
compile_error!(
"only one of the `cli-command` and `cli-reactor` features may be selected at a time"
);

#[macro_use]
mod macros;

mod bindings {
#[cfg(feature = "command")]
#[cfg(feature = "cli-command")]
wit_bindgen::generate!({
world: "cli",
std_feature,
Expand All @@ -30,7 +35,7 @@ mod bindings {
skip: ["command", "preopens", "get-environment"],
});

#[cfg(not(feature = "command"))]
#[cfg(feature = "cli-reactor")]
wit_bindgen::generate!({
world: "cli-reactor",
std_feature,
Expand All @@ -40,7 +45,7 @@ mod bindings {
}

#[no_mangle]
#[cfg(feature = "command")]
#[cfg(feature = "cli-command")]
pub unsafe extern "C" fn command(
stdin: InputStream,
stdout: OutputStream,
Expand Down

0 comments on commit 34aaaa7

Please sign in to comment.