Skip to content

Custom Kernels #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rameshvarun opened this issue Sep 7, 2023 · 1 comment
Closed

Custom Kernels #19

rameshvarun opened this issue Sep 7, 2023 · 1 comment

Comments

@rameshvarun
Copy link
Owner

rameshvarun commented Sep 7, 2023

You should be able to define your own Kernel in a script tag and use it. Something like this:

<!-- Import Blog Cells -->
<script type="module" src="blog-cells.js" />

<!-- Define Kernel -->
<script>
class CustomKernel extends BlogCells.Kernel {
  async run(code, onOutput) {
    ...
  }
}

BlogCells.registerKernel("custom", () => new CustomKernel());
</script>

<!-- Create Cell -->
<script type="text/notebook-cell" data-kernel="custom">
code_in_a_custom_language()
</script>
@rameshvarun
Copy link
Owner Author

Released in version v0.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant