Conversation
jbrun3t
reviewed
Aug 27, 2026
| let val: &JsValue = content.as_ref(); | ||
| let inner = if let Some(s) = val.as_string() { | ||
| rustigc::Log::new(s.as_bytes()) | ||
| } else if js_sys::ArrayBuffer::is_view(val) || val.is_instance_of::<js_sys::ArrayBuffer>() { |
jbrun3t
reviewed
Aug 27, 2026
| initSync({ | ||
| module: readFileSync(new URL("../pkg/rustigc_bg.wasm", import.meta.url)), | ||
| }); | ||
|
|
Owner
There was a problem hiding this comment.
unit test and utf8 are different topics ... yes I'm splitting terrorist
Author
There was a problem hiding this comment.
do you mean that tests should be in a separate commit from the feature they test?
jbrun3t
reviewed
Aug 27, 2026
| wasm-bindgen = "0.2" | ||
| serde-wasm-bindgen = "0.6" | ||
| serde_json = "1" | ||
| js-sys = "0.3" |
Owner
There was a problem hiding this comment.
In utils, and the main binding do not depend on this
vicb
marked this pull request as draft
August 27, 2026 13:43
jbrun3t
force-pushed
the
dev
branch
3 times, most recently
from
August 28, 2026 20:07
c8f6b19 to
c95abe0
Compare
Owner
|
Added something is that direction in the wasm utils package, let me know if that fits the request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the WASM
Logconstructor to accept IGC file content as astringin addition to binary buffers (Uint8Array,Buffer,ArrayBuffer).Key Changes
WASM Bindings (
rustigc-wasm/src/lib.rs):ContentArgdeclared via#[wasm_bindgen(typescript_type = "Uint8Array | string")]so TypeScript definitions inrustigc.d.tsreflectconstructor(content: Uint8Array | string).Log::newconstructor:Dependencies (
rustigc-wasm/Cargo.toml):js-sys = "0.3"dependency for typed array inspection and conversion.Testing (
rustigc-wasm/test/wasm.test.js&package.json):npm testscript to workspacepackage.json.Logconstruction from Node.jsBuffer.Logconstruction fromUint8ArrayandArrayBuffer.Logconstruction from IGCstring(file fixture and inline text).