-
Notifications
You must be signed in to change notification settings - Fork 121
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
Reduce wasm binary size with cargo-xbuild
& removing rlib
crate-type
#33
Merged
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
2cda649
WIP: building wasm with xargo
ascjones efa20d3
Fix compilation errors
ascjones 16d34e0
Fmt
ascjones 9502f62
Run commands with `rustup run nightly`
ascjones e61035b
Pass separate link-args in rustflags for xargo compat
ascjones 7ecfc46
Warn user if 'rlib' crate type
ascjones fcc7157
Colourise printed error
ascjones cd1658b
Ignore Xargo.toml in template
ascjones e85fe45
Refactor Xargo file generation, only remove if generated.
ascjones 416f210
WIP: Add rlib crate-type when generating metadata
ascjones dbb93fe
Add rlib when building metadata, remove when building wasm
ascjones d8bbc91
Fmt
ascjones 9998a1f
Make error bright red
ascjones 9a0b0dc
Fix generating without modified Cargo.toml
ascjones 8ddb26d
Don't need to check nightly installed, the command will fail
ascjones 3c34994
Only load toml when ready to modify: allow for multi usage
ascjones 82c64b3
Fmt
ascjones 3568343
Show error context
ascjones 2c70524
Debug crate metadata
ascjones 4a092ea
Disable rlib by default for template
ascjones 0067ce7
Use correct working dir, not workspace root
ascjones 00e7fa6
Use `cargo-xbuild` as lib
ascjones 3230d89
Check for nightly channel
ascjones 17e0680
Check for correct xbuild configuration
ascjones 1f48c07
Add xbuild config to template
ascjones 9c3c4e1
Fix xbuild config check and use latest xbuild version
ascjones 4ff2971
Fmt
ascjones 436077d
Restore tempfile dev dependency
ascjones fe27fee
Move xbuild config to the end of the file
ascjones 4ace9b3
Enable rlib by default in template
ascjones 9b49dbe
Don't need nightly for generating the metadata
ascjones b4ab11e
Actually do need nightly, and just run plain cargo
ascjones f38c6e3
Not verbose: need to pass that flag through properly
ascjones 8c00f0d
Fmt
ascjones 3aa17bf
Fix tests
ascjones 2c53aeb
Error when xbuild config not present, and update README
ascjones 9d056ac
Fix tests
ascjones 90f1485
Remove references to xargo and update readmes
ascjones be57190
Fmt
ascjones 4e42146
Add error context to cargo invocation
ascjones 3d44090
Fix tests compilation
ascjones 7f5f356
Fmt
ascjones 98d2101
Nightly toolchain for CI
ascjones 1919afa
Add docs for nightly toolchain requirement
ascjones dab7d85
Link to nightly docs
ascjones 8973138
Disable backtrace on CI
ascjones 3a67388
Make tests pass
ascjones 4b689ff
Install rust-src
ascjones 631ca91
Disable backtrace to make tests pass
ascjones c36bb60
Move args closer to invocation
ascjones d2e0693
Create temporary Cargo.toml
ascjones 67ee4c7
Rework temp manifest api
ascjones fb75207
Target dir is already absolute
ascjones 2acc79d
temp dir prefix
ascjones afe99ab
xbuild config with sysroot path and explicit args
ascjones 4bc56fc
Use custom xbuild branch
ascjones 407a548
Remove check for xbuild config
ascjones dc0351f
Rewrite relatives paths when using temp file
ascjones 2fd59a6
Fix dependency path rewrite
ascjones afa76ab
Update cargo-xbuild
ascjones 90e7564
workspaces: parse workspace member manifests
ascjones f039b79
Merge branch 'master' into aj-xargo
ascjones bc4060e
WIP workspaces
ascjones cd1b69c
Implement temp workspace copy
ascjones 9df4691
Fmt
ascjones 2da47dc
Rewrite bin relative path
ascjones 52b82cb
Handle package rename for contracts
ascjones 9aff20d
Fmt
ascjones 3480057
Pass rustflags by setting env var
ascjones 963cd34
Fmt
ascjones 6f5f759
Use abs path for lib default
ascjones 67e30a0
Add 1 decimal place to file size
ascjones b85ad22
Make generate-metadata work, introduces ManifestPath
ascjones 7103d60
Fmt
ascjones e02c5c9
cargo update
ascjones 81db473
Rename manifest to workspace
ascjones a3af596
Fix test compilation and fmt
ascjones 0310ce9
Fix link
ascjones 7cf71c7
Add prerequisites section to readme
ascjones c5eba00
Remove rust-src component (added to image)
ascjones e8b227d
Fix deploy build
ascjones 4b82756
Use builder like method for amending root manifest
ascjones ca3a8e9
List installed components
ascjones bde09c7
Show active-toolchain and whether rust-src installed
ascjones f4fff3a
Install nightly rust-src (temporary)
ascjones 5aae77b
Fix metadata test
ascjones a3b0e6d
Fmt
ascjones 8a2cfeb
Remove manual install of rust-src and diagnostics
ascjones fb6722a
More doc comments
ascjones 5bba2f1
Add verbosity flags
ascjones c73dab7
Add verbosity flags to metadata command
ascjones 6579826
Fix working dir for generate-metadata
ascjones 848197a
Add verbosity to tests
ascjones 6c7a8cd
Add verbosity to tests
ascjones 24d085c
Make url optional and cargo update
ascjones 7897f8f
Remove bk file from gitignore
ascjones 4db24be
Bump version
ascjones 574ee00
Fix comment and formatting
ascjones ab40adb
Add CHANGELOG.md
ascjones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add verbosity flags to metadata command
- Loading branch information
commit c73dab7e6ef0f22b9e1c962967d06e56338b802c
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
--no-default-features
is wrong anyway because this tool performs IO, so for example cannot beno_std
.