Files
physics/blossomfile
T
2026-10-30 13:26:21 -05:00

125 lines
2.9 KiB
Plaintext

name: physics
gpid: malunal
semv: 1.0.0
options:
level: 2
requires:
- https://git.malunal.studio/sakura/std@v1.0.0
targets:
- name: linear
type: library
root: ./linear
deps:
- std.math
- std.serial
# The shapes of space, made of `linear`'s vectors, and the tests between them.
- name: geometry
type: library
root: ./geometry
deps:
- linear
- std.math
- std.serial
# Light in the units it's measured in, lumens, candela, lux, and nits, and
# converted between them; exposure values; and the colors of temperatures.
- name: photometry
type: library
root: ./photometry
deps:
- linear
- std.math
# What collides in a plane: shapes, where and how deep two meet, rays, a tree
# of boxes, and a grid of solid cells, as a tilemap's walls are.
- name: physics2d
type: library
root: ./physics2d
deps:
- linear
- std.containers
- std.math
- std.serial
# Times what `linear` does against the same written a number at a time; see
# its header.
- name: linear.bench
type: program
level: ${level}
deps:
- linear
- std.containers
- std.io
- std.math
- std.time
srcs:
- tools/bench.sakura
# Times what `geometry` does against the same written a number at a time; see
# its header.
- name: geometry.bench
type: program
level: ${level}
deps:
- geometry
- linear
- std.containers
- std.io
- std.math
- std.time
srcs:
- tools/geometry_bench.sakura
tests:
# On the machine, which works each number at a time.
- name: linear.tests
type: program
deps: [linear, std.json, std.math, std.serial, std.testing]
srcs: [tests/main.sakura, tests/linear.sakura]
# The same tests built with `-O2`, which works vectors as lanes, and gives the
# same bits.
- name: linear.lanes.tests
type: program
runs: native
level: 2
deps: [linear, std.json, std.math, std.serial, std.testing]
srcs: [tests/main.sakura, tests/linear.sakura]
# `geometry`'s, the same two ways.
- name: geometry.tests
type: program
deps: [geometry, linear, std.json, std.math, std.serial, std.testing]
srcs: [tests/main.sakura, tests/geometry.sakura]
- name: geometry.lanes.tests
type: program
runs: native
level: 2
deps: [geometry, linear, std.json, std.math, std.serial, std.testing]
srcs: [tests/main.sakura, tests/geometry.sakura]
- name: photometry.tests
type: program
deps: [linear, photometry, std.math, std.testing]
srcs: [tests/main.sakura, tests/photometry.sakura]
- name: physics2d.tests
type: program
deps: [linear, physics2d, std.containers, std.math, std.testing]
srcs: [tests/main.sakura, tests/physics2d.sakura]
exports:
- linear
- geometry
- photometry
- physics2d
package:
desc: The numbers of physical space and what's in it. Vectors, quaternions, and matrices of f32, and the shapes of space made of them, worked as SIMD lanes where an executable holds them; light in the units it's measured in; and what collides in a plane.
auth: John Christman <sorakatadzuma@gmail.com>