Skip to content

Release 0.4.0#24

Draft
Caellian wants to merge 1 commit intomasterfrom
dev/v0.3.0
Draft

Release 0.4.0#24
Caellian wants to merge 1 commit intomasterfrom
dev/v0.3.0

Conversation

@Caellian
Copy link
Collaborator

@Caellian Caellian commented Oct 27, 2025

This update is another rewrite that brings full functionality of zint to Rust. Previously we stubbed out most of zint outputs, all of them are handled correctly now. Primitives have been added to work with geometry generated by zint from Rust and this is passed to Typst instead of raw SVG to allow a lot more customization.

Additionally, options are strongly typed now based on symbology to simplify usage - previously you had to look at zint documentation to figure out which options and values are valid for each symbology, stronger Options types mean you can tell instantly what inputs are correct just by looking at Rust invariants. There's a GenericOptions which directly maps to zint symbol fields and allows the library to be used as it was before - this means that if we miss something in strongly typed options, users will still be able to achieve the same functionality as before.

Zint docs are also copied into rustdoc which allows us to use macros to have the Manual mirror official documentation instead of simply linking to it. This will make the Manual much easier to use because each option will be fully documented.

I added support for segment encoding and ECI in the rust code, which allows the users to encode symbols with multiple ECI segments that support it.

Finally, this update brings the bindings pretty close to being usable outside of WASM, so that we can publish them on crates.io later and possibly bring in more contributors/maintainers. This part is not the main focus of this PR and might require some minor later changes - but those will be minor, most of the build.rs is updated for the sys crate and custom serde deserialization will be removed.

As part of this update, zint is updated to contain the newly added symbologies (closes #22).

TODO

  • Add options for all symbologies (~70% done)
    • Copy documentation (~20% done)
    • Cleanup documentation
  • Move old fuzzy serde deserialization to typst crate.
    • High level rust bindings (zint-wasm-rs) should be stricter, typst crate (zint-typst-plugin) will have serde logic that's almost the same as before and remaps options to the same fields.
  • Update Typst code to handle provided primitives to draw shapes (closes Add ways to change human readable text rendering #16)
    • Generate symbology bindings automatically
  • Update manual to use rustdoc from main library

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian Caellian marked this pull request as draft October 27, 2025 09:03
@gemini-code-assist

This comment has been minimized.

@Caellian Caellian changed the title Release 0.3.0 Release 0.4.0 Nov 17, 2025
@Caellian Caellian linked an issue Nov 17, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't get exact CMYK in typst-generated PDF Bump to latest zint Add ways to change human readable text rendering

1 participant