mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
feat(compile): support for ffi and node native addons (#28934)
This extracts out the shared libraries and `.node` native modules to a temp file and opens them from there. **This means that this implementation will not work in every scenario.** For example, a library could require other files that only exist in the in-memory file system. To solve that, we'll introduce https://github.com/denoland/deno/issues/28918 later or adapt this solution to solve more issues. Additionally, this will not work when run on readonly file systems.
This commit is contained in:
parent
0cb2ec22a4
commit
16d305449d
28 changed files with 417 additions and 16 deletions
|
@ -87,6 +87,7 @@ impl CliCjsCodeAnalyzer {
|
|||
source: &str,
|
||||
esm_analysis_mode: EsmAnalysisMode,
|
||||
) -> Result<CliCjsAnalysis, JsErrorBox> {
|
||||
let source = source.strip_prefix('\u{FEFF}').unwrap_or(source); // strip BOM
|
||||
let source_hash = CacheDBHash::from_hashable(source);
|
||||
if let Some(analysis) =
|
||||
self.cache.get_cjs_analysis(specifier.as_str(), source_hash)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue