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

Cargo Integration #93

Open
jakelang opened this issue May 27, 2019 · 3 comments
Open

Cargo Integration #93

jakelang opened this issue May 27, 2019 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jakelang
Copy link
Collaborator

It seems that integrating chisel with rust projects requires either a makefile or manual invocation, which isn't great ux. Perhaps a cargo subcommand or plugin would make this much easier.
cc @axic

@jakelang jakelang added enhancement New feature or request help wanted Extra attention is needed labels May 27, 2019
@jakelang
Copy link
Collaborator Author

Another possibility is introducing a target triple for rustc wasm32-unknown-ewasm

@axic
Copy link
Member

axic commented May 27, 2019

That would be great!

@hugo-dc
Copy link
Contributor

hugo-dc commented Jun 11, 2019

I started this cargo submodule here: https://github.com/hugo-dc/cargo-build-ewasm
it executes: cargo build --target=wasm32-unknown-unknown --release, then runs chisel run (expects a default chisel.yml configuration), and lastly executes wasm-snip to reduce the bytecode size.

Tested in here: https://github.com/hugo-dc/wrc20-rust/blob/master/Makefile , it also needed to use wasm-opt (from binaryen) to reduce even more the bytecode size.

Still have more changes to do, just wanted to share it, please let me know any comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants