commits
Add html5lib-tests and Test262 as git submodules under tests/.
Create integration test harnesses for both suites:
- html5lib tokenizer harness (we-html): reads JSON test files,
runs each case against our tokenizer stub, reports pass/fail/skip.
Includes a minimal JSON parser (no external crates).
- Test262 harness (we-js): walks JS test files, parses YAML
frontmatter for metadata, runs each case against our evaluate()
stub, reports pass/fail/skip grouped by category.
Both harnesses work with empty implementations (0% pass rate on
positive tests) and will track progress as features are implemented.
Adds Token enum and tokenize() stub to we-html.
Adds JsError and evaluate() stub to we-js.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add event handling to WeView (custom NSView subclass):
- acceptsFirstResponder override (returns YES for key event delivery)
- keyDown: logs key character and keyCode to stdout
- mouseDown:/mouseUp:/mouseMoved: log view-local coordinates to stdout
Add WeWindowDelegate (NSWindowDelegate):
- windowDidResize: marks content view as needing display
- windowShouldClose: returns YES (explicit close handling)
Add Window helper methods:
- set_delegate() for installing window delegates
- set_accepts_mouse_moved_events() for mouse move tracking
Update browser main.rs:
- Install window delegate for resize handling
- Enable mouse-moved event delivery
5 new tests for class registration, selector response, and first responder.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/cg.rs with:
- CGColorSpace (device RGB), CGBitmapContext, CGImage wrappers
- CGRect/CGPoint/CGSize geometry types
- BitmapContext: Rust-owned pixel buffer wrapped in CGBitmapContext
- fill_rect(), clear(), create_image(), pixels/pixels_mut accessors
- draw_image_in_context() for blitting into a view's CG context
- 8 unit tests covering context creation, drawing, and edge cases
Add custom NSView subclass (WeView) in appkit.rs:
- Overrides drawRect: to blit CGImage from BitmapContext
- Overrides isFlipped for top-left coordinate origin
- BitmapView wrapper with set_needs_display() for redraw requests
- Uses ivar to store BitmapContext pointer per-instance
- Window::set_content_view() for installing custom views
- 2 new tests for WeView class registration and BitmapView creation
Add ivar support to objc.rs:
- class_addIvar FFI binding
- object_setInstanceVariable / object_getInstanceVariable FFI
- Id::set_ivar() and Id::get_ivar() helper methods
- Class::add_ivar() helper method
Update browser main.rs:
- Creates 800x600 BitmapContext
- Fills dark gray background with centered blue rectangle
- Installs BitmapView as window content view
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/appkit.rs with:
- NSRect/NSPoint/NSSize geometry types matching AppKit's C layout
- NSWindow style mask and backing store constants
- NSApplicationActivationPolicy constants
- AutoreleasePool RAII wrapper (creates on new, drains on drop)
- App wrapper: sharedApplication, setActivationPolicy:,
activateIgnoringOtherApps:, run
- Window wrapper: initWithContentRect:styleMask:backing:defer:,
setTitle: (via toll-free bridged CfString), makeKeyAndOrderFront:,
contentView
- WeAppDelegate custom ObjC class implementing
applicationShouldTerminateAfterLastWindowClosed: -> YES
- create_standard_window() convenience (800x600, titled/closable/
miniaturizable/resizable)
- 6 unit tests covering geometry, constants, and autorelease pool
Update browser main.rs to open a native macOS window titled "we".
Closing the window terminates the application.
Also fix pre-existing clippy macro_metavars_in_unsafe lint in msg_send!
macro by binding metavariables to locals outside unsafe blocks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/cf.rs with:
- Raw extern "C" bindings to CoreFoundation.framework: CFStringCreateWithBytes,
CFRetain, CFRelease, CFStringGetLength, CFStringGetCString
- CFStringRef type alias and CFStringEncoding constants
- CfString RAII wrapper: creates CFStringRef from &str, calls CFRelease on drop
- Clone impl that calls CFRetain for proper reference counting
- Debug/Display impls, len/is_empty helpers, to_string_lossy for round-tripping
- cf_retain/cf_release public wrappers for manual reference counting
- 10 unit tests covering creation, length, empty strings, unicode, emoji,
clone/drop, debug/display formatting, and pointer validity
This is needed for passing string parameters to AppKit APIs (window titles,
menu items, etc).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements issue 3mfkgyov6gf2k: Raw extern "C" bindings to libobjc.dylib,
Sel/Class/Id wrappers, msg_send!/sel!/class! macros, and 12 unit tests.
Use the same clean pattern as the other msg_send! variants instead of
the roundabout split_last + from_raw_parts approach.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/objc.rs with:
- Raw extern "C" bindings to libobjc.dylib: objc_msgSend, objc_getClass,
sel_registerName, class_addMethod, objc_allocateClassPair,
objc_registerClassPair, class_getName
- Sel wrapper: registered selector with interned pointer equality
- Class wrapper: class lookup, dynamic class creation, method addition
- Id wrapper: non-null Objective-C object pointer
- msg_send! macro: type-safe(ish) message dispatch via transmuted
objc_msgSend (0-4 argument variants)
- sel! and class! convenience macros
- 12 unit tests covering class lookup, selector registration, alloc/init,
custom class creation, method addition, and message dispatch
This is the foundation all other platform FFI builds on.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pure Rust web browser engine targeting macOS ARM. Zero external
dependencies. Workspace with 15 crates: platform, url, encoding,
html, css, dom, style, layout, text, net, crypto, image, render,
js, browser. All inter-crate dependencies wired. Builds clean
with clippy and fmt.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add html5lib-tests and Test262 as git submodules under tests/.
Create integration test harnesses for both suites:
- html5lib tokenizer harness (we-html): reads JSON test files,
runs each case against our tokenizer stub, reports pass/fail/skip.
Includes a minimal JSON parser (no external crates).
- Test262 harness (we-js): walks JS test files, parses YAML
frontmatter for metadata, runs each case against our evaluate()
stub, reports pass/fail/skip grouped by category.
Both harnesses work with empty implementations (0% pass rate on
positive tests) and will track progress as features are implemented.
Adds Token enum and tokenize() stub to we-html.
Adds JsError and evaluate() stub to we-js.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add event handling to WeView (custom NSView subclass):
- acceptsFirstResponder override (returns YES for key event delivery)
- keyDown: logs key character and keyCode to stdout
- mouseDown:/mouseUp:/mouseMoved: log view-local coordinates to stdout
Add WeWindowDelegate (NSWindowDelegate):
- windowDidResize: marks content view as needing display
- windowShouldClose: returns YES (explicit close handling)
Add Window helper methods:
- set_delegate() for installing window delegates
- set_accepts_mouse_moved_events() for mouse move tracking
Update browser main.rs:
- Install window delegate for resize handling
- Enable mouse-moved event delivery
5 new tests for class registration, selector response, and first responder.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/cg.rs with:
- CGColorSpace (device RGB), CGBitmapContext, CGImage wrappers
- CGRect/CGPoint/CGSize geometry types
- BitmapContext: Rust-owned pixel buffer wrapped in CGBitmapContext
- fill_rect(), clear(), create_image(), pixels/pixels_mut accessors
- draw_image_in_context() for blitting into a view's CG context
- 8 unit tests covering context creation, drawing, and edge cases
Add custom NSView subclass (WeView) in appkit.rs:
- Overrides drawRect: to blit CGImage from BitmapContext
- Overrides isFlipped for top-left coordinate origin
- BitmapView wrapper with set_needs_display() for redraw requests
- Uses ivar to store BitmapContext pointer per-instance
- Window::set_content_view() for installing custom views
- 2 new tests for WeView class registration and BitmapView creation
Add ivar support to objc.rs:
- class_addIvar FFI binding
- object_setInstanceVariable / object_getInstanceVariable FFI
- Id::set_ivar() and Id::get_ivar() helper methods
- Class::add_ivar() helper method
Update browser main.rs:
- Creates 800x600 BitmapContext
- Fills dark gray background with centered blue rectangle
- Installs BitmapView as window content view
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/appkit.rs with:
- NSRect/NSPoint/NSSize geometry types matching AppKit's C layout
- NSWindow style mask and backing store constants
- NSApplicationActivationPolicy constants
- AutoreleasePool RAII wrapper (creates on new, drains on drop)
- App wrapper: sharedApplication, setActivationPolicy:,
activateIgnoringOtherApps:, run
- Window wrapper: initWithContentRect:styleMask:backing:defer:,
setTitle: (via toll-free bridged CfString), makeKeyAndOrderFront:,
contentView
- WeAppDelegate custom ObjC class implementing
applicationShouldTerminateAfterLastWindowClosed: -> YES
- create_standard_window() convenience (800x600, titled/closable/
miniaturizable/resizable)
- 6 unit tests covering geometry, constants, and autorelease pool
Update browser main.rs to open a native macOS window titled "we".
Closing the window terminates the application.
Also fix pre-existing clippy macro_metavars_in_unsafe lint in msg_send!
macro by binding metavariables to locals outside unsafe blocks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/cf.rs with:
- Raw extern "C" bindings to CoreFoundation.framework: CFStringCreateWithBytes,
CFRetain, CFRelease, CFStringGetLength, CFStringGetCString
- CFStringRef type alias and CFStringEncoding constants
- CfString RAII wrapper: creates CFStringRef from &str, calls CFRelease on drop
- Clone impl that calls CFRetain for proper reference counting
- Debug/Display impls, len/is_empty helpers, to_string_lossy for round-tripping
- cf_retain/cf_release public wrappers for manual reference counting
- 10 unit tests covering creation, length, empty strings, unicode, emoji,
clone/drop, debug/display formatting, and pointer validity
This is needed for passing string parameters to AppKit APIs (window titles,
menu items, etc).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add platform/src/objc.rs with:
- Raw extern "C" bindings to libobjc.dylib: objc_msgSend, objc_getClass,
sel_registerName, class_addMethod, objc_allocateClassPair,
objc_registerClassPair, class_getName
- Sel wrapper: registered selector with interned pointer equality
- Class wrapper: class lookup, dynamic class creation, method addition
- Id wrapper: non-null Objective-C object pointer
- msg_send! macro: type-safe(ish) message dispatch via transmuted
objc_msgSend (0-4 argument variants)
- sel! and class! convenience macros
- 12 unit tests covering class lookup, selector registration, alloc/init,
custom class creation, method addition, and message dispatch
This is the foundation all other platform FFI builds on.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pure Rust web browser engine targeting macOS ARM. Zero external
dependencies. Workspace with 15 crates: platform, url, encoding,
html, css, dom, style, layout, text, net, crypto, image, render,
js, browser. All inter-crate dependencies wired. Builds clean
with clippy and fmt.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>