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

"First class" targets #203

Open
Idorobots opened this issue Aug 13, 2024 · 0 comments · May be fixed by #209
Open

"First class" targets #203

Idorobots opened this issue Aug 13, 2024 · 0 comments · May be fixed by #209

Comments

@Idorobots
Copy link
Owner

Idorobots commented Aug 13, 2024

Would be nice for the compilation targets to determine the compilation pipeline - for instance:

  • omitting certain phases on a target that doesn't need them,
  • including extra/fewer built-in modules if a runtime provides it.

Each target should provide a compiler built out of the current pipeline parts as well as a command to execute the code and run a REPL.

Compiler options:

  • --target - sets the compilation target, which sets the default compiler options and then applies overrides from the command line (for instance js),
  • --platform - sets the target-specific platform (e.g. nodejs),
  • --runtime - sets the target-specific runtime (if there are multiple provided),
  • --packaging - target specific packaging (for example, module vs standalone).
sprtn run -i test.sprtn --target ES6 --platform nodejs --packaging module

Alternatively, the options can be combined into a single target string:

sprtn run -i test.sprtn --target es6-nodejs-module
sprtn run -i test.sprtn --target native-x86_64-shared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant