mirror of
https://github.com/trailbaseio/trailbase.git
synced 2025-12-30 22:29:47 -06:00
Remove WIT thread-id method after changing the execution model.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
deploy: clean build
|
||||
rm -rf ../../wasm/* && cp ../../../../target/wasm32-wasip2/release/wasm_rust_guest_testfixture.wasm ../../wasm/
|
||||
cp ../../../../target/wasm32-wasip2/release/wasm_rust_guest_testfixture.wasm ../../wasm/
|
||||
|
||||
build:
|
||||
cargo build --target wasm32-wasip2 --release
|
||||
|
||||
clean:
|
||||
rm -rf ../../scripts/*.wasm
|
||||
rm -rf ../../wasm/wasm_rust_guest_testfixture.wasm
|
||||
|
||||
.PHONY: build deploy clean
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -20,4 +20,4 @@ ${TRAILDEPOT}/wasm/component.wasm: ../../target/wasm32-wasip2/release/${NAME}.wa
|
||||
../../target/wasm32-wasip2/release/${NAME}.wasm: src/*.rs
|
||||
cargo build --target wasm32-wasip2 --release
|
||||
|
||||
.PHONY: guest run
|
||||
.PHONY: guest deploy run
|
||||
|
||||
@@ -42,7 +42,6 @@ use crate::http::{HttpRoute, Method, StatusCode, empty_error_response};
|
||||
use crate::job::Job;
|
||||
|
||||
pub use crate::wit::exports::trailbase::runtime::init_endpoint::{InitArguments, InitResult};
|
||||
pub use crate::wit::trailbase::runtime::host_endpoint::thread_id;
|
||||
|
||||
// Needed for export macro
|
||||
pub use static_assertions::assert_impl_all;
|
||||
|
||||
@@ -29,9 +29,6 @@ interface init-endpoint {
|
||||
}
|
||||
|
||||
interface host-endpoint {
|
||||
thread-id: func() -> u64;
|
||||
|
||||
|
||||
variant tx-error {
|
||||
other(string)
|
||||
}
|
||||
|
||||
@@ -63,7 +63,6 @@ wasmtime::component::bindgen!({
|
||||
"trailbase:runtime/host-endpoint/tx-rollback": trappable,
|
||||
"trailbase:runtime/host-endpoint/tx-execute": trappable,
|
||||
"trailbase:runtime/host-endpoint/tx-query": trappable,
|
||||
"trailbase:runtime/host-endpoint/thread-id": trappable,
|
||||
default: async | trappable,
|
||||
},
|
||||
exports: {
|
||||
@@ -177,11 +176,6 @@ impl WasiHttpView for State {
|
||||
}
|
||||
|
||||
impl trailbase::runtime::host_endpoint::Host for State {
|
||||
// FIXME: Makes no sense with shared executor.
|
||||
fn thread_id(&mut self) -> wasmtime::Result<u64> {
|
||||
return Err(wasmtime::Error::msg("not supported"));
|
||||
}
|
||||
|
||||
fn execute(
|
||||
&mut self,
|
||||
query: String,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/** @module Interface trailbase:runtime/host-endpoint **/
|
||||
export function threadId(): bigint;
|
||||
/**
|
||||
* NOTE: Ideally, we'd use these but they currently block guests.
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,6 @@ export { addPeriodicCallback } from "./timer";
|
||||
|
||||
export * from "./util";
|
||||
export type { InitResult } from "trailbase:runtime/init-endpoint";
|
||||
export { threadId } from "trailbase:runtime/host-endpoint";
|
||||
|
||||
export interface Config {
|
||||
incomingHandler: {
|
||||
|
||||
@@ -29,9 +29,6 @@ interface init-endpoint {
|
||||
}
|
||||
|
||||
interface host-endpoint {
|
||||
thread-id: func() -> u64;
|
||||
|
||||
|
||||
variant tx-error {
|
||||
other(string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user