This Week in Quads #9

🔗Nanoserde

🔗0.2.0 Release - Call for Testing

Nanoserde will be bumped to v0.2.0 in the near future, with a pair of breaking change related to cargo features. Previously, there was no way to separate out the different formats (json, binary, etc.), with all of them compiled each time. After v0.2.0 is release, individual formats may be enabled/disabled through the use of the relevant cargo feature. The no_std feature has also been removed, and has been replaced by a std feature which gates both usage on stable rust and SerDe traits on std::collections::{HashMap, HashSet}. See the documentation for details on both changes.

These changes are merged in, but have not yet been released to crates-io. If you rely on nanoserde, version 0.2.0-beta.0 has been released to allow testing prior to the version bump. There should be no other breaking changes beyond the ones described above, but please file an issue if that is not the case.

🔗Sloop

sloop

Sloop is a (very) experimental build system. It was an experiment on how hard would it be to build a fairly complex 3d game without cargo. Somehow it worked, and results were too interesting to keep it private.

While it is not very practical(yet), sloop might be a good case study on building a fully custom build system on top of raw rustc, with no cargo involved.

A long mastodon thread on how it works.

A few example projects

fn main() -> Result<(), ()> {
    let libc = sloop::DependencyBuilder::new("deps/libc")
        .build()?;
    let miniquad = sloop::DependencyBuilder::new("deps/miniquad")
        .with_dependency(&libc)
        .build()?;

    sloop::Builder::new()
        .binary()
        .name("TriangleOnTheSloop")
        .entrypoint("src/triangle.rs")
        .with_dependency(&libc)
        .with_dependency(&miniquad)
        .build()
}
> ls
build.rs  deps/  src/

> sloop
Building libc
Building miniquad
Building TriangleOnTheSloop src/triangle.rs
Done!

> ls
build.rs  deps/  src/  TriangleOnTheSloop*