1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-05-04 01:37:46 +00:00
Commit graph

54 commits

Author SHA1 Message Date
d58a216462 Shrink the dependency and feature complexity, auto-cleanup and more
We had a few odd dependencies that caused nothing but pain in dependent projects
like libphysis. One of these was libunshield (a C library) that our game_install
feature used, but to be honest this was the wrong library to put this code. It
was really only ever used by Astra, and should live there instead - there's no
reason to have it shared between applications (and it's small enough to be
copied if *you* need it.) Also that also killed the system-deps dependency which
had a significant impact on our build time.

Another dependency was replaced: libz-sys. This is replaced by the pure Rust
libz-rs (through libz-rs-sys) which should simplify deploying physis without
having to worry about manually linking libz or other nonsense. Some leftover
copied code from flate2 can also be removed.

I also removed the visual_data feature as Astra ended up using it anyway, and
the distinction doesn't make much sense now. It was previously to gate some
dependencies needed for visual data extraction, but the bitflags and half crates
are small. I can look into splitting the crate up into more features if needed
later.

A dependency that was erroneously included in the refactoring was quote, which
has been removed. Also ran cargo fmt, clippy too.
2025-03-11 16:29:24 -04:00
3da2aa39c1 Vendor what we need from texture2ddecoder
This recently tripped up cargo-deny because it depends on paste. I looked at it
and the parts that we need (a few BCn decoding functions) has only one place
where it's used and can easily be replaced.
2025-03-10 17:15:14 -04:00
d5747593ac Update crate description 2025-03-10 15:58:00 -04:00
fe6712b5bf Prepare for file entry writing, add test for index1 entries 2025-03-06 19:09:25 -05:00
5c291a4844 Use Rust 2024 edition 2025-03-06 15:57:10 -05:00
f83b2013fa Support WebAssembly 2024-11-01 16:50:37 -04:00
444ec6e593 Bump binrw, texture2ddecoder 2024-06-28 06:16:20 -04:00
acb5c6a7a3 Bump version to 0.4.0 now that 0.3.0 is released 2024-06-27 23:02:54 -04:00
70fa4dc62f Bring back usage of system-deps 2024-06-27 20:40:34 -04:00
c1fb2c5fa7 Change repo url 2024-05-22 20:54:05 -04:00
89d026bf63 Remove usage of crc crate as a main dependency
This was temporarily used for shader key hashing, but now an original
implementation using zlib's crc32 function from crcracker
(https://github.com/NotNite/crcracker/) is used instead. Tests are added
and existing ones are used to ensure it's the same.
2024-04-29 18:57:15 -04:00
cc729e38d8 Add crc method to SHPK for calculating it's value, add test for selector 2024-04-21 10:04:40 -04:00
7c63474175 Replace/remove criterion, walkdir, and system-deps
These are giant dependencies that for some reason pull in winapi(???)
and we actually don't need all of their features.

Criterion can be replaced with brunch, a minimalist alternative.

walkdir is replaced with a single function.

system-dep can be replaced with a single line. Eventually I would like
to make it a little bit more than one line, but that's all we need for
now.
2024-04-20 11:13:45 -04:00
3e00c35bd8 Switch to texture2ddecoder
This crate supports more BCn decoders which texpresso doesn't (like
BC7.)
2024-04-20 10:47:43 -04:00
1b055b3f7a Switch to libz-ng-sys
This is supposedly faster, and more importantly has less build
dependencies.
2024-04-20 10:12:24 -04:00
da774529da Remove overcomplicated internal race macro to a big match statement
There's really no reason to use macros for this, let's rewrite it in a
big match statement.
2024-04-16 21:14:59 -04:00
eeb877288f Bump version to 0.3.0 2024-04-15 21:35:29 -04:00
8eee3ec331 Don't enable criterion default features 2024-04-15 17:57:13 -04:00
64b8998472 Remove unused glam dependency
This was used before we used an internal Havok packfile parser, but it's
no longer needed!
2024-04-15 17:34:15 -04:00
8efbe484a5 Fix other misc warnings 2023-12-02 20:33:08 -05:00
4157eb0a67 Update binrw and tracing dependencies 2023-12-02 19:45:46 -05:00
07582775cd Add support for reading binary SKLB and PBD
This removes the dependency of the Havok SDK or getting the decompiled
skeleton files from TexTools or some other place. Code courtesy of
FFXIVTools. The other two ways of reading skeletons (SKEL and Packfile)
are removed which gets rid of two dependencies.
2023-10-13 14:55:27 -04:00
74cc82a425 Compile with LTO in release builds 2023-09-24 16:19:08 -04:00
c73f4bc635 Fix default features for dependencies 2023-09-24 15:41:18 -04:00
8a599630d7 Bump version to 0.1.4 2023-09-22 19:41:32 -04:00
4dfd36dbd8 Fix and quiet clippy warnings 2023-09-22 19:17:24 -04:00
bce26e7709 Bump criterion and glam versions 2023-08-02 16:26:38 -04:00
540341cf57 Add logging crate 2023-04-06 14:51:40 -04:00
69c3ca3bf9 Upgrade dependencies, including moving to binrw 0.11 which breaks stuff
The one exception is bitflags, because 2.0 has breaking changes I can't
work around...
2023-03-31 17:30:30 -04:00
6da9057d1e Allow cutting out a large amount of dependencies
Before this change, if you wanted to include physis you had to include
a bunch of dependencies you didn't need. For example, a launcher would
have to pull in texpresso which is completely useless. By default,
the features from before (excluding game_install) are included.

Also this creates a game_install feature for eventual Windows builds,
where unshield is not supported.
2022-10-25 13:53:24 -04:00
827e971035 Vendor in sha1_smol
Removes another crate dependency, and it's only used in one place in the
 code. Will eventually pick up the TODO and cut more bits off when
 I get around to it.
2022-10-25 13:00:10 -04:00
4f85248ee6 Bump glam version 2022-10-25 13:00:10 -04:00
7aa306da99 Replace crc crate with simpler implementation
The package is kept as a dev-dependency to prevent regressions though!
2022-10-25 13:00:10 -04:00
ff4ae2fbcc Bump to 0.1.3 2022-10-25 11:05:07 -04:00
daa7384d89 Fix unshield issues finally, bump to 0.1.2 2022-10-24 15:04:13 -04:00
a508766583 Bump version to 1.1 2022-10-17 19:52:57 -04:00
0edbcfdf34 Revert "Switch from bitfield-struct to modular-bitfield"
This reverts commit 3615adac47.
2022-10-17 19:50:38 -04:00
3615adac47 Switch from bitfield-struct to modular-bitfield 2022-10-17 19:23:45 -04:00
04b06fe0fc Only specify major (and minor if needed) version for dependencies
This is to be more lenient on packages that depend on us. I also updated
the lockfile too!
2022-10-13 16:05:15 -04:00
e86d910594 Update binrw to 0.10.0
This introduces a new breaking change, namely that all endianness must
be known. I've done the best I can, but I'll be checking soon.
2022-10-13 16:03:46 -04:00
102c8901cf Add game patch integration tests
Currently only the first two game patches are checked, eventually want
to check boot patching as well. Hopefully this should weed out the
remaining patching issues I encounter.
2022-10-13 15:46:21 -04:00
21b467d5e9 Update half crate 2022-09-15 16:34:58 -04:00
5fcb5e6adc Update packages, switch to new criterion 0.4.0 2022-09-14 17:20:33 -04:00
62098dccfa Remove categories field 2022-09-13 17:00:30 -04:00
24c3905fd4 Add couple more fields to Cargo.toml 2022-09-13 16:55:50 -04:00
6554dee2f1 Decompress and return rgba data for textures 2022-08-11 15:03:12 -04:00
0210479fd3 Parse texture attribute and formats 2022-08-11 09:23:15 -04:00
214e5495fe Properly set bone parenting Skeleton::from_skel, export bone transforms 2022-08-10 14:52:11 -04:00
3bd6fbf9c3 Enable support for writing the file info format
This is the first step in enabling write support for a format! I wanted
to see how binwrite works with one of the game's simplest formats.
2022-08-06 21:16:09 -04:00
2a1638e6da Explicitly use half 1.0, since that's what criterion uses too
It's not that big of a deal, we just use one small part of the half
library. This is to appease cargo deny of course :-)
2022-08-06 18:22:27 -04:00