Giter Site home page Giter Site logo

Optimize command not found about docs HOT 4 CLOSED

terra-money avatar terra-money commented on August 12, 2024
Optimize command not found

from docs.

Comments (4)

octalmage avatar octalmage commented on August 12, 2024 1

thanks for trying! I'll dig into this today, seems like we must be missing a step in the docs.

from docs.

octalmage avatar octalmage commented on August 12, 2024

Hey @4kihito, the cw-template includes a script to run the docker based optimizer:

https://github.com/CosmWasm/cw-template/blob/0.16/Cargo.toml#L36

Did you run cargo wasm first? This should get run-script installed.

from docs.

4kihito avatar 4kihito commented on August 12, 2024

I just gave it another go, with a fresh contract and yes I can confirm I did run cargo wasm and the problem persists.

Here's everything I did and the results, cloned, compiled and then I tried running the optimize command.
Am I missing something? Thanks

user@userMangus:~/terra$ cargo generate --git https://github.com/CosmWasm/cw-template.git --branch 0.16 --name trying
⚠️   Unable to load config file: /home/user/.cargo/cargo-generate.toml
🔧   Generating template ...
[ 1/34]   Done: .cargo/config
[ 2/34]   Done: .cargo
[ 3/34]   Skipped: .circleci/config.yml
[ 4/34]   Done: .circleci
[ 5/34]   Done: .editorconfig
[ 6/34]   Done: .github/workflows/Basic.yml
[ 7/34]   Done: .github/workflows
[ 1/34]   Done: .cargo/config
[ 2/34]   Done: .cargo
[ 3/34]   Skipped: .circleci/config.yml
[ 4/34]   Done: .circleci
[ 5/34]   Done: .editorconfig
[ 6/34]   Done: .github/workflows/Basic.yml
[ 7/34]   Done: .github/workflows
[ 8/34]   Done: .github
[ 9/34]   Done: .gitignore
[10/34]   Done: .gitpod.Dockerfile
[11/34]   Done: .gitpod.yml
[12/34]   Done: Cargo.lock
[13/34]   Done: Cargo.toml
[14/34]   Done: Developing.md
[15/34]   Done: Importing.md
[16/34]   Done: LICENSE
[17/34]   Done: NOTICE
[18/34]   Done: Publishing.md
[19/34]   Done: README.md
[20/34]   Done: examples/schema.rs
[21/34]   Done: examples
[22/34]   Done: rustfmt.toml
[23/34]   Done: schema/count_response.json
[24/34]   Done: schema/execute_msg.json
[25/34]   Done: schema/instantiate_msg.json
[26/34]   Done: schema/query_msg.json
[27/34]   Done: schema/state.json
[28/34]   Done: schema
[29/34]   Done: src/contract.rs
[30/34]   Done: src/error.rs
[31/34]   Done: src/lib.rs
[32/34]   Done: src/msg.rs
[33/34]   Done: src/state.rs
[34/34]   Done: src
🔧   Moving generated files into: `/home/user/terra/trying`...
✨   Done! New project created /home/user/terra/trying
user@userMangus:~/terra$ cd trying/
user@userMangus:~/terra/trying$ cargo wasm
    Updating crates.io index
   Compiling proc-macro2 v1.0.28
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.74
   Compiling serde_derive v1.0.127
   Compiling serde v1.0.127
   Compiling ryu v1.0.5
   Compiling serde_json v1.0.66
   Compiling crunchy v0.2.2
   Compiling itoa v0.4.7
   Compiling schemars v0.8.3
   Compiling static_assertions v1.1.0
   Compiling hex v0.4.3
   Compiling dyn-clone v1.0.4
   Compiling byteorder v1.4.3
   Compiling base64 v0.13.0
   Compiling uint v0.9.1
   Compiling quote v1.0.9
   Compiling serde_derive_internals v0.25.0
   Compiling schemars_derive v0.8.3
   Compiling thiserror-impl v1.0.26
   Compiling cosmwasm-derive v0.16.2
   Compiling thiserror v1.0.26
   Compiling serde-json-wasm v0.3.1
   Compiling cosmwasm-std v0.16.2
   Compiling cw-storage-plus v0.8.1
   Compiling cosmwasm-storage v0.16.0
   Compiling cw2 v0.8.1
   Compiling trying v0.1.0 (/home/user/terra/trying)
    Finished release [optimized] target(s) in 26.52s
user@userMangus:~/terra/trying$ cargo run-script optimize
error: no such subcommand: `run-script`
user@userMangus:~/terra/trying$ 

from docs.

octalmage avatar octalmage commented on August 12, 2024

@4kihito I believe this is the missing piece:

cargo install cargo-run-script

I'll get the docs updated.

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.