Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
with:
name: bindings-${{ matrix.settings.target }}
path: |
${{ env.APP_NAME }}.*.node
crates/node-binding/${{ env.APP_NAME }}.*.node
${{ env.APP_NAME }}.*.wasm
if-no-files-found: error
test-macOS-windows-binding:
Expand Down
2 changes: 1 addition & 1 deletion crates/feopack-core/src/module_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl ModuleGraph {
modules: std::collections::HashMap::new(),
});
}

// 添加到最后一个 partial
if let Some(last) = self.partials.last_mut() {
last.modules.insert(module_id, module);
Expand Down
8 changes: 8 additions & 0 deletions crates/node-binding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ use napi_derive::napi;

use feopack_core::*;

#[napi]
pub fn plus100(num: i32) -> i32 {
num + 100
}

#[napi]
pub struct Rspack {
compiler: Box<Compiler>,
Expand All @@ -32,6 +37,9 @@ impl Rspack {
})
}

/// # Safety
/// This function is unsafe because it interacts with native resources.
/// Ensure the compiler is properly initialized before calling.
#[napi]
pub async unsafe fn build(&mut self) -> Result<()> {
self
Expand Down
Loading
Loading