Skip to content

Commit

Permalink
Improve rs port.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Dec 11, 2024
1 parent 433e310 commit 182b646
Show file tree
Hide file tree
Showing 24 changed files with 897 additions and 5,846 deletions.
4 changes: 4 additions & 0 deletions source/ports/rs_port/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rust-analyzer.checkOnSave": true,
"rust-analyzer.check.command": "clippy"
}
2 changes: 2 additions & 0 deletions source/ports/rs_port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ if(Rust_BINDGEN_EXECUTABLE)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${Rust_BINDGEN_EXECUTABLE}
--no-include-path-detection
--allowlist-function 'metacall.*'
--rustified-enum 'metacall_.*'
"${CMAKE_SOURCE_DIR}/source/metacall/include/metacall/metacall.h"
-o "${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.rs"
--
Expand Down
2 changes: 1 addition & 1 deletion source/ports/rs_port/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function sum(a: number, b: number): number {
use metacall::{switch, metacall, loaders};

fn main() {
// Initialize Metacall at the top
// Initialize MetaCall at the top
let _metacall = switch::initialize().unwrap();

// Load the file
Expand Down
Loading

0 comments on commit 182b646

Please sign in to comment.