writing about things
.date= 2020-12-01

.title= Secret Project

For the last few weeks I've been working on a "secret" project. I'm doing a best effort port of quickjs from C into Rust. Why? A few reasons:

I decided to go about it in a very mechanical way, straight translation of C to Rust, starting with the header file, then working from top to bottom. Most of the first ~2000 lines have just been translating structs, but I have had to make some interesting choices. I'll be detailing them in later posts, but here's a brief list:

The last one is what I'm currently working through. In qjs each gc-able object is part of a linked list and so contains a "klist" style entry (a prev and next node pointer). I believe that I could copy the direct implementation into rust, using the associated pointer arithmatic, but I also believe that it would be unidiomatic.

I'll follow up with more details in later posts