forme-ruby 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +46 -2
- data/CONTRIBUTING.md +1 -1
- data/NOTICE +1 -1
- data/README.md +20 -20
- data/SECURITY.md +4 -5
- data/THIRD_PARTY_LICENSES.txt +238 -17
- data/docs/github-setup.md +13 -11
- data/docs/installation.md +16 -32
- data/docs/releasing.md +54 -40
- data/docs/rendering.md +26 -7
- data/docs/security-exceptions.md +7 -4
- data/ext/forme_pdf/Cargo.lock +37 -34
- data/ext/forme_pdf/Cargo.toml +5 -2
- data/ext/forme_pdf/extconf.rb +3 -2
- data/ext/forme_pdf/src/lib.rs +200 -5
- data/lib/forme_pdf/rails.rb +2 -0
- data/lib/forme_pdf/renderer.rb +30 -10
- data/lib/forme_pdf/version.rb +2 -2
- metadata +7 -7
data/docs/installation.md
CHANGED
|
@@ -5,49 +5,33 @@ source and native packages, and how to check the installed renderer.
|
|
|
5
5
|
|
|
6
6
|
## Requirements
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
macOS ARM64. The core has no Rails dependency. JRuby, Windows, musl and other
|
|
10
|
-
architectures are not qualified release targets.
|
|
8
|
+
CRuby 3.3 or later. Rails is optional.
|
|
11
9
|
|
|
12
|
-
| Package |
|
|
10
|
+
| Package | Needs |
|
|
13
11
|
| --- | --- |
|
|
14
|
-
|
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
12
|
+
| `arm64-darwin` | macOS 15 or later on Apple Silicon. |
|
|
13
|
+
| `x86_64-linux-gnu` | Linux AMD64 with glibc 2.28 or later. |
|
|
14
|
+
| `ruby` source gem or Git checkout | Rust/Cargo 1.94.0, a C linker, make and network access to the pinned Git and crates.io dependencies. |
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
Native gems need no compiler and no system Forme library.
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
CPU target. CI rejects symbols requiring glibc newer than 2.28. The same gem
|
|
22
|
-
is installed and renders a PDF in UBI 8, 9 and 10, Ubuntu 24.04 and 26.04,
|
|
23
|
-
and current Arch Linux, without Rust installed. UBI testing exercises the
|
|
24
|
-
RHEL userspace baseline; it is not a certification of every RHEL deployment.
|
|
25
|
-
Use a Ruby 3.2+ installation even when a distribution defaults to older Ruby.
|
|
18
|
+
## Install from GitHub
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
identical pagination for every font and document.
|
|
20
|
+
Download the matching native gem and `SHA256SUMS` from the
|
|
21
|
+
[0.2.0 release](https://github.com/clearstackio/forme-ruby/releases/tag/v0.2.0).
|
|
22
|
+
Check its digest with `shasum -a 256 <filename>` against the checksum file, then
|
|
23
|
+
run `gem install ./<filename>`.
|
|
32
24
|
|
|
33
|
-
## Install
|
|
25
|
+
## Install from RubyGems
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
[README](../README.md) and run `bundle install`. Commit `Gemfile.lock` so builds
|
|
37
|
-
use a reviewed revision. Compilation happens during installation; no compiler
|
|
38
|
-
or dependency download runs during `require` or rendering.
|
|
39
|
-
|
|
40
|
-
## Install a released version later
|
|
41
|
-
|
|
42
|
-
After publication is confirmed, use:
|
|
27
|
+
Add to your Gemfile and run `bundle install`:
|
|
43
28
|
|
|
44
29
|
```ruby
|
|
45
|
-
gem "forme-ruby", "~> 0.
|
|
30
|
+
gem "forme-ruby", "~> 0.2.0", require: "forme_pdf"
|
|
46
31
|
```
|
|
47
32
|
|
|
48
|
-
Bundler selects a matching native package where available
|
|
49
|
-
|
|
50
|
-
Native packages load their own shared library without a system Forme install.
|
|
33
|
+
Bundler selects a matching native package where available and otherwise
|
|
34
|
+
installs the source gem, which needs the build tools above.
|
|
51
35
|
|
|
52
36
|
## Verify the installation
|
|
53
37
|
|
data/docs/releasing.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Preparing and Releasing Forme Ruby
|
|
2
2
|
|
|
3
3
|
After reading this guide, you will know how to qualify source/native artifacts
|
|
4
|
-
and which steps publish externally. **
|
|
4
|
+
and which steps publish externally. **Published versions are listed in the [changelog](../CHANGELOG.md).**
|
|
5
5
|
Local preparation does not authorize a push, tag or RubyGems publication.
|
|
6
6
|
|
|
7
7
|
## Prepare locally
|
|
@@ -18,22 +18,20 @@ Local preparation does not authorize a push, tag or RubyGems publication.
|
|
|
18
18
|
Previously successful CI does not qualify the new commit. Consumers must not
|
|
19
19
|
lock to an unpublished SHA. Do not change remote history during local preparation.
|
|
20
20
|
|
|
21
|
-
## Qualify the release commit
|
|
21
|
+
## Qualify the release commit
|
|
22
22
|
|
|
23
23
|
After a separately authorized GitHub push, require successful `ci.yml` for that
|
|
24
|
-
exact `
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
artifact renders on macOS 15/26. See [installation](installation.md). Review the three intended artifacts: `ruby`,
|
|
28
|
-
`arm64-darwin`, and `x86_64-linux-gnu`. No Windows or musl binary is claimed.
|
|
24
|
+
exact `master` commit, including every package installation job. Review the three
|
|
25
|
+
intended artifacts: `ruby`, `arm64-darwin` and `x86_64-linux-gnu`. The
|
|
26
|
+
[installation requirements](installation.md) must match what CI qualifies.
|
|
29
27
|
|
|
30
|
-
The
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
The initial history consolidation is complete. Branch `archive/pre-0.1.0-squash`
|
|
29
|
+
preserves the earlier history and existing consumer pin. Future releases should
|
|
30
|
+
use normal commits without rewriting published history.
|
|
33
31
|
|
|
34
32
|
Review [GitHub repository setup](github-setup.md) before enabling releases.
|
|
35
33
|
|
|
36
|
-
## Configure trusted publishing
|
|
34
|
+
## Configure trusted publishing
|
|
37
35
|
|
|
38
36
|
Under the `ajaya` RubyGems account, configure a pending publisher for the new gem:
|
|
39
37
|
|
|
@@ -52,32 +50,48 @@ for setup. No long-lived RubyGems API key is required by this workflow.
|
|
|
52
50
|
|
|
53
51
|
## Publish only with explicit authorization
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
53
|
+
Pushing a `v*` tag publishes. `release.yml` runs on the tag and:
|
|
54
|
+
|
|
55
|
+
1. checks the tag equals `v` plus `FormePDF::VERSION`;
|
|
56
|
+
2. finds the successful `ci.yml` run on `master` for the tagged commit and
|
|
57
|
+
downloads its three packages, rebuilding nothing;
|
|
58
|
+
3. validates names, versions, platforms, license files and build hooks;
|
|
59
|
+
4. records a GitHub build-provenance attestation for those packages;
|
|
60
|
+
5. creates the GitHub release with the packages and `SHA256SUMS`, or, when the
|
|
61
|
+
release already exists, requires its packages to match byte-for-byte;
|
|
62
|
+
6. signs each package with Sigstore and pushes it to RubyGems through trusted
|
|
63
|
+
publishing with that attestation, then waits until RubyGems serves it.
|
|
64
|
+
|
|
65
|
+
This follows the RubyGems [trusted publishing release guide](https://guides.rubygems.org/trusted-publishing/releasing-gems/)
|
|
66
|
+
and our other gems:
|
|
67
|
+
|
|
68
|
+
1. Update `VERSION` in `lib/forme_pdf/version.rb`.
|
|
69
|
+
2. Move the Unreleased CHANGELOG entries under the new version and date.
|
|
70
|
+
3. Commit to `master` and wait for CI to pass on that commit.
|
|
71
|
+
4. Tag and push: `git tag vX.Y.Z && git push origin master vX.Y.Z`.
|
|
72
|
+
|
|
73
|
+
Treat the tag push as publication, not a dry run. Afterward, verify all three
|
|
74
|
+
platforms and their attestations on RubyGems and install from RubyGems in a clean
|
|
75
|
+
environment. Partial publication cannot be overwritten: inspect which platforms
|
|
76
|
+
succeeded before deciding how to recover. Update consumer Gemfiles only after
|
|
77
|
+
the version is available and qualified.
|
|
78
|
+
|
|
79
|
+
## Release evidence
|
|
80
|
+
|
|
81
|
+
[GitHub release 0.1.0](https://github.com/clearstackio/forme-ruby/releases/tag/v0.1.0)
|
|
82
|
+
contains the source gem, both native gems and SHA-256 checksums from
|
|
83
|
+
[CI run 35415089757](https://github.com/clearstackio/forme-ruby/actions/runs/35415089757).
|
|
84
|
+
Every job passed on commit `266628a20a0a52bad222c8f8e6d2277b08122896`, including
|
|
85
|
+
every package installation job. CodeQL also
|
|
86
|
+
passed. Packages were downloaded and validated before release; the macOS native
|
|
87
|
+
gem was additionally installed and rendered locally outside the checkout.
|
|
88
|
+
|
|
89
|
+
The GitHub `rubygems` environment exists.
|
|
90
|
+
[Registry publication run 35415885728](https://github.com/clearstackio/forme-ruby/actions/runs/35415885728)
|
|
91
|
+
succeeded through trusted publishing for all three platforms. Downloads from
|
|
92
|
+
RubyGems matched the CI and GitHub release artifacts byte-for-byte. A fresh
|
|
93
|
+
macOS ARM registry installation loaded the native library and rendered a PDF.
|
|
94
|
+
|
|
95
|
+
The publisher is configured; do not recreate it for subsequent versions.
|
|
96
|
+
A published version must never be pushed again. Use a new
|
|
97
|
+
version for future releases and qualify its packages before publication.
|
data/docs/rendering.md
CHANGED
|
@@ -20,8 +20,22 @@ ASCII-8BIT String. Always write with `File.binwrite`.
|
|
|
20
20
|
|
|
21
21
|
Forme supports a subset of HTML and print CSS, not browser layout or JavaScript.
|
|
22
22
|
Use dedicated print styles and inspect the resulting pages. Inline CSS or pass
|
|
23
|
-
`css:`; embed images as data URIs. The binding does not fetch remote stylesheets
|
|
24
|
-
|
|
23
|
+
`css:`; embed images as data URIs. The binding does not fetch remote stylesheets,
|
|
24
|
+
fonts or images.
|
|
25
|
+
|
|
26
|
+
Image sources starting with `/`, `./` or `../` are files. They are omitted with a
|
|
27
|
+
warning unless you pass `image_root:`, a directory that must contain them:
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
pdf = FormePDF.render_html(
|
|
31
|
+
'<img src="./logo.png" width="120">',
|
|
32
|
+
image_root: Rails.root.join("app/assets/images")
|
|
33
|
+
)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Relative paths resolve against `image_root`; absolute paths and symlinks must
|
|
37
|
+
resolve inside it. Each file must be a regular PNG, JPEG or WebP file of at most
|
|
38
|
+
64 MiB. Warnings name the reason, never the path.
|
|
25
39
|
|
|
26
40
|
Supply TTF font bytes explicitly:
|
|
27
41
|
|
|
@@ -32,9 +46,10 @@ pdf = FormePDF.render_html(
|
|
|
32
46
|
)
|
|
33
47
|
```
|
|
34
48
|
|
|
35
|
-
`css:` and `
|
|
36
|
-
`family`, `data`, `weight` (
|
|
37
|
-
|
|
49
|
+
`css:`, `fonts:` and `image_root:` are the supported rendering keywords. Font
|
|
50
|
+
entries accept `family`, `data`, `weight` (an Integer from 1 to 1000, default
|
|
51
|
+
400) and `italic` (true or false, default false). Unknown or invalid options
|
|
52
|
+
raise `ArgumentError`. Register the weights/styles your document needs and check the PDF.
|
|
38
53
|
|
|
39
54
|
## Inspect diagnostics
|
|
40
55
|
|
|
@@ -52,12 +67,16 @@ send sensitive document content or diagnostics to public logs.
|
|
|
52
67
|
## Handle errors and concurrency
|
|
53
68
|
|
|
54
69
|
`FormePDF::LoadError` and `FormePDF::RenderError` inherit `FormePDF::Error`.
|
|
55
|
-
Invalid caller arguments
|
|
70
|
+
Invalid caller arguments, including text that is not valid UTF-8, raise
|
|
71
|
+
`ArgumentError`. Documents nested more than 512 elements deep raise
|
|
72
|
+
`FormePDF::RenderError` instead of rendering. Avoid
|
|
56
73
|
rescuing everything and returning an HTML success response as if it were a PDF.
|
|
57
74
|
|
|
58
75
|
Each render owns independent native result storage. Ruby copies the bytes and
|
|
59
76
|
frees that result even when copying or decoding fails. Native calls release the
|
|
60
|
-
Ruby lock
|
|
77
|
+
Ruby lock and render on a native thread with its own 64 MiB stack, so deep
|
|
78
|
+
documents behave the same on Puma, Sidekiq and `Thread.new` threads as on the
|
|
79
|
+
main thread. Concurrent callers do not share output buffers. Ruby interruption is
|
|
61
80
|
masked during native ownership, so thread cancellation is not a render deadline.
|
|
62
81
|
Use process-level resource limits for large or hostile inputs. The API is not a
|
|
63
82
|
sandbox and exposes no per-render timeout.
|
data/docs/security-exceptions.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Reviewing Native Dependency Advisories
|
|
2
2
|
|
|
3
3
|
After reading this guide, you will understand the current audit exceptions and
|
|
4
|
-
when they must be reconsidered. Review date: 2026-
|
|
4
|
+
when they must be reconsidered. Review date: 2026-10-20.
|
|
5
5
|
|
|
6
6
|
## Scope
|
|
7
7
|
|
|
8
8
|
These exceptions acknowledge vulnerable dependencies; they do not patch them.
|
|
9
|
-
They apply only to Forme revision `
|
|
9
|
+
They apply only to Forme 0.28.0 revision `b97dc101b705ea5d7fea6fb1b20fabfb5bd2d63d`,
|
|
10
10
|
the locked dependency graph and the HTML-only Ruby API. Rendering is not a
|
|
11
11
|
sandbox for arbitrary HTML. See [SECURITY](../SECURITY.md).
|
|
12
12
|
|
|
@@ -18,8 +18,11 @@ sandbox for arbitrary HTML. See [SECURITY](../SECURITY.md).
|
|
|
18
18
|
|
|
19
19
|
## Verify the boundaries
|
|
20
20
|
|
|
21
|
-
`ext/forme_pdf/src/lib.rs` accepts only CSS and
|
|
22
|
-
and
|
|
21
|
+
`ext/forme_pdf/src/lib.rs` accepts only CSS, fonts and an image root, rejects
|
|
22
|
+
unknown options, and reproduces `forme_pdf_html::render_html` with default HTML
|
|
23
|
+
options: `html_to_document`, then `forme::render_with_options`. Between the two
|
|
24
|
+
it replaces file image sources with data URIs or empties them, so the engine
|
|
25
|
+
never reads files itself; image bytes still reach only the image loader. In the pinned
|
|
23
26
|
upstream tree, `html/src/dom.rs` parses with html5ever. `html/src/map.rs` has no
|
|
24
27
|
`NodeKind::Svg` construction and initializes `certification: None`.
|
|
25
28
|
`engine/src/image_loader.rs` accepts JPEG, PNG and WebP, so an SVG image cannot
|
data/ext/forme_pdf/Cargo.lock
CHANGED
|
@@ -127,9 +127,9 @@ dependencies = [
|
|
|
127
127
|
|
|
128
128
|
[[package]]
|
|
129
129
|
name = "crc32fast"
|
|
130
|
-
version = "1.5.
|
|
130
|
+
version = "1.5.3"
|
|
131
131
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
132
|
-
checksum = "
|
|
132
|
+
checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"
|
|
133
133
|
dependencies = [
|
|
134
134
|
"cfg-if",
|
|
135
135
|
]
|
|
@@ -164,7 +164,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
164
164
|
checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a"
|
|
165
165
|
dependencies = [
|
|
166
166
|
"quote",
|
|
167
|
-
"syn 3.0.
|
|
167
|
+
"syn 3.0.9",
|
|
168
168
|
]
|
|
169
169
|
|
|
170
170
|
[[package]]
|
|
@@ -251,8 +251,8 @@ dependencies = [
|
|
|
251
251
|
|
|
252
252
|
[[package]]
|
|
253
253
|
name = "forme-pdf"
|
|
254
|
-
version = "0.
|
|
255
|
-
source = "git+https://github.com/danmolitor/forme?rev=
|
|
254
|
+
version = "0.28.0"
|
|
255
|
+
source = "git+https://github.com/danmolitor/forme?rev=b97dc101b705ea5d7fea6fb1b20fabfb5bd2d63d#b97dc101b705ea5d7fea6fb1b20fabfb5bd2d63d"
|
|
256
256
|
dependencies = [
|
|
257
257
|
"barcoders",
|
|
258
258
|
"base64",
|
|
@@ -282,8 +282,8 @@ dependencies = [
|
|
|
282
282
|
|
|
283
283
|
[[package]]
|
|
284
284
|
name = "forme-pdf-html"
|
|
285
|
-
version = "0.
|
|
286
|
-
source = "git+https://github.com/danmolitor/forme?rev=
|
|
285
|
+
version = "0.28.0"
|
|
286
|
+
source = "git+https://github.com/danmolitor/forme?rev=b97dc101b705ea5d7fea6fb1b20fabfb5bd2d63d#b97dc101b705ea5d7fea6fb1b20fabfb5bd2d63d"
|
|
287
287
|
dependencies = [
|
|
288
288
|
"base64",
|
|
289
289
|
"cssparser",
|
|
@@ -296,10 +296,13 @@ dependencies = [
|
|
|
296
296
|
|
|
297
297
|
[[package]]
|
|
298
298
|
name = "forme-pdf-native"
|
|
299
|
-
version = "0.
|
|
299
|
+
version = "0.2.0"
|
|
300
300
|
dependencies = [
|
|
301
301
|
"base64",
|
|
302
|
+
"forme-pdf",
|
|
302
303
|
"forme-pdf-html",
|
|
304
|
+
"html5ever",
|
|
305
|
+
"markup5ever_rcdom",
|
|
303
306
|
"serde",
|
|
304
307
|
"serde_json",
|
|
305
308
|
"ttf-parser",
|
|
@@ -382,18 +385,18 @@ checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07"
|
|
|
382
385
|
|
|
383
386
|
[[package]]
|
|
384
387
|
name = "lazy_static"
|
|
385
|
-
version = "1.5.
|
|
388
|
+
version = "1.5.1"
|
|
386
389
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
387
|
-
checksum = "
|
|
390
|
+
checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
|
388
391
|
dependencies = [
|
|
389
392
|
"spin",
|
|
390
393
|
]
|
|
391
394
|
|
|
392
395
|
[[package]]
|
|
393
396
|
name = "libc"
|
|
394
|
-
version = "0.2.
|
|
397
|
+
version = "0.2.191"
|
|
395
398
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
396
|
-
checksum = "
|
|
399
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
397
400
|
|
|
398
401
|
[[package]]
|
|
399
402
|
name = "libm"
|
|
@@ -820,14 +823,14 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
820
823
|
dependencies = [
|
|
821
824
|
"proc-macro2",
|
|
822
825
|
"quote",
|
|
823
|
-
"syn 3.0.
|
|
826
|
+
"syn 3.0.9",
|
|
824
827
|
]
|
|
825
828
|
|
|
826
829
|
[[package]]
|
|
827
830
|
name = "serde_json"
|
|
828
|
-
version = "1.0.
|
|
831
|
+
version = "1.0.154"
|
|
829
832
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
830
|
-
checksum = "
|
|
833
|
+
checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
|
|
831
834
|
dependencies = [
|
|
832
835
|
"itoa",
|
|
833
836
|
"memchr",
|
|
@@ -865,15 +868,15 @@ checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
|
|
|
865
868
|
|
|
866
869
|
[[package]]
|
|
867
870
|
name = "siphasher"
|
|
868
|
-
version = "1.0.
|
|
871
|
+
version = "1.0.4"
|
|
869
872
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
870
|
-
checksum = "
|
|
873
|
+
checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
|
|
871
874
|
|
|
872
875
|
[[package]]
|
|
873
876
|
name = "smallvec"
|
|
874
|
-
version = "1.16.
|
|
877
|
+
version = "1.16.3"
|
|
875
878
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
876
|
-
checksum = "
|
|
879
|
+
checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b"
|
|
877
880
|
|
|
878
881
|
[[package]]
|
|
879
882
|
name = "spin"
|
|
@@ -935,9 +938,9 @@ dependencies = [
|
|
|
935
938
|
|
|
936
939
|
[[package]]
|
|
937
940
|
name = "syn"
|
|
938
|
-
version = "3.0.
|
|
941
|
+
version = "3.0.9"
|
|
939
942
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
940
|
-
checksum = "
|
|
943
|
+
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
|
941
944
|
dependencies = [
|
|
942
945
|
"proc-macro2",
|
|
943
946
|
"quote",
|
|
@@ -955,22 +958,22 @@ dependencies = [
|
|
|
955
958
|
|
|
956
959
|
[[package]]
|
|
957
960
|
name = "thiserror"
|
|
958
|
-
version = "2.0.
|
|
961
|
+
version = "2.0.21"
|
|
959
962
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
960
|
-
checksum = "
|
|
963
|
+
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
961
964
|
dependencies = [
|
|
962
965
|
"thiserror-impl",
|
|
963
966
|
]
|
|
964
967
|
|
|
965
968
|
[[package]]
|
|
966
969
|
name = "thiserror-impl"
|
|
967
|
-
version = "2.0.
|
|
970
|
+
version = "2.0.21"
|
|
968
971
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
969
|
-
checksum = "
|
|
972
|
+
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
970
973
|
dependencies = [
|
|
971
974
|
"proc-macro2",
|
|
972
975
|
"quote",
|
|
973
|
-
"syn 3.0.
|
|
976
|
+
"syn 3.0.9",
|
|
974
977
|
]
|
|
975
978
|
|
|
976
979
|
[[package]]
|
|
@@ -1029,9 +1032,9 @@ checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e"
|
|
|
1029
1032
|
|
|
1030
1033
|
[[package]]
|
|
1031
1034
|
name = "unicode-ident"
|
|
1032
|
-
version = "1.0.
|
|
1035
|
+
version = "1.0.27"
|
|
1033
1036
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1034
|
-
checksum = "
|
|
1037
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
1035
1038
|
|
|
1036
1039
|
[[package]]
|
|
1037
1040
|
name = "unicode-linebreak"
|
|
@@ -1105,18 +1108,18 @@ dependencies = [
|
|
|
1105
1108
|
|
|
1106
1109
|
[[package]]
|
|
1107
1110
|
name = "zerocopy"
|
|
1108
|
-
version = "0.8.
|
|
1111
|
+
version = "0.8.63"
|
|
1109
1112
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1110
|
-
checksum = "
|
|
1113
|
+
checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
|
|
1111
1114
|
dependencies = [
|
|
1112
1115
|
"zerocopy-derive",
|
|
1113
1116
|
]
|
|
1114
1117
|
|
|
1115
1118
|
[[package]]
|
|
1116
1119
|
name = "zerocopy-derive"
|
|
1117
|
-
version = "0.8.
|
|
1120
|
+
version = "0.8.63"
|
|
1118
1121
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1119
|
-
checksum = "
|
|
1122
|
+
checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
|
|
1120
1123
|
dependencies = [
|
|
1121
1124
|
"proc-macro2",
|
|
1122
1125
|
"quote",
|
|
@@ -1125,9 +1128,9 @@ dependencies = [
|
|
|
1125
1128
|
|
|
1126
1129
|
[[package]]
|
|
1127
1130
|
name = "zeroize"
|
|
1128
|
-
version = "1.9.
|
|
1131
|
+
version = "1.9.1"
|
|
1129
1132
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1130
|
-
checksum = "
|
|
1133
|
+
checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
|
|
1131
1134
|
dependencies = [
|
|
1132
1135
|
"zeroize_derive",
|
|
1133
1136
|
]
|
data/ext/forme_pdf/Cargo.toml
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "forme-pdf-native"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.2.0"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
[lib]
|
|
7
7
|
name = "forme_pdf_native"
|
|
8
8
|
crate-type = ["cdylib", "rlib"]
|
|
9
9
|
[dependencies]
|
|
10
|
-
forme-pdf-html = { git = "https://github.com/danmolitor/forme", rev = "
|
|
10
|
+
forme-pdf-html = { git = "https://github.com/danmolitor/forme", rev = "b97dc101b705ea5d7fea6fb1b20fabfb5bd2d63d" }
|
|
11
|
+
forme-pdf = { git = "https://github.com/danmolitor/forme", rev = "b97dc101b705ea5d7fea6fb1b20fabfb5bd2d63d" }
|
|
12
|
+
html5ever = "0.39.0"
|
|
13
|
+
markup5ever_rcdom = "0.39.0"
|
|
11
14
|
serde = { version = "1", features = ["derive"] }
|
|
12
15
|
serde_json = "1"
|
|
13
16
|
base64 = "0.22"
|
data/ext/forme_pdf/extconf.rb
CHANGED
|
@@ -9,8 +9,9 @@ require "tempfile"
|
|
|
9
9
|
keep_build = ARGV.delete("--keep-build")
|
|
10
10
|
Dir.chdir(__dir__) do
|
|
11
11
|
abort "forme-ruby source installation requires Rust/Cargo. Install a supported platform gem or install Rust first." unless system("cargo", "--version", out: File::NULL)
|
|
12
|
-
output, status = Open3.capture2("cargo", "build", "--locked", "--release", "--message-format=json", "--target-dir", File.join(__dir__, "target"), "--manifest-path", File.join(__dir__, "Cargo.toml"))
|
|
13
|
-
|
|
12
|
+
output, status = Open3.capture2("cargo", "build", "--locked", "--release", "--message-format=json-render-diagnostics", "--target-dir", File.join(__dir__, "target"), "--manifest-path", File.join(__dir__, "Cargo.toml"))
|
|
13
|
+
# Diagnostics render to stderr; stdout carries only artifact records.
|
|
14
|
+
abort "Forme native build failed; see the Cargo errors above" unless status.success?
|
|
14
15
|
extension = RbConfig::CONFIG["host_os"].include?("darwin") ? "dylib" : "so"
|
|
15
16
|
artifacts = output.lines.filter_map do |line|
|
|
16
17
|
record = JSON.parse(line)
|