Skip to content

Rustpkg needs to support invoking the default build logic in a package script #6401

Closed

Description

@catamorphism

Sub-bug of #5677

In pkg.rs, there has to be a way to invoke the default build logic. Either provide a library function in librustpkg that does this, or make rustpkg automatically invoke it after executing the contents of pkg.rs (with a way to turn that off). I guess I prefer the first option, but don't care that much.

Activity

  1. metajack commented on May 10, 2013

    @metajack
    Contributor

    Thinking about this more, I think the first option is preferable if we keep the fn main() { ... } in pkg.rs.

    In order to support both pre-build logic and post-build logic otherwise you'd need to either disallow post-build logic without supressing default behavior, or you could have three functions with default implementations: prebuild, build, and postbuild, where normally people are only overiding the first one.

    Since keeping main is the easiest path forward and doesn't close any other paths in the future, option one seems to be the way to go.

  2. catamorphism commented on May 10, 2013

    @catamorphism
    ContributorAuthor

    Agreed.

  3. added a commit that references this issue on Jun 26, 2013
    3789433
  4. added a commit that references this issue on Jun 27, 2013
    c440743
  5. added a commit that references this issue on Jun 28, 2013
    ef753c3
  6. removed their assignment
    on Jun 16, 2014
  7. added a commit that references this issue on Dec 20, 2020
  8. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions