Remove .pre suffix use .epoch and .fuel instead
This commit is contained in:
parent
3fb1cd0726
commit
562e22814f
3 changed files with 4 additions and 2 deletions
|
@ -154,6 +154,8 @@ Plugins in the `plugins` directory are automatically recompiled and serialized t
|
||||||
|
|
||||||
- `plugin.wasm.pre` is the plugin compiled to Wasm *and additionally* precompiled to host-platform-agnostic cranelift-specific IR. This should be about 700KB for debug builds and 500KB in release builds. Each plugin takes about 1 or 2 seconds to compile to native code using cranelift, so precompiling plugins drastically reduces the startup time required to begin to run a plugin.
|
- `plugin.wasm.pre` is the plugin compiled to Wasm *and additionally* precompiled to host-platform-agnostic cranelift-specific IR. This should be about 700KB for debug builds and 500KB in release builds. Each plugin takes about 1 or 2 seconds to compile to native code using cranelift, so precompiling plugins drastically reduces the startup time required to begin to run a plugin.
|
||||||
|
|
||||||
|
> TODO: Rework precompiled plugins.
|
||||||
|
|
||||||
For all intents and purposes, it is *highly recommended* that you use precompiled plugins where possible, as they are much more lightweight and take much less time to instantiate.
|
For all intents and purposes, it is *highly recommended* that you use precompiled plugins where possible, as they are much more lightweight and take much less time to instantiate.
|
||||||
|
|
||||||
### Instantiating a plugin
|
### Instantiating a plugin
|
||||||
|
|
|
@ -88,7 +88,7 @@ fn precompile(path: &Path, engine: &Engine, engine_name: &str) {
|
||||||
.precompile_module(&bytes)
|
.precompile_module(&bytes)
|
||||||
.expect("Could not precompile module");
|
.expect("Could not precompile module");
|
||||||
let out_path = path.parent().unwrap().join(&format!(
|
let out_path = path.parent().unwrap().join(&format!(
|
||||||
"{}.{}.pre",
|
"{}.{}",
|
||||||
path.file_name().unwrap().to_string_lossy(),
|
path.file_name().unwrap().to_string_lossy(),
|
||||||
engine_name,
|
engine_name,
|
||||||
));
|
));
|
||||||
|
|
|
@ -26,7 +26,7 @@ pub async fn new_json(executor: Arc<Background>) -> Result<PluginLspAdapter> {
|
||||||
.map(|output| output.stdout)
|
.map(|output| output.stdout)
|
||||||
})?
|
})?
|
||||||
.init(PluginBinary::Precompiled(include_bytes!(
|
.init(PluginBinary::Precompiled(include_bytes!(
|
||||||
"../../../../plugins/bin/json_language.wasm.epoch.pre"
|
"../../../../plugins/bin/json_language.wasm.epoch"
|
||||||
)))
|
)))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue