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

Fixes for Rust 1.72 #465

Merged
merged 1 commit into from
Sep 6, 2023
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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
"crates/core",
"crates/cli",
]
resolver = "2"

[workspace.package]
version = "1.1.2"
Expand Down
12 changes: 9 additions & 3 deletions crates/cli/src/wasm_generator/static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ pub fn generate(js: &JS, exports: Vec<Export>) -> Result<Vec<u8>> {
let invoke_export = invoke.id();

if !exports.is_empty() {
let ExportItem::Function(realloc_fn) = realloc.item else { unreachable!() };
let ExportItem::Function(invoke_fn) = invoke.item else { unreachable!() };
let ExportItem::Memory(memory) = memory.item else { unreachable!() };
let ExportItem::Function(realloc_fn) = realloc.item else {
unreachable!()
};
let ExportItem::Function(invoke_fn) = invoke.item else {
unreachable!()
};
let ExportItem::Memory(memory) = memory.item else {
unreachable!()
};
export_exported_js_functions(&mut module, realloc_fn, invoke_fn, memory, exports);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/quickjs-wasm-rs/src/js_binding/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl JSContextRef {
JS_WRITE_OBJ_BYTECODE as i32,
);
Ok(Vec::from_raw_parts(
output_buffer as *mut u8,
output_buffer,
output_size.try_into()?,
output_size.try_into()?,
))
Expand Down