-
Notifications
You must be signed in to change notification settings - Fork 147
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
Document how to transpile with CLI #147
Comments
The web server we use on samples are coming from https://github.com/bazelbuild/rules_closure/blob/master/closure/webfiles/web_library.bzl I don't recall it providing a mechanism to customize address but you can dig into there and see if there is already a way, or propose change to expose it. If this is only about ipv6 issue, I can change the default one and see if it works in all test environments. (BTW, pls note that the web server there is quite bit hacky, unsafe and definitely not intended for complex usages even for development) |
I want to be able to change the port as well, so I guess I'll have a look at that web_library definition. TBH I'd rather not use Bazel at all just for building sample apps. Is there an alternative? Like a CLI that I can use to compile the WASM and other generated code? |
Bazel can produce a J2clTranspiler binary that you can run outside of bazel as a command line tool. Running Also, running The j2cl-maven-plugin will work most of the details that were covered by j2cl_library, j2cl_application, j2cl_test and then some (tests work properly, dev mode output with BUNDLE supports sourcemaps, etc), but doesn't presently have wasm support hooked up, mostly due to our lack of familiarity with wasm. |
Yes, you can use the Bazel generated compiler binary; and unlike J2CL, it is currently modeled as a monolithic compiler so you need to collect and supply all the java sources in single shot (vs. compiling independently and providing deps etc.). Being said that; we supplied the open-source WASM samples for WASM & VM researchers. It is very experimental; the way compiler work and even the bazel rules doesn't reflect our long term design around it; and it is mostly hacked up together. |
Great. That could work. You might have to help a bit to get over the initial humps:
|
You can pass "-s" to |
Related to #146. I assume it is somehow possible to ask the web server in the sample apps to bind to a different address (host and port), but I can't see how to do it. Some documentation might help? Or maybe it's actually a missing feature in the
j2cl_application.bzl
?The text was updated successfully, but these errors were encountered: