What's everyone working on this week (23/2019)?

New week, new Rust! What are you folks up to?

v0.23.1 of uom (type-safe zero-cost dimensional analysis) was released last week to fix a regression. I also worked on a PR to fix an issue where uom was not zero-cost!


I’ve been working on a framework for programming GPUs from Rust. It provides a language called Emu for writing high-level code that operates on vectors with features such as built-in mathematical and physical constants, unit annotation, and implicit conversion.

It also provides 2 procedural macros - emu! for compiling Emu code to intermediate code and storing it in a global constant and build! (this is the new thing I’ve been working on and the reason why I wasn’t able to answer people’s questions over the weekend) for taking functions from the intermediate code stored in the constant and auto-generating Rust functions that will run the code for the Emu functions. Here’s an example-

emu! {
	multiply(global_buffer [f32], scalar f32) {
		global_buffer[get_global_id(0)] *= scalar;

build! { multiply [f32] f32 }

fn main() {
	// a vector with elements of type f32
	let initial_data = vec![3.7, 4.5, 9.0, 1.2, 8.9];

	// call the multiply function written in Emu on the vector of data
	let final_data = multiply(initial_data, 3.0).unwrap();

	// print the results to the console
	println!("{:?}", final_data);

You can check out the book, examples, and the crate from the repository at - github.com/calebwin/emu.

(this was x-posted from the subreddit)


I started parsing binary Blender files to feed the data to my renderer. See issue on codeberg.org for details:

Setting up a demo for diwata in heroku.
Added markdown support for sauron

Restarting my CLI app and trying to work past the hurdles that stalled it last time…

Continuing to work on an attribute to generate ffi-safe trait objects from a trait definition,it’s taking me a while because I am experimenting with a few different ways of doing it.

This attribute is going to be part of abi_stable.

1 Like

Cataloging changes in environment variables between Rust versions and subdirectory projects. As well as doing the same for the Ruby language to help improve the Rutie project (the tie between Rust and Ruby).

I’ve observed an issue in the build process of a subdirectory project examples/some_project where I think it may be showing the wrong manifest path for the environment variable… I’m writing code to log and verify my theory.


My theory was wrong. Now to figure out how I can help improve Rust’s C flags for the linker…

Maintenance run for my game:

  • Got CI mostly1 working for headless Vulkan testing.

  • Working on removing dependency cycles.

    Cargo is happy when crate A uses B, Bdev uses A. Other tools are not.
    Tried writing a tool to work out the cycles in my workspace, I’ve burned a day unsuccessfully.

1 Successful:

  • Test code that uses Vulkan in CI in both Windows and Linux


  • Get line coverage for code that uses Vulkan.(including non-windowed)
  • Test a windowed Vulkan application on Linux
1 Like

Trying to resume the discussion on array initialization ergonomics now that const generics are in sight.

This week I am working on implementing the embedded_hal::digital::v2::OutputPin / InputPin traits in the PCF857x I/O expander driver and I fixed a bug in the wyhash random number generator usage.

@calebwin (re: Emu, gpu programming langauge)

Does your language support: shared memory, volatile, and how does it emit PTX / gpu code (is it via rust-ptx backend or something else …) ?

I’ve been working on a steganographic CLI tool/Rust crate inspired by the flexiblity of xsv, dubbed stego.

I’ve gotten encoding/decoding of text, images (inside other images), and binary files inside of PNG files.

It’s currently private on my GitHub but I will make it public once I have a stable API.

Somebody beat me to the punch releasing an crate named npy for reading and writing numpy array files… But the current crate has had its efforts largely focused on 1D arrays of record types, and has very rigid constraints on supported datatypes.

So I’ve been quite busy—probably too busy—introducing string types and support for big endian, and quite probably flooding this poor guy’s inbox with GitHub notifications. (Hopefully there’s no water damage!)


Digging deeper into Blender’s binary file format. Added support to render light emitting geometry:

> parse_blend_file -s 256 ~/tmp/rs_pbrt/untitled_2_79.blend
parse_blend_file version 0.5.3 [Detected 8 cores]
number of lights = 2
number of primitives = 980


Rendering the binary files directly is fast (instead of using an ASCII scene description file and parsing that), but I’m not sure where to go with this …


Now you can specify the integrator (and the pixel samples) from the command line:

> parse_blend_file -h
pbrt 0.5.3
Jan Walter <jan@janwalter.com>
Parse a Blender scene file and render it.

    parse_blend_file [OPTIONS] <path>

    -h, --help       Prints help information
    -V, --version    Prints version information

    -i, --integrator <integrator>    ao, directlighting, path, bdpt, mlt
    -s, --samples <samples>          pixel samples [default: 1]

    <path>    The path to the file to read
  1. :package: Wrote a tool to detect crate dependency cycles in my workspace and output dot graphs.
  2. Next, broke those cycles – usually by splitting crates, other times by writing the boilerplate that the cyclic dependency helped reduce.

Cost of (maintaining) quality is high :sweat:.

Released rcstruct (lib.rs, GitHub), my first original piece of open source in a loooong time.

This is an isolated, maybe useful, piece of my attempt to get something rendered using winit + ash / Vulkan. Been working on it for maybe 2 months, hope to get my first triangle in the next few days! :wink:

1 Like

Working in Auh for a portfolios backend. Using actix-web 1.0

Started adding support of alternative registries to cargo-cache.

Coming up with a testcase has been more difficult than I expected because I don’t have a windows machine and paths on windows can be a lot different than on linux. =/

1 Like