Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trunk support #299

Merged
merged 6 commits into from
Apr 29, 2023
Merged

Trunk support #299

merged 6 commits into from
Apr 29, 2023

Conversation

lelgenio
Copy link
Contributor

@lelgenio lelgenio commented Apr 15, 2023

Motivation

Trunk is an incredibly usefull tool to "Build, bundle & ship your Rust WASM application to the web".

Closes #295

Checklist

  • added tests to verify new behavior
  • added an example template or updated an existing one
  • updated docs/API.md (or general documentation) with changes
  • updated CHANGELOG.md

TODO:

  • Add an example of how to build a workspace with three crates: "client", "server" and "shared"
  • Perhaps bring the documentation more in line with that of other functions (?)
  • Squash

@lelgenio lelgenio force-pushed the trunk-support branch 2 times, most recently from 2f2241f to a584318 Compare April 20, 2023 22:59
@lelgenio lelgenio marked this pull request as ready for review April 20, 2023 23:02
Copy link
Owner

@ipetkov ipetkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the comprehensive PR, I really appreciate that you not only added tests but also added API docs and examples!

@lelgenio
Copy link
Contributor Author

I'm not sure about it, but it seems like a good idea to generate cargoArtifacts if they are not passed in, considering buildTrunkPackage is supposed to behave similarly to buildPackage, is that right?

@lelgenio lelgenio requested a review from ipetkov April 27, 2023 15:14
@ipetkov
Copy link
Owner

ipetkov commented Apr 28, 2023

I'm not sure about it, but it seems like a good idea to generate cargoArtifacts if they are not passed in, considering buildTrunkPackage is supposed to behave similarly to buildPackage, is that right?

I like this idea!

@lelgenio lelgenio force-pushed the trunk-support branch 3 times, most recently from 48213b4 to 287f5fd Compare April 28, 2023 16:45
[Trunk](https://trunkrs.dev) is a tool that allow you to build web apps
using Rust and webassembly, including compiling scss, and distributing
other assets.

Adds `craneLib.buildTrunkPackage`, a function that builds a Trunk
project returning a directory with the resulting dist files for that
project
@lelgenio
Copy link
Contributor Author

CI fail on 22.11 is due to wasm-bindgen-cli beign outdated. Made a backport PR NixOS/nixpkgs#228754.

@ipetkov
Copy link
Owner

ipetkov commented Apr 29, 2023

Pushed a few minor fixes, will merge when CI passes!

@ipetkov ipetkov merged commit db21a44 into ipetkov:master Apr 29, 2023
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.

Trunk Support
2 participants