You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Add documentation for which features do not require traceur-runtime #1007
modules - $traceurRuntime and a lot more from src/runtime to support dynamic module loaders. --modules=amd and --modules=commonjs needs no Traceur runtime.
spread - $traceurRuntime.spread
polyfills - Array, Promise, String, Map, Set, Symbol
Destructuring, modules, and spread all seem like they could reasonably be compiled out dependency free. I'm not familiar with the traceur code for these features but my goal is to be able to run modules through traceur with --modules=instantiate and be able to load them with SystemJS or es6-module-loader and no runtime...
Im playing around with adding options.standalone. Right now it works similarly to experimental except that it sets all options that are NOT flagged stand alone to off.
What I am thinking is that there may be a more intuitive way to go about all this. It seems like the real desire would be to select the modules for a custom runtime build and automatically get the features that either don't need any runtime help or that depend on an included runtime but nothing else.
Also it would be great if the runtime got built out to amd/commonjs/instantiate modules as well, leaving it up to the user to determine the bundling strategy etc.
Also it would be great if the runtime got built out to amd/commonjs/instantiate modules as well, leaving it up to the user to determine the bundling strategy etc.
We toyed around with that idea before and I think it would be great. I think there might be some bootstrapping issues though.
I guess you are thinking about loading runtime dependencies via module
loading? I think our build scheme is a bit easier now or at least I
understand it. If you want to pursue this don't hesitate to ask about it.
Also it would be great if the runtime got built out to
amd/commonjs/instantiate modules as well, leaving it up to the user to
determine the bundling strategy etc.
We toyed around with that idea before and I think it would be great. I
think there might be some bootstrapping issues though.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1007#issuecomment-43095789
.
Great to see the runtime splitting up. Thanks guys!
I was looking at the runtime dependency for destructuring and it seems like something that could probably be inlined without adding a ton of bloat. Is that something that has been discussed before? Once you decouple destructuring from needing the runtime then traceur becomes a lot more attractive as a general transcompiler with a set of optional features that DO require runtime support.
I think if things looked more like the above then it would be much easier to get broader buy-in to using traceur in production scenarios.
Also +1 for standard traceour runtime in bower, component and npm registry. I woudn't like to host runtime precompiled with my library. I guess it should be a dependency.
By definition, the compiler knows which ES6 features are being used by the subject code. As such, would it make sense to have the compiler produce the minimal runtime that matches the required features? Optionally either keep it as a separate build artefact or automatically prepend it to the app bundle?
Activity
matthewrobb commentedon May 11, 2014
Alternatively make it so traceur-runtime can be custom built to only include specific features? Not sure how possible this is but it would be nice.
arv commentedon May 12, 2014
Both are useful. I have been wanting to split up the runtime file so that custom runtime files can be made easier.
Here is a first draft audit of the features and their dependency on a runtime:
Default options
Requires runtime
Symbol.iterator$traceurRuntime.createClass$traceurRuntime.assertObjectSymbol.iterator$traceurRuntime.initGeneratorFunction&$traceurRuntime.createGeneratorInstance$traceurRuntime.initGeneratorFunction&$traceurRuntime.createGeneratorInstance$traceurRuntimeand a lot more from src/runtime to support dynamic module loaders.--modules=amdand--modules=commonjsneeds no Traceur runtime.$traceurRuntime.spreadNo runtime
Experimental Options
Requires runtime
$traceurRuntime.asyncWrap$traceurRuntime.typesNo runtime
matthewrobb commentedon May 12, 2014
Destructuring, modules, and spread all seem like they could reasonably be compiled out dependency free. I'm not familiar with the traceur code for these features but my goal is to be able to run modules through traceur with --modules=instantiate and be able to load them with SystemJS or es6-module-loader and no runtime...
Extract spread runtime code into a new file
matthewrobb commentedon May 14, 2014
Im playing around with adding options.standalone. Right now it works similarly to experimental except that it sets all options that are NOT flagged stand alone to off.
What I am thinking is that there may be a more intuitive way to go about all this. It seems like the real desire would be to select the modules for a custom runtime build and automatically get the features that either don't need any runtime help or that depend on an included runtime but nothing else.
Also it would be great if the runtime got built out to amd/commonjs/instantiate modules as well, leaving it up to the user to determine the bundling strategy etc.
arv commentedon May 14, 2014
We toyed around with that idea before and I think it would be great. I think there might be some bootstrapping issues though.
johnjbarton commentedon May 14, 2014
I guess you are thinking about loading runtime dependencies via module
loading? I think our build scheme is a bit easier now or at least I
understand it. If you want to pursue this don't hesitate to ask about it.
On Wed, May 14, 2014 at 8:29 AM, Erik Arvidsson [email protected]:
Extract class runtime functions into own file
Extract class runtime functions into own file
matthewrobb commentedon May 14, 2014
Great to see the runtime splitting up. Thanks guys!
I was looking at the runtime dependency for destructuring and it seems like something that could probably be inlined without adding a ton of bloat. Is that something that has been discussed before? Once you decouple destructuring from needing the runtime then traceur becomes a lot more attractive as a general transcompiler with a set of optional features that DO require runtime support.
I think if things looked more like the above then it would be much easier to get broader buy-in to using traceur in production scenarios.
Extract generator runtime into its own file
Extract generator runtime into its own file
Move Object assign, is and mixin to polyfill directory
sheerun commentedon Oct 25, 2014
+1 Also an option that enables all features that don't require runtime would be cool.
sheerun commentedon Oct 25, 2014
Also +1 for standard traceour runtime in bower, component and npm registry. I woudn't like to host runtime precompiled with my library. I guess it should be a dependency.
jokeyrhyme commentedon Dec 16, 2014
By definition, the compiler knows which ES6 features are being used by the subject code. As such, would it make sense to have the compiler produce the minimal runtime that matches the required features? Optionally either keep it as a separate build artefact or automatically prepend it to the app bundle?
johnjbarton commentedon Dec 16, 2014
Yes.