Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit fb784db

Browse files
committed
Fix a feature-ful build
1 parent 20f8c61 commit fb784db

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

crates/environ/src/component.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ pub const PREPARE_ASYNC_NO_RESULT: u32 = u32::MAX;
4444
/// pointer.
4545
pub const PREPARE_ASYNC_WITH_RESULT: u32 = u32::MAX - 1;
4646

47+
/// Bit flag for indicating async-lifted exports
48+
///
49+
/// This flag may be passed to the `async-start` built-in function (which is
50+
/// called from both async->async and async->sync adapters) to indicate that the
51+
/// callee is an async-lifted export.
52+
pub const START_FLAG_ASYNC_CALLEE: i32 = 1 << 0;
53+
4754
mod artifacts;
4855
mod info;
4956
mod names;

crates/environ/src/fact.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ mod trampoline;
3636
mod transcode;
3737
mod traps;
3838

39-
/// Bit flag for indicating async-lifted exports
40-
///
41-
/// This flag may be passed to the `async-start` built-in function (which is
42-
/// called from both async->async and async->sync adapters) to indicate that the
43-
/// callee is an async-lifted export.
44-
pub const START_FLAG_ASYNC_CALLEE: i32 = 1 << 0;
45-
4639
/// Fixed parameter types for the `prepare_call` built-in function.
4740
///
4841
/// Note that `prepare_call` also takes a variable number of parameters in

crates/environ/src/fact/trampoline.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
use crate::component::{
1919
CanonicalAbiInfo, ComponentTypesBuilder, FLAG_MAY_ENTER, FLAG_MAY_LEAVE, FixedEncoding as FE,
2020
FlatType, InterfaceType, MAX_FLAT_ASYNC_PARAMS, MAX_FLAT_PARAMS, PREPARE_ASYNC_NO_RESULT,
21-
PREPARE_ASYNC_WITH_RESULT, StringEncoding, Transcode, TypeComponentLocalErrorContextTableIndex,
22-
TypeEnumIndex, TypeFlagsIndex, TypeFutureTableIndex, TypeListIndex, TypeOptionIndex,
23-
TypeRecordIndex, TypeResourceTableIndex, TypeResultIndex, TypeStreamTableIndex, TypeTupleIndex,
24-
TypeVariantIndex, VariantInfo,
21+
PREPARE_ASYNC_WITH_RESULT, START_FLAG_ASYNC_CALLEE, StringEncoding, Transcode,
22+
TypeComponentLocalErrorContextTableIndex, TypeEnumIndex, TypeFlagsIndex, TypeFutureTableIndex,
23+
TypeListIndex, TypeOptionIndex, TypeRecordIndex, TypeResourceTableIndex, TypeResultIndex,
24+
TypeStreamTableIndex, TypeTupleIndex, TypeVariantIndex, VariantInfo,
2525
};
2626
use crate::fact::signature::Signature;
2727
use crate::fact::transcode::Transcoder;
@@ -494,7 +494,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
494494
// callback) or zero (if there's no callback). We conservatively use
495495
// one here to ensure the host provides room for the result, if any.
496496
self.instruction(I32Const(1));
497-
self.instruction(I32Const(super::START_FLAG_ASYNC_CALLEE));
497+
self.instruction(I32Const(START_FLAG_ASYNC_CALLEE));
498498
self.instruction(Call(start_call.as_u32()));
499499

500500
self.finish()

crates/wasmtime/src/runtime/component/concurrent.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ use std::sync::Mutex;
7979
use std::task::{Context, Poll, Waker};
8080
use std::vec::Vec;
8181
use table::{Table, TableDebug, TableError, TableId};
82+
use wasmtime_environ::PrimaryMap;
8283
use wasmtime_environ::component::{
8384
ExportIndex, MAX_FLAT_PARAMS, MAX_FLAT_RESULTS, PREPARE_ASYNC_NO_RESULT,
8485
PREPARE_ASYNC_WITH_RESULT, RuntimeComponentInstanceIndex, StringEncoding,
8586
TypeComponentGlobalErrorContextTableIndex, TypeComponentLocalErrorContextTableIndex,
8687
TypeFutureTableIndex, TypeStreamTableIndex, TypeTupleIndex,
8788
};
88-
use wasmtime_environ::{PrimaryMap, fact};
8989

9090
pub use abort::AbortHandle;
9191
pub use futures_and_streams::{
@@ -194,7 +194,7 @@ mod callback_code {
194194
/// A flag indicating that the callee is an async-lowered export.
195195
///
196196
/// This may be passed to the `async-start` intrinsic from a fused adapter.
197-
const START_FLAG_ASYNC_CALLEE: u32 = fact::START_FLAG_ASYNC_CALLEE as u32;
197+
const START_FLAG_ASYNC_CALLEE: u32 = wasmtime_environ::component::START_FLAG_ASYNC_CALLEE as u32;
198198

199199
/// Provides access to either store data (via the `get` method) or the store
200200
/// itself (via [`AsContext`]/[`AsContextMut`]), as well as the component

0 commit comments

Comments
 (0)