Skip to content

Commit

Permalink
Merge pull request #450 from luketpeterson/repl
Browse files Browse the repository at this point in the history
Creating C and Python bindings for all functionality used by Repl.  Refactoring Repl to call through Python by default
  • Loading branch information
vsbogd authored Oct 20, 2023
2 parents da7580f + f31df56 commit 738e739
Show file tree
Hide file tree
Showing 50 changed files with 2,600 additions and 892 deletions.
7 changes: 7 additions & 0 deletions c/doc/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ More complete documentation on the MeTTa language, type system, and the MeTTa st
This Interface includes the types and functions to instantiate a MeTTa interpreter and step through MeTTa code.
[//]: # (Platform Environment Interface)
@defgroup environment_group Platform Environment Interface
@brief Configuration and settings shared by MeTTa runners
This interface allows configuration of shared properties for MeTTa interpreters
[//]: # (Misc. Interfaces)
@defgroup misc_group Misc Interfaces
Expand Down
2 changes: 1 addition & 1 deletion c/src/atom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ impl atom_vec_t {
fn new() -> Self {
Vec::<Atom>::new().into()
}
fn as_slice(&self) -> &[Atom] {
pub(crate) fn as_slice(&self) -> &[Atom] {
unsafe{ core::slice::from_raw_parts(self.ptr.cast(), self.len) }
}
/// Converts a borrowed vec into an owned vec
Expand Down
13 changes: 0 additions & 13 deletions c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,3 @@ pub mod util;
pub mod atom;
pub mod space;
pub mod metta;

/// @brief Initializes the logger
/// @ingroup misc_group
/// @note This function should be called once, prior to any other calls to Hyperon C functions
///
//TODO: Is there a way we can get rid of this function in the external API?
// Discussion about alternative ways to init the logger here: https://github.com/trueagi-io/hyperon-experimental/pull/314
// and here: https://github.com/trueagi-io/hyperon-experimental/issues/146
#[no_mangle]
pub extern "C" fn init_logger() {
hyperon::common::init_logger(false);
}

Loading

0 comments on commit 738e739

Please sign in to comment.