Conversation
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.
JSX support, declare function FFI, and native compiler fixes
Summary
<Tag prop={v}>child</Tag>intocreateElement("Tag", {prop: v}, [child])calls. Supports attributes, expressions, fragments, nesting, and self-closing elements. 6 test fixtures cover the feature.declare functionFFI: Zero-cost foreign function interface viadeclare functionsyntax. Supports typed parameters (i32,i64,f32,f64,i8_ptr, etc.) that map directly to LLVM types without double conversion. Linker flags (-lm,-lpthread, etc.) are auto-detected from linked libraries.examples/tui/app.tsximperative,examples/tui/app-jsx.tsxJSX) showing a native terminal UI counter built with the Zireael C bridge.doubleand pointer types as non-aliasing, causing LLVM-O2to miscompile structs containing both field types. Also fixed FunctionNode struct layout mismatch in native parser creation sites, and switcheddeclaredExternFunctionsfromSet<string>tostring[]to fix duplicate declaration errors during self-hosting.Test plan
npm test)npm run verify:quick)declare functioncompiles without segfault (previously crashed at-O2)npx prettier --check .)