Skip to content

Namespaces for native extensions #115

@KCreate

Description

@KCreate

You should be able to put methods added via native extensions into a namespace.

charly_namespace "mynamespace" do
  charly_api "mymethod" do
    TString.new "Hello world"
  end
end

Access inside charly:

const mynamespace = __internal__namespace("mynamespace")
mynamespace.mymethod()=> "Hello world"

The interpreter will automatically create bindings to all these methods.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions