Giter Site home page Giter Site logo

ftw's People

Contributors

macalimlim avatar piercelbrooks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ftw's Issues

run game in server mode

Run the game in server mode, ftw run should have an option to run in server mode in addition to running via desktop. This feature is only available in Linux...

add github actions

add github actions to test PRs and deploy to crates when new tags are created

provide a way to customize which godot binary

provide a way to customize which godot binary to be used to invoke commands that use godot. For example, instead of having godot binary on $PATH, I want to have a custom batch or shell script file to invoke godot...

Dependency error on install

It appears one of the dependencies might be out of date, looking at cargo git-ref semms to have renamed itself to gix-ref
log.txt

    Updating crates.io index
  Installing ftw v0.12.0
   Compiling libc v0.2.147
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling memchr v2.5.0
   Compiling cfg-if v1.0.0
   Compiling thiserror v1.0.44
   Compiling autocfg v1.1.0
   Compiling regex-syntax v0.7.4
   Compiling once_cell v1.18.0
   Compiling pkg-config v0.3.27
   Compiling version_check v0.9.4
   Compiling rustix v0.38.6
   Compiling bitflags v2.3.3
   Compiling linux-raw-sys v0.4.5
   Compiling num-traits v0.2.16
   Compiling time-core v0.1.1
   Compiling itoa v1.0.9
   Compiling time-macros v0.2.11
   Compiling num_threads v0.1.6
   Compiling deranged v0.3.7
   Compiling serde v1.0.181
   Compiling aho-corasick v1.0.2
   Compiling quote v1.0.32
   Compiling smallvec v1.11.0
   Compiling jobserver v0.1.26
   Compiling syn v2.0.28
   Compiling getrandom v0.2.10
   Compiling lazy_static v1.4.0
   Compiling vcpkg v0.2.15
   Compiling cc v1.0.81
   Compiling lock_api v0.4.10
   Compiling bitflags v1.3.2
   Compiling ucd-trie v0.1.6
   Compiling crunchy v0.2.2
   Compiling serde_derive v1.0.181
   Compiling parking_lot_core v0.9.8
   Compiling regex-automata v0.3.4
   Compiling openssl-src v111.27.0+1.1.1v
   Compiling scopeguard v1.2.0
   Compiling time v0.3.25
   Compiling signal-hook v0.3.17
   Compiling fastrand v2.0.0
   Compiling tiny-keccak v2.0.2
   Compiling proc-macro-hack v0.5.20+deprecated
   Compiling same-file v1.0.6
   Compiling static_assertions v1.1.0
   Compiling tempfile v3.7.0
   Compiling walkdir v2.3.3
   Compiling openssl-sys v0.9.90
   Compiling libz-sys v1.1.12
   Compiling libssh2-sys v0.2.23
   Compiling signal-hook-registry v1.4.1
   Compiling quick-error v2.0.1
   Compiling syn v1.0.109
   Compiling tinyvec_macros v0.1.1
   Compiling hashbrown v0.14.0
   Compiling minimal-lexical v0.2.1
   Compiling percent-encoding v2.3.0
   Compiling hex v0.4.3
   Compiling bstr v1.6.0
   Compiling regex v1.9.1
   Compiling dashmap v5.5.0
   Compiling nom v7.1.3
   Compiling tinyvec v1.6.0
   Compiling thiserror-impl v1.0.44
   Compiling is-terminal v0.4.9
   Compiling btoi v0.4.3
   Compiling rand_core v0.6.4
   Compiling ahash v0.7.6
   Compiling ppv-lite86 v0.2.17
   Compiling utf8parse v0.2.1
   Compiling either v1.9.0
   Compiling sha1_smol v1.0.0
   Compiling anstyle-parse v0.2.1
   Compiling itertools v0.10.5
   Compiling rand_chacha v0.3.1
   Compiling const-random-macro v0.1.15
   Compiling unicode-normalization v0.1.22
   Compiling liquid-derive v0.26.4
   Compiling git-hash v0.10.3
   Compiling pest v2.7.2
   Compiling git-date v0.4.3
   Compiling git-features v0.26.5
   Compiling git-actor v0.17.2
   Compiling git-validate v0.7.3
   Compiling git-path v0.7.2
   Compiling git-tempfile v3.0.3
   Compiling kstring v2.0.0
   Compiling libgit2-sys v0.14.2+1.5.1
   Compiling ahash v0.8.3
   Compiling smartstring v1.0.1
   Compiling pest_meta v2.7.2
   Compiling anstyle v1.0.1
   Compiling fastrand v1.9.0
   Compiling anstyle-query v1.0.0
   Compiling log v0.4.19
   Compiling heck v0.4.1
   Compiling unicode-bidi v0.3.13
   Compiling colorchoice v1.0.0
   Compiling doc-comment v0.3.3
   Compiling unicode-width v0.1.10
   Compiling anymap2 v0.13.0
   Compiling unicode-segmentation v1.10.1
   Compiling pest_generator v2.7.2
   Compiling portable-atomic v1.4.2
   Compiling idna v0.4.0
   Compiling console v0.15.7
   Compiling anstream v0.3.2
   Compiling git-lock v3.0.3
   Compiling git-object v0.26.2
   Compiling const-random v0.1.15
   Compiling rand v0.8.5
   Compiling form_urlencoded v1.2.0
   Compiling pest_derive v2.7.2
   Compiling memmap2 v0.5.10
   Compiling names v0.14.0
   Compiling semver v1.0.18
   Compiling fnv v1.0.7
   Compiling rustversion v1.0.14
   Compiling paste v1.0.14
   Compiling liquid-core v0.26.4
   Compiling anyhow v1.0.72
   Compiling clap_lex v0.5.0
   Compiling openssl v0.10.55
   Compiling foreign-types-shared v0.1.1
   Compiling clap_builder v4.3.19
   Compiling foreign-types v0.3.2
   Compiling globset v0.4.12
   Compiling git-ref v0.23.1
   Compiling hashbrown v0.12.3
   Compiling url v2.4.0
error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/store/packed/find.rs:95:52
   |
95 |                 .map(|(_rest, r)| r.name.as_bstr().as_ref())
   |                                                    ^^^^^^ the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/store/packed/find.rs:91:43
   |
91 |         a.binary_search_by_key(&full_name.as_ref(), |b: &u8| {
   |                                           ^^^^^^ the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0283]: type annotations needed
    --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:109:43
     |
109  |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
     |                                           ^^^^^^^^^^^^ -------------------------- type must be known at this point
     |                                           |
     |                                           cannot infer type of the type parameter `P` declared on the method `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
     = help: the following types implement trait `core::slice::SlicePattern`:
               [T; N]
               [T]
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /home/rampedindent/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2333:28
     |
2333 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
109  |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
     |                                                       +++++

error[E0283]: type annotations needed
   --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:109:43
    |
109 |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
    |                                           ^^^^^^^^^^^^                   ------ type must be known at this point
    |                                           |
    |                                           cannot infer type of the type parameter `P` declared on the method `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
109 |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
    |                                                       +++++

error[E0283]: type annotations needed
   --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:132:46
    |
132 |         } else if let Some(shortened) = name.strip_prefix(Category::MainPseudoRef.prefix().as_ref()) {
    |                                              ^^^^^^^^^^^^                                  ------ type must be known at this point
    |                                              |
    |                                              cannot infer type of the type parameter `P` declared on the method `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
132 |         } else if let Some(shortened) = name.strip_prefix::<P>(Category::MainPseudoRef.prefix().as_ref()) {
    |                                                          +++++

error[E0283]: type annotations needed
   --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:139:18
    |
139 |             name.strip_prefix(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                  ^^^^^^^^^^^^                                                        ------ type must be known at this point
    |                  |
    |                  cannot infer type of the type parameter `P` declared on the method `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
139 |             name.strip_prefix::<P>(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                              +++++

error[E0283]: type annotations needed
    --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/raw.rs:76:18
     |
76   |                 .strip_prefix(namespace.0.as_bstr().as_ref())
     |                  ^^^^^^^^^^^^ ------------------------------ type must be known at this point
     |                  |
     |                  cannot infer type of the type parameter `P` declared on the method `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
     = help: the following types implement trait `core::slice::SlicePattern`:
               [T; N]
               [T]
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /home/rampedindent/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2333:28
     |
2333 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
76   |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
     |                              +++++

error[E0283]: type annotations needed
  --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/raw.rs:76:18
   |
76 |                 .strip_prefix(namespace.0.as_bstr().as_ref())
   |                  ^^^^^^^^^^^^                       ------ type must be known at this point
   |                  |
   |                  cannot infer type of the type parameter `P` declared on the method `strip_prefix`
   |
   = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
           - impl AsRef<BStr> for BStr;
           - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
   |
76 |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
   |                              +++++

Some errors have detailed explanations: E0277, E0283.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `git-ref` due to 8 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ftw v0.12.0`, intermediate artifacts can be found at `/tmp/cargo-installhF7YYj`

Add ability to create tool scripts

Currently, FTW supports creating regular classes and singletons using the class and singleton commands. I propose adding another command tool.

Currently, ftw overwrites the lib.rs file and the init function. This means that custom handle.add_class<> calls are removed from the file. In order to register a tool script with godot-rust, you have to do something like

fn init(handle: InitHandle) {
  handle.add_tool_class::<MyClass>();
}

but this will be overwritten if you ever run a command like ftw class again.

I tried implementing this command, but I got stuck because the current implementation reads the source-dir and looks for [NativeClass] using a regex. I couldn't think of a good approach for tool scripts so I decided to post an issue here and get some feedback from you before I proceed. For example, I thought of adding some custom attribute, but this would require users to import a crate into their project which feels messy and against the current approach. I also thought of making the user add a comment but this approach is not always popular.

Another option, instead of implementing this tool command, is some workaround that allows you to call some custom code from the lib.rs file.

Missing "use" in lib.rs with generated class at path

I ran ftw class chars/Player KinematicBody but when I tried to run the whole game (ftw run), Rust gave an error that it couldn't find player in handle.add_class::<player::Player>();. This seemed to be because the generated code added mod chars; to the top, but not use chars::*; or at least use chars::player; and I had to add it myself.

I'm using the released ftw 0.6.0

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.