Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename wizer.initialize to initialize_runtime #780

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ fn copy_javy_core() -> Result<()> {

let mut wizer = wizer::Wizer::new();
let wizened = wizer
.init_func("initialize_runtime")
.allow_wasi(true)?
.wasm_bulk_memory(true)
.run(read_file(&quickjs_provider_path)?.as_slice())?;
Expand Down
1 change: 1 addition & 0 deletions crates/cli/src/codegen/static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl CodeGen for StaticGenerator {
};

let wasm = Wizer::new()
.init_func("initialize_runtime")
.make_linker(Some(Rc::new(|engine| {
let mut linker = Linker::new(engine);
wasi_common::sync::add_to_linker(&mut linker, |_: &mut Option<WasiCtx>| unsafe {
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ static mut COMPILE_SRC_RET_AREA: [u32; 2] = [0; 2];
static mut RUNTIME: OnceCell<Runtime> = OnceCell::new();

/// Used by Wizer to preinitialize the module.
#[export_name = "wizer.initialize"]
pub extern "C" fn init() {
#[export_name = "initialize_runtime"]
pub extern "C" fn initialize_runtime() {
let runtime = runtime::new(Config::default()).unwrap();
unsafe {
RUNTIME
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const FUNCTION_MODULE_NAME: &str = "function.mjs";
static mut RUNTIME: OnceCell<Runtime> = OnceCell::new();
static mut BYTECODE: OnceCell<Vec<u8>> = OnceCell::new();

#[export_name = "wizer.initialize"]
pub extern "C" fn init() {
#[export_name = "initialize_runtime"]
pub extern "C" fn initialize_runtime() {
let _wasm_ctx = WasmCtx::new();

let js_runtime_config = Config::from_bits(
Expand Down
Loading