Node.js on PowerPC
A story about porting Node.js & V8
I've never used PowerPC
So I probably don't care about this at all
Really? - Have you ever used..
- Mac G4 / G5?
- PS3? Xbox360? Wii?
That's part of the Chrome browser, right?
Yes, but V8 is also a stand-alone runtime
Node.js uses V8 as its JS runtime engine
What's Node made of?
|V8 Engine||libuv||core lib|
platform abstraction layer
Node.js was created by Ryan Dahl
Joyent is the steward of Node.js
- Node Package Manager
- online repository of node modules (npmjs.org)
- command line utility for interacting with npmjs.org
- Most node applications are built using many packages
$ npm install orion
$ node node_modules/orion/server.js
Was it hard to port?
Can I get it? YES!
Is it open source? YES!
How is PowerPC different?
Not Intel assembly, so completely different machine instructions
PowerPC is Big Endian (actually bi-endian)
Consider 0xDEADBEEF stored in memory
|base address + 0
|base address + 1
|base address + 2
|base address + 3
int x = 1;
char *y = (char*)&x;
Clearly this is a C porting problem
- An ArrayBuffer type, representing a generic fixed-length binary buffer
- A group of types are used to create views of the ArrayBuffer
- Multiple typed array views can refer to the same ArrayBuffer, of different types, lengths, and offsets
Typed Array spec: http://www.khronos.org/registry/typedarray/specs/latest
Demo Node.js on PowerPC
Hopefully the demo gods will allow this..