Skip to content

Commit

Permalink
Merge pull request #2705 from wasmerio/fix_headless
Browse files Browse the repository at this point in the history
Fix headless build and test it in CI
  • Loading branch information
syrusakbary authored Dec 1, 2021
2 parents e09bb8f + 2edcf20 commit d5a444d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test-sys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,8 @@ jobs:
target: ${{ matrix.target }}
override: true
components: "rust-src"
if: needs.setup.outputs.DOING_RELEASE == '1'
- name: Build Minimal Wasmer Headless
if: needs.setup.outputs.DOING_RELEASE == '1' && matrix.build != 'linux-musl-x64'
if: matrix.build != 'linux-musl-x64'
run: |
cargo install xargo
echo "" >> Cargo.toml
Expand Down
2 changes: 1 addition & 1 deletion Xargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[dependencies]
std = {default-features=false, features=["panic_immediate_abort"]}
std = {}
3 changes: 3 additions & 0 deletions lib/cli/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use wasi::Wasi;
/// The options for the `wasmer run` subcommand
pub struct Run {
/// Disable the cache
#[cfg(feature = "cache")]
#[structopt(long = "disable-cache")]
disable_cache: bool,

Expand All @@ -43,6 +44,7 @@ pub struct Run {
/// A prehashed string, used to speed up start times by avoiding hashing the
/// wasm module. If the specified hash is not found, Wasmer will hash the module
/// as if no `cache-key` argument was passed.
#[cfg(feature = "cache")]
#[structopt(long = "cache-key", hidden = true)]
cache_key: Option<String>,

Expand All @@ -64,6 +66,7 @@ pub struct Run {
#[structopt(long = "debug", short = "d")]
debug: bool,

#[cfg(feature = "debug")]
#[structopt(short, long, parse(from_occurrences))]
verbose: u8,

Expand Down
3 changes: 3 additions & 0 deletions lib/cli/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use wasmer_compiler::CompilerConfig;
#[derive(Debug, Clone, StructOpt, Default)]
/// The compiler and engine options
pub struct StoreOptions {
#[cfg(feature = "compiler")]
#[structopt(flatten)]
compiler: CompilerOptions,

Expand Down Expand Up @@ -43,6 +44,7 @@ pub struct StoreOptions {
object_file: bool,
}

#[cfg(feature = "compiler")]
#[derive(Debug, Clone, StructOpt, Default)]
/// The compiler options
pub struct CompilerOptions {
Expand All @@ -63,6 +65,7 @@ pub struct CompilerOptions {
enable_verifier: bool,

/// LLVM debug directory, where IR and object files will be written to.
#[cfg(feature = "llvm")]
#[structopt(long, parse(from_os_str))]
llvm_debug_dir: Option<PathBuf>,

Expand Down

0 comments on commit d5a444d

Please sign in to comment.