Skip to content

Commit 92e41ec

Browse files
osbreclaude
andcommitted
Add css-inline as git submodule with auto-build on install
Make the shard installable for Crystal users by vendoring the upstream Rust library as a submodule and building the C bindings via a postinstall script in shard.yml. Update CI to checkout submodules and install Rust before running specs. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 6c1c8e9 commit 92e41ec

5 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: Run tests
2121
run: crystal spec
2222
env:
23-
LD_LIBRARY_PATH: ${{ github.workspace }}/css-inline/bindings/c/target/release
23+
LD_LIBRARY_PATH: ${{ github.workspace }}/css-inline/bindings/c/target/release

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/bin/
44
/.shards/
55
*.dwarf
6-
/css-inline
76

87
# Libraries don't need dependency lock
98
# Dependencies will be locked in applications that use them

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "css-inline"]
2+
path = css-inline
3+
url = https://github.com/Stranger6667/css-inline.git

css-inline

Submodule css-inline added at fb56972

shard.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ authors:
77
crystal: '>= 1.19.1'
88

99
license: MIT
10+
11+
scripts:
12+
postinstall: cd css-inline/bindings/c && cargo build --release

0 commit comments

Comments
 (0)