docs.rs failed to build easyjsr-0.4.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
easyjsr-0.3.0
easyjsr
Default runtime for easyjs. Rust wrapper of ejr.
usage
To use with easyjs
you can set the runtime to easyjsr
. It is also the default runtime.
> import
> @print()
For developers
This is a really easy to use runtime for embedding in rust projects. Important thing to note is that it does not currently support MSVC builds. Only GNU/Clang. So if using windows make sure to install the correct build system.
# And build with
Evaluating JS
let result = ejr.eval;
println!; // 2
Calling specific functions
let script = r##"
function say_hello_to(name) {
console.log('Hello', name);
}
"##;
let result = ejr.call; // Hello Jordan
Creating callables
.register_callback;
// Lambdas
ejr.register_callback;
ejr
Compiling JS into exe
This is mostly for libraries, you usually won't use this in an app.
compile_js_code;
// Or as a module
compile_js_code_as_module;
Use case
The use case of another JS runtime is specifically to be a high level wrapper for easy FFI use in:
- Kazoku
- easyjs
- Going Up
All projects that use easyjs as scripting.